Solved

on exit from pop-up loaded .swf, main movie must 'goto and play' - HOW?!!

Posted on 2004-03-26
8
271 Views
Last Modified: 2008-03-10
Hi there

I have a movie that loads an swf above the main interface.
How do I instruct the playhead to go somewhere on the main timeline when i click out of the loaded swf?

thanks
Aidan

0
Comment
Question by:aidan09
  • 4
  • 4
8 Comments
 
LVL 39

Expert Comment

by:blue-genie
ID: 10686406
you can target the main timeline (i'm assuming you're referring to what you call the main interface) by simply preceding your code with _root.

ie. _root.gotoAndStop(2);

blu.
0
 

Author Comment

by:aidan09
ID: 10686966
at the moment, I have

on (release) {
    unloadMovieNum(1);
}
on (release) {
    _root.gotoAndStop(framename);
}

but it's just unloading the swf
??


thanks
aidan
0
 

Author Comment

by:aidan09
ID: 10687159
make that:

on (release) {
    unloadMovieNum(1);
    _root.gotoAndStop(1945);
}

the movie unloads, but the playhead is still at the same frame where the swf launched from
0
Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

 

Author Comment

by:aidan09
ID: 10687199
the button that exits from the loaded swf in level in is contained in that swf rite?

should the exit button call from the main timeline to the loaded swf?

0
 
LVL 39

Accepted Solution

by:
blue-genie earned 500 total points
ID: 10687299
okay, where and how do you load the movie to start with.

then, where in comparason to that is the button where you're unloading the thing.

while the swf that has been loaded is there, what's going on with the main timeline? has it stopped - are other things happening?

for example, i just put a quick 30 frame movie together.
i have keyframes in 1, 15 and 30.
in frame 1 (main timeline) i have
loadMovie("loader2.swf", 1); //load the movie loader2.swf into level1

in frame 15
i have a stop action, and a button on the stage with the code:
on (release) {
      unloadMovieNum(1);
      _root.gotoAndStop(30);
}

so when i run the movie - the swf is immediately loaded, when it gets to frame 15, my button appears. and the playhead stops at frame 15. when i click the button, it unloads loader2 and goes to frame 30 -
how's that different to what you're doing.

I'll be back on Monday, if that didn't help and someone else hasn't quipped, i'll get back to you then.

blu.
0
 
LVL 39

Expert Comment

by:blue-genie
ID: 10687425
aah ok, *lightbulb moment*

you have the button inside the swf which is loaded onto the main movie,
so your code then should be (from the button in the loaded swf).

on (release) {
     unloadMovie(this);
     _level0.gotoAndStop(30);
}
have a good weekend, good luck
0
 
LVL 39

Expert Comment

by:blue-genie
ID: 10687446
quick explanation, in the first example where i thought the exit button was in the main movie, using _root will refer to itself, but since your button is in the swf, then you need to refer to the level, which is _level0 as _root will refer to the swf's own main timeline.

:-)

0
 

Author Comment

by:aidan09
ID: 10687915
thanks mate - fantastic!!!
u got me thinking linear again - and it worked!!

thanks for the effort!

aidan
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Video sharing with user login 3 203
free flash maker 5 210
What is needed to center a flash image to the center of the page? 4 100
Adobe Flash player - Microsoft Edge 9 167
Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
Sometimes you know that one object has a specific child in it, but you can't find the child. This happened to me when I was trying to code some actionScript to make a toolbar work with its embedded buttons.  My partner had created the toolbar usi…
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question