-
gotta bounce
Trace Button Instance Problem
I have a movieclip and a button on the root named mc and btn respectively.
When I trace the movieclip:code: on (rollOver){
trace(this);
}
I get _level0.mc
However when I trace the button all I get is _level0.
I need to be able to somehow get the instance of the targeted button on a rollover. Is this possible?
-
Senior Member
the old style button events - on(whatever) don't have their own scope, so within them the keyword "this" will refer to the timeline that contains the button.
you should either use the MX style event handlers,
code:
someButton.onRollOver = function() {
trace(this);
};
or use movie clips instead of buttons.
-
gotta bounce
Thanks, that's kinda what I figured. I just didn't want to locally code 25 buttons or have to change them all to mc's, but who really plans ahead anyways.
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
|