dcsimg
A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: chanign scene from movie clip

  1. #1
    Senior Member
    Join Date
    Jul 2002
    Posts
    184

    chanign scene from movie clip

    I have a movie with three scenes ... on the first scene "StaticMap" I click on a button and it takes me to a second scene called "map2both2". I have a movieclip inside of that scene ... that has a button that I want to change back to "StaticMap" ... I thought this woudl do it.


    Code:
    on (release) {
        gotoAndPlay("StaticMap", "TheBeginning");
    }
    but it just goes back to the first frame of the movie clip with the button. Any help?

  2. #2
    FK's Geezer Mod Ask The Geezer's Avatar
    Join Date
    Jul 2002
    Location
    Out In The Pasture
    Posts
    20,490
    Do you want to go to the first frame of the StaticMap scene? Use:

    on (release) {
    _root.gotoAndPlay(1);
    }

  3. #3
    Senile member! :)
    Join Date
    Dec 2001
    Location
    Saunaswamp (transl)
    Posts
    2,296
    I'm kind of against scenes myself. They mostly create more problems than they solve. but here some hints for scenes:

    The verion of gotoAndPlay()/gotoAndStop() that takes a scenename is actually an action not a method of the Movisclip object like the one we normally use. This action can only be executed from the main timeline. another drawback is that it does not accept an variable as scene name it must be a string entered directly into it so using a function with the scene as an argument is also out the question.

    the simplest way to jump between scenes is to use unique framelabels and simply use _root.gotoAndPlay("framelabel"); note that the label must be unique to all scenes or you'll be in trouble.

    /Mirandir

  4. #4
    Senior Member
    Join Date
    Jul 2002
    Posts
    184
    yeah i noticed problems ... like right now ... i have 5 movie clips named: zero, one, two, three, four. and the are in one of my secondary scenes. I gave them instance names ... same as listed above ... but I can't reference them in actionscript ... ... why is this?

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