Results 1 to 4 of 4

Thread: Action Script problem

  1. #1
    Join Date
    May 2008
    Posts
    8
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Action Script problem

    Hello,

    I'm having some major problems with a flash movie with external .swf's I've been making. Came on here hoping that a genius may be able to help me resolve my problem.

    Ok.. the problem is, I have an opener page in the movie with a small menu on the left which loads the other swf's into my holder, this works all good! This is where my problem occurs, within the other swf's are more buttons which load, and because I am using:
    Code:
    this.onRelease = function(){
    	_root.gotoAndPlay(31);
    }
    The problem with using the "_root" command is that it jumps upto the main swf (the one the movie is loaded into) when I dont want it to . I need it to use a similar command to "_root" but only to the movie which has been loaded... If that makes sense.

    At the moment it loads the swf, but as I click the newly loaded links, it uses _root and jumps to frame 31 of the main document, when i need it to go to frame 31 of the external swf.

    Hopefully someone can help me come up with a solution to this.

    Many thanks in advance.

  2. #2
    Join Date
    May 2008
    Posts
    8
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    Not to worry, I've found a solution.. it seems that you can use _parent more than once, wish I knew that. So i've just used parent the amount of times it was nested and it worked fine.

  3. #3
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    As a general rule, you never want to use _root. It causes the exact problems that you're experiencing.

    this._parent._parent._parent is a much better technique.

    Glad you got it working

  4. The Following User Says Thank You to Medyman For This Useful Post:

    jamie_di (05-01-2008)

  5. #4
    Join Date
    May 2008
    Posts
    8
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    I will do from now on, thanks for your reply

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •