|
-
[RESOLVED] [F8] OnClick/OnRelease
how do I add onclick events to MCs or Dynamic Text Fields
-
myMC.onPress = function (){
trace("clicked");
}
-
If I have nultiple instances of a movie clip, how can I have it use an onclick method for everyone, ,but have different actions.
myMC.onClick() {
action(someVariable);
}
withotu haveing to type the code into every MC
-
 Originally Posted by Gemione
If I have nultiple instances of a movie clip, how can I have it use an onclick method for everyone, ,but have different actions.
myMC.onClick() {
action(someVariable);
}
withotu haveing to type the code into every MC
to target multiple instances, if they have a serail naming convention (mc1, mc2,mc3, etc.) use a for loop. If not use an array and a for loop.
for different actions, same thing. Either a for loop or an array and a for loop.
For more info on these methods see the livedocs a adobe.com. Or your help files.
gparis
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|