Copy link to clipboard
Copied
Hi there,
I'm new to Flash so please bear with me.
I have a buttont that has drag and drop assigned to it as an actionscript from code snippets.
I am trying to link the movements made by this button and the on click function to a symbol on the screen.
I need this symbol/button to further interact with other things on screen.
Can anyone help with code or point me in the direction of a tutorial?
e.g. Viewer uses their mouse to click on an onscreen mouse - moving this mouse moves a cursor and this cursor interacts with objects on the computer screen animation
Thanks
Amanda
what's the problem?
if you already have the drag and drop coded you just need to add listeners for mouse events to your other objects
Copy link to clipboard
Copied
what's the problem?
if you already have the drag and drop coded you just need to add listeners for mouse events to your other objects
Copy link to clipboard
Copied
The problem is I'm new and didn't know the name of the function i was looking for
Thanks for the advice. I can look it up now I know what I'm looking for.
Much obliged
Copy link to clipboard
Copied
you're welcome.
adding a mouse click listener to an object mc would look like:
mc.addEventListener(MouseEvent.CLICK,clickF);
function clickF(e:MouseEvent):void{
// do whatever, e.currentTarget was clicked
}
Find more inspiration, events, and resources on the new Adobe Community
Explore Now