-
targetting movie clips
Below are the target paths for my project:
_root
---------charger
---------bigbox
----------------------spin
I want to access the movie clip "spin" from within the movie clip "charger." In the last frame of the "charger" movie clip, I have the following line of actionscript:
_root.bigbox.spin.gotoAndStop(8);
The above actionscript does not work. When I move the "spin" movie clip up one level and put it on the main timeline, I am able to access it with:
_root.spin.gotoAndStop(8);
Why wouldn't it work one level further down?
-
Senior Member
Why would you include _root into the path.....
_root.bigbox.spin.gotoAndStop(8);
.......the bigbox mc is not located in the _root.
You just have to write........
bigbox.spin.gotoAndStop(8);.
....or........
_root.charger.bigbox.spin.gotoAndStop(8);
-
yes, "bigbox" and "charger" are both located in the root, and "spin" is located inside "bigbox." So in other words, I need to get back out of "charger" and into "bigbox" to access the "spin" movie clip.
-
Then _root.bigbox.spin.gotoAndStop(8); should work, assuming those are the instance names of the clips on stage and not just their Library names...
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
|