Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Navigation for my movie 1

Status
Not open for further replies.

gregoryt

Technical User
Nov 28, 2003
6
US
I have designed my movie so the Intro is a movie clip and the portfolio is a movie clip. I have a "home" button inside the portfolio movie (inside a logo movie - for animation) which will take the user to the last frame of the intro section (skip the intro) when the button is clicked. BUT it won't work

I named the intro movie (intromovie) and used this actionscript for the home button

on(release) {
_root.intromovie.gotoAndPlay(58);
}
BUT IT WILL NOT WORK I also tried just "intromovie.gotoAndPlay(); etc and every other variation I can think of

the only actionscript that will work is
on(release) {
_root.play();
} -- which plays the entire intro again (what I am trying to avoid.)

CAN anyone please help me??

Thanks
GT
 
I tried a couple variations and they all worked for me. So your portfolio MC has a button in it which when click will take the intro - with instance name intromovie - to frame 58. Both of the MC's are on the stage in the main movie..I tried this, it worked for me...misunderstanding your question a tad, I put an MC inside of the portfolio MC and still targeted the intromovie MC, wihtout a problem....hhmmm..it makes no sense to me, it should work...maybe someone else sees a flaw here..

Adam
 
Have you just named the clip "intromovie" (it's Library name), and not actually given the instance name of "intromovie" to the clip on stage?
Furthermore is the intromovie clip present on the frame you're calling it?
 
Yes I have named the instance name on the stage the appropriate name. However, I don't understand what you mean by present on the frame I am callin it. the gotoAndPlay is for where I want to go inside intromovie clip, isn't it?
 
Can you post a link to your .fla?
It should be zipped up and in MX only format.
Or you could e-mail it to me. Hit my handle above for my address.
 
What I ment by "is the intromovie clip present on the frame you're calling it", is exactly that. For your knowledge, it's not present on stage because when you're in the Portfolio clip, you're on frame 12 of Scene 1 and the intromovie clip (dogfood) is only present on frame 10 & 11 of Scene 1, and not on frame 12.
Thus you can't target and control a movie clip, that's not present on stage on the same frame in which the button lies.

Among a few workarounds possible, I suggest this one.

On frame 10 of Scene 1, add the following lines after your stop(); action...

stop();
if(_level0.go_home){
_root.dogfood.gotoAndStop(60);
}

What this is in fact saying is, if a variable named _level0.go_home is "true", goto and stop on frame 60 of the dogfood clip. If not "true", then play from frame 1, thus your whole intro.

Now the first time around, since the variable hasn't been set, it defaults to being "false". So when the playhead hits frame 10, it plays the whole intro.
Now if I then visit the Porfolio section or any other section, and want to go back to the main menu while skipping the intro, through a home button, all I have to do is set the variable _level.go_home to "true" (the intro has already played), and send the playhead on the frame where the intromovie (dogfood) lies and where my above script, will foward the clip to frame 60, since the variable has been set to true.

Thus the script on your home button would be...

on (release) {
_level0.go_home = true;
_root.gotoAndStop(10);
}

Piece of cake!


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top