Solved

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

Posted on 2004-03-26
8
278 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
Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

 

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In my long career of working as an actionscript developer, I had spent sleepless night often working hard to solve some small problems which actually took a lot of my development time; later found out the solutions to be a line or two. Here are s…
While working over numerous projects I often had the requirement for doing a screen capture in AS3.0. Unfortunately I found no "ready made" solutions in google search that suited my requirements. But I did come across some great resources which help…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

820 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