Skip to main content
Participant
Dec 14, 2023 10:44 AM UTC
Question

AS3 Right Click Button

Hello, I'm new to AS3 and I'm trying to do a right click button but I can't do it. 

 

I'm trying to create a maze but since we need a drag and drop button and resize button, we decided to make it look like a puzzle and they will drag the puzzle all together. However, I don't know how I will make the resize button because we have 8 objects. Is it possible to put in one button only? or no? Sorry I'm really new here.

 

Here's my attempt

 

ddmaze8.addEventListener(MouseEvent.CLICK, incHeight);

function incHeight(event: MouseEvent): void

{

               ddmaze8.height += 5;

               ddmaze8.width += 5;

}

 

ddmaze8.addEventListener(MouseEvent.RIGHT_CLICK, decHeight);

function decHeight(event: MouseEvent): void

{

               ddmaze8.height -= 5;

               ddmaze8.width -= 5;

}

 

Thank you so much!

    This topic is closed to new replies. Start a new post to keep the conversation going.

    10 replies

    JoãoCésar17023019
    Community Expert
    Community Expert
    Dec 14, 2023 12:04 PM UTC

    Hi.

     

    You need to deploy it as an AIR application for right-click events to work.

     

    Regards,

    JC

    Translate
    kglad
    Community Expert
    Community Expert
    Dec 14, 2023 12:15 PM UTC

    @JoãoCésar17023019 

     

    that's not true.

    Translate
    JoãoCésar17023019
    Community Expert
    Community Expert
    Dec 14, 2023 12:24 PM UTC

    Why?

    Translate
    kglad
    Community Expert
    Community Expert
    Dec 14, 2023 11:42 AM UTC

    your os is probably intercepting that.  use right mouse down or up

    Translate