-
Senior Member
AS2 - Get the position of a movie clip, on a particular frame of a MC
I am trying to get the position of a movie clip called "Shooter", returned to a variable called spitballYpos.
The movie clip is sitting on frame 6 (labelled "Shooting") of a movie clip called PDFstanding.
The position returns perfectly if I place the .shooter MC on the first frame of PDFstanding, but on frame 6 the variable result just returns "undefined".
What have I missed? If I need to reference the particular frame the 'shooter' movie clip is on, then what is the correct syntax?
Here's my code...
Actionscript Code:
spitballYpos = _root.PDFstanding.shooter._y;
-
you cannot talk to or hear a movieclip that is not there. that's for the logical explanation.
If your clip is on frame #6 of the PDFstanding instance, that's where the tracking code should also be. OR, better since it allows you to centralize your code on the main timeline, have that clip on frame 1 of PDFstanding, where it works, and set it's _alpha to 0. Set its alpha back to 100 on frame #6.
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
|