dcsimg
A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: targetting movie clips

  1. #1
    Junior Member
    Join Date
    Sep 2003
    Location
    Fairfax, VA
    Posts
    19

    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?
    -Jay

  2. #2
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    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);

    -Pelle Piano
    // Image Gallery
    www.studiobild.com
    // Photo Blog
    http://talesofthepixel.blogspot.com

  3. #3
    Junior Member
    Join Date
    Sep 2003
    Location
    Fairfax, VA
    Posts
    19
    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.
    -Jay

  4. #4
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    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
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center