Solved

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

Posted on 2004-03-26
8
251 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
 

Author Comment

by:aidan09
Comment Utility
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
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
LVL 39

Accepted Solution

by:
blue-genie earned 500 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
thanks mate - fantastic!!!
u got me thinking linear again - and it worked!!

thanks for the effort!

aidan
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

This is intended to introduce all collision detection principles in flash, their strengths, weaknesses and workarounds. The main method for Collision Detection in flash is using hitTestObject. But unless you'll be pushing rectangular shapes without …
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
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.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

772 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now