A Flash Developer Resource Site

Results 1 to 9 of 9

Thread: movie clip hiearchy problems

  1. #1
    Junior Member
    Join Date
    Jun 2002
    Location
    San Diego
    Posts
    24
    I have created a movie with a series of buttons in them. The buttons each have a gotoAndPlay script on them to make the movie change scenes. I know I have to change the hiearchy from the movieclip to the main movie but everything I try doesn't work.

    Here is an example of the main script:

    on (release) {
    gotoAndPlay("scene2", 1);
    }

    Here are some examples of hiearchy control of tried to use.

    gotoAndPlay("_root.scene2", 1);

    gotoAndPlay("_parent.scene2", 1);

    gotoAndPlay("_level0.scene2", 1);

    Can someone please show me what I am doing wrong??? Thanks in advance.

    Chris Czerniak


  2. #2
    Aye sir I_am_Tarzan's Avatar
    Join Date
    Jul 2002
    Location
    Location: Location: Locations?:
    Posts
    489
    _root.gotoAndPlay("scene2", 1)
    try that

  3. #3
    Junior Member
    Join Date
    Jun 2002
    Location
    San Diego
    Posts
    24
    The script

    on (release) {
    _root.gotoAndPlay("scene2", 1);
    }

    Did not seem to work either. When you click on the button in the swf nothing happens where on scipts before it would go back to frame 1 in the movie clip or the entire movie clip would disappear.

    Chris Czerniak

  4. #4
    Junior Member
    Join Date
    Aug 2002
    Posts
    27
    on(release)
    {
    _root.gotoAndPlay("Scene 2",1);
    }

    make sure gotoAndPlay is capitalized properly as the command is case sensitive, and make sure you spell your scene name correctly too, "scene2" is different from "Scene 2", which is flash's default name for your second scene.

  5. #5
    Junior Member
    Join Date
    Jun 2002
    Location
    San Diego
    Posts
    24
    The script:

    on(release)
    {
    _root.gotoAndPlay("Scene 2",1);
    }

    Is still not working for me. The "gotoAndPlay" is the right case and my scene is actually called "realestate" but I was calling it scene2 for simplicity. Should I rename all my scenes so they are Scene 1, Scene 2 ex ex.

    Chris Czerniak

  6. #6
    Member
    Join Date
    Dec 2001
    Posts
    48
    I think it would be a very good idea to call the scenes by their names! Othewise -Why should they listen?

    Thomas
    Denmark

  7. #7
    Junior Member
    Join Date
    Jun 2002
    Location
    San Diego
    Posts
    24
    I renamed the scene for the post, not in my fla. Speaking of fla I have decided to post it with my problem. If anyone has a chance to take a look and let me know what I'm doing wrong.

    http://www.zianet.com/cczernia/help.html

    Thanks again.

    Chris Czerniak

  8. #8
    Senior Member catbert303's Avatar
    Join Date
    Aug 2001
    Location
    uk
    Posts
    11,222
    You can't target scenes in the main timeline from within a movie clip see this link for the reason why http://ed.gamegeared.com/flash/tuts/...gotoandshoveit
    instead you should put a frame label on frame 1 of the scene you want to goto and then use

    on (release) {
    _root.gotoAndPlay("framelabelname");
    }

    in your movie clip.

  9. #9
    Junior Member
    Join Date
    Jun 2002
    Location
    San Diego
    Posts
    24
    Thanks Catbert303. This solved the problem which has been haunting me for a week and half.

    Chris Czerniak

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