Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Help Targeting Main Timeline From Loaded Movie



How do you target the main timeline from a movie loaded to level1?

I’ve tried things like the fallowing without success.

_root.gotoAndPlay(2)

_parent.gotoAndPlay(2)

_level0.gotoAndPlay(2)


please help,
S



FlashKit > Flash Help > Flash ActionScript
Posted on: 07-10-2002, 06:51 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Targeting A Frame In The Main Timeline Of The Root From An Externally Loaded Movie
Hi! I'm trying to target a frame called "home_portfolio" on the main timeline from a loaded swf. Here's the code on the portfolio button:
on (release) {
tellTarget ("_root") {
gotoAndPlay("home_portfolio");
}
}

On the "home_portfolio" frame is an action to load the portfolio movie. However, it ignores this.


After reviewing some of the other posts I've changed the code on the portfolio button to be"
_root.gotoAndPlay"home_portfolio"

yet when I publish the swf the output says
Symbol=_bottom nav, Layer=text, Frame=1: Line 1: ';' expected
_root.gotoAndPlay"home_portfolio"

I don't understand why either one of these codes won't work. Can you help? Thanks so much

Targeting The Main Timeline From Loaded Swf
Hi everyone

well I have an swf that loads an external swf with this code:
loadMovie("Portfolio_1.swf",0); [so far so good!]

but now from inside Portfolio_1.swf I want to go back to the main
timeline to "Scene2, porfolio" (name of scene,frame)
...so I used this code on in a frame targeting the back button in Portfolio_1.swf coz I
thought it would take me to the main movie on frame "portfolio"

code:
Code:
back_btn.onRelease=function() {

_parent.gotoAndStop("Scene 2", "portfolio");

}
PLEASE HELP...!! Thanks

Targeting Movie Frame From Main Timeline
Hello,

How do I call up a specific frame in a movie clip from my main timeline? My movie clip instance is called 'menu' and the frame I want is 2.

I don't really understand _level,_target,_root, or _parent commands and have not loaded the movie in any special way other than dragging it onto the main timeline.

Any help would be greatly appreciated.

Thanks

Buttons Within Movie Clips, Targeting The Main Timeline
I have five buttons (1-5), in a movie clip (MC1). I want the buttons to go to frames on my main timeline--NOT within the MC1, but I am having a problem with it.

Currently I use:

on (Press){gotoAndPlay(frame);}

but this plays the frame within the movie clip, not on the main timeline.

I am sure there is a simple solution to this. Any help would be greatly appreciated.

Thanks,
shotbot

Targeting Main Movie From Exteranlly Loaded Swf File
on my main movie, a button loads an external movie clip. from that movie clip i need to tell it to load an image in the main movie inside an Movie clip place holder, my script on my button on the external movie clip looks like this


on (release) {
loadMove ("prjct365week1.jpg", "_root.placeholder");
}

placeholder being the instance and MC name of the place holder on the main movie timeline i need to target from my external swf file

Targeting A Timeline In An Loaded Movie Clip
Can anyone tell me what's wrong with this code? The swf successfully loads where I want it to, but I'm having trouble moving the new movie clip to a specific keyframe in the timeline.


Code:
on (release) {
_parent.productImage.loadMovie("./flash/BT_Closeup.swf");
_parent.productImage.gotoAndStop("set2");
}

Can I Target The Main Timeline From A Loaded Movie?
So...I load a swf into the main timeline. How can I target the main movie when the loaded swf is finished? Is this possible...and if so how do I do it?

Thanks.

Playing The Main Timeline From An Loaded Movie.....?
Hi all, I have a simple question, In the main Scene in a frame I have a action:

Stop
Load Movie ("graficooo.swf", "porttarget2")

After, the movie open and play... but in the end I need to put a action that unload the movie
(Stop // Unload Movie ("../porttarget2")
and play the timeline of the scene..... What is the correctelly action ???

Thankx

Loffi

How To Address The Main Timeline From The Loaded Movie?
Hi,

i got a movie loaded in my main timeline(_root) in the frame 20.
and i got a stop() action as well in the same frame. Am loading the movie at a level8. now, i want once the loaded movie is finished playing, i want the main timeline's playHead move to frame21.

so, what i did was, i written the code in last frame of the loading movie like this:


_root.gotoAndStop(21);
\this doesn't work.

__root.nextFrame();

\this too doesn't work.

can i use some sort of function, to sort my problem?

How To Address Main Timeline From The Loaded Movie?
Hi,

i got a movie loaded in my main timeline(_root) in the frame 20.
and i got a stop() action as well in the same frame. Am loading the movie at a level8. now, i want once the loaded movie is finished playing, i want the main timeline's playHead move to frame21.

so, what i did was, i written the code in last frame of the loading movie like this:


_root.gotoAndStop(21);
\this doesn't work.

__root.nextFrame();

\this too doesn't work.

can i use some sort of function, to sort my problem?

[f8] Problem With Movie Once Loaded Into Main Timeline
hello

i have a problem that i have been unable to solve foe weeks now and it's driving me mad.

I really hope someone here can help.

I have attached a php script and flash form.

The flash form and script work fine when the form is accessed directly.
See here (give it a go):
http://www.luciddreampictures.com/ld_contact.swf

But when is is brought into my main flash file it sends the email but the php returns the error message 'no email address supplied' (even though an email address has been supplied!) and the flash is sent to my 'resubmit' frame.

Try it out here:
http://www.luciddreampictures.com

click contact (i know the button need to be sorted).

Feel free to send test emails to see what's happening.

I know there are different ways scripts to use but i would like to get this one working.

Can anyone figure out why it doesnt work properly when nested in another movie?

i don't think it is a targeting issue as the emails are being sent and the error message is being received.

Thanks for your help.

Julian

Controlling Main Timeline From Loaded Movie
I have loaded an external movie onto the main movie in a movie clip called "mainholder" - In the main timeline on the main movie there is a "stop" command on frame 1. From the loaded movie, I want to control the main timeline and tell it to go to frame 2. Can someone tell me the actionscripting to do this, I have tried several commands and getting frustrated. ;-)

Thanks

Loaded Swf With Buttons Not Communicating With Main Movie Timeline
hi

i have a swf that i load into a level in the main movie that contains my menu. i want to use the buttons in this movieclip to navigate to different frames in my main movie (which loads other movieclips on different levels)

the buttons are themselves in movieclips but this doesn't seem to be a problem when i have the whole menu in a movieclip in the same movie, not loaded externally.

i've tried using


Code:
on (release) {
_root.gotoAndPlay(40);
}
which works in the same movie, but not when i load the movieclip into the main movie.

Is it because i'm loading the movieclip into layers rather than a container?

i know i'm probably making some huge mistake so any help whatsoever will be greatly appreciated.

thanx

Duswa

Control The Play On The Main Timeline From Within A Loaded Movie (not A Movie Clip)?
Question... I have a movie (main movie) that loads another movie (movie 2) automatically. Movie 2 contains a button that loads yet another movie (movie3). Now I’m having trouble with this next part... When movie3 loads I want "main movie" to stop where it’s at in the timeline and stop all other loaded movies until the user clicks another button where upon movie 3 will go away and "main movie" will resume. Movie 2 is like the paper clip guy in Word and movie 3 is my help movie. Therefore, it can be accessed at any point during the main movie and I don’t want to use a goTo command to jump to a frame label or scene. Does anyone have any idea how to control the play on the main timeline from within a loaded movie (not a movie clip)?

Addressing The Main Movie Timeline From A Movie Loaded Via LoadMovie.
I have a clip on the main time line of a host movie that I would like to make visible when the second frame of the swf to be loaded, containing an embedded video movie clip loads.

I have this code on the video clip in the movie to be loaded:

code: onClipEvent (load) {
_root.witch_mc._visible=true;

}

Which I had hoped would have addressed the main timeline of the host movie where the targeted clip was – but no joy.

Any help please?

Jumping To An Specific Frame In A Movie Loaded Into The Main Timeline
Hello,

Is there any way to jump to an specific frame in a movie that was loaded into the main timeline?

That´s what I did (but it didn´t work, it always jump to the first frame of the external movie):

1. I created a mov_volta.swf movie with different labeled frames as pres01_entra, pres02_entra, pres03_entra...

2. I created an empty movieclip, put it into an empty layer in the main timeline and named its instance "presidentes_volta"

3. Below this layer I put another movieclip which instance was called "presidentes_vai"

4. In this movieclip I have buttons with codes like this one:

code:
on(release) {
loadMovie("mov_volta.swf", _root.presidentes_volta);
_root.presidentes_volta.gotoAndPlay("pres01_entra" );
}


5. So, what I want is: load the movie "mov_volta.swf" into the empty movieclip "presidentes_volta" which is in the main timeline (that´s OK), and then jump to the frames "pres01_entra", "pres02_entra", "pres03_entra"... in the movie "mov_volta.swf". This second part is not working. Instead of jump to the desired frame, it always jump to the first frame of the movie.

Is there any way to control this? Thank you for your help

(I hope that you can understand my English. I read much better than write. In Brazil our regular English classes are poor...)

Controlling Navigation Of A Movie Clip Inside A Loaded Swf From Main Timeline
Hi,
I am using the two lines of code below in my main movie to laod another swf into level 50 of the main movie. I then want to control an instance of a movie clip inside the loaded swf called background but the second line (goto) does not work.


Code:
loadMovieNum ("desktops/"+backgroundimage, "50");
_level50.background.gotoAndStop(2);
The first line definately works fine.
Does this mean the hierarchy is such that I should be saying _level50.loadedswf_name.background.gotoAndStop(2)
In which case is there a way of giving the loaded swf an instance name when I load it. Or am I completely wrong?
Thanks again
Robin

Movie Clip Added Using AddChild() Plays Animation Before Loaded To Main Timeline...
In my main timeline I have a movie clip (cursor_mc) that is loaded from the library using addChild(). It works and loads the movie clip, but the animation within cursor_mc is already done. I want the animation to start once the clip is loaded. This should be easy for the action script experts out there, I'm pretty new at this. Thanks for any help!

Targeting The Main Timeline.....
Im having trouble altering which frame the main timeline is on via a button thats within and mc on the main timeline.

So yeah, ive tried having a telltarget that points simply to "_root." and then says gotoAndPlay (260)

I also tried something like

On release
_root.gotoAndPlay (260)

and still it doesnt work.

So how, from a button inside an mc on the main timeline, do i change the frame that the main timeline is on?

Grexen

Targeting Main Timeline
Greetings everyone!

I wonder if anyone can help me, I am trying to tell scene 1 (the top scene) in my Flash movie to go to frame 1 by using a button within a movie.

I am using Flash 5 and I know that the command is quite simple but I've completley forgtotten it and can't remember! Please can someone let me know how?

Many thanks

SA

Targeting MC From The Main Timeline
on my main timeline i have movieclips (with instance names) which set a choice when clicked.
on a seperate AS layer in the main timeline i have:

MCbutton1.choice = 0;
MCbutton2.choice = 1;
MCbutton1.onPress = MCbutton2.onPress=setChoice;

setChoice is a function which does several things, including:
image.unloadMovie();
choice = this.choice;
gotoAndPlay(2);


they work fine.

now, basically, i want to have a 3rd button set the choice as 3, but i want that movieclip-button to reside inside another MC. (so in other words, the instance name of MCbutton3 would be located inside the "Container" MC, which is located on the main timeline).

i have tried setting this up, but it's not working for me. how would i write the 3rd button into the main timeline code ?

i've tried this, but no luck:

MCbutton1.choice = 0;
MCbutton2.choice = 1;
_root.container.MCbutton3.choice = 3;


thanks for any help!

Targeting The Main Timeline
Trying to make the switch from AS2 to AS3 and like many before me, becoming confused.

I've laid out three movieClips on my main timeline (named, "main") and spaced them five frames apart, nice and tidy, like I like to do. Each frame on the main timeline containing a movieClip has been given a unique frame label. My problem is, I want to have the movieClips jump to the next targeted movieClip on the main timeline after clicking a button, or upon entering the last frame of its predecessor, in some cases. In AS2 the was easy to do this was by using the gotoAndPlay function and targeting to the_root timeline. Now I can't figure out what to do. I can make any button inside a movieClip target a specific frame within that same mc, but cannot make a jump to the main timeline to play the next movieClip.

What am I missing here? I'm a noobie at AS3 and fumbling my way forward. (should be obvious now) Is there a simple way to refer back to the main timeline, which is only one level up? What am I missing?

Here's as far as I got with the AS3 code within the mcs:

stop();

cont5_mc.addEventListener(MouseEvent.CLICK, onClick2);

function onClick2(event:MouseEvent):void
{
trace("test");
}

cont5_mc.buttonMode = true;

The trace function runs true so it's a matter of telling the player how to get to the main timeline and frame label.

TIA for your help, all you flashy genius . . . Speak to me like I am a three year old. -grin-

thokitts

Tell Targeting An Mc On Main Timeline
hello people,
i have a problem with tell targeting. basically i have two mc on the main timeline and one(MC1) has a button burried in it. i want that button to tell the other mc (crystal) to play a label "editions" inside it.

my code is:

on (release) {
_root.crystal.gotoAndPlay("editions");
}

but it only works when the crystalMC is on the first frame of the root.

is there a way of telling the root to move to the position of the first mc and then play a label inside that mc?

any help greatly appreciated

Tell Targeting An Mc On Main Timeline
hello people,
i have a problem with tell targeting. basically i have two mc on the main timeline and one(MC1) has a button burried in it. i want that button to tell the other mc (crystal) to play a label "editions" inside it.

my code is:

on (release) {
_root.crystal.gotoAndPlay("editions");
}

but it only works when the crystalMC is on the first frame of the root.

is there a way of telling the root to move to the position of the first mc and then play a label inside that mc?

any help greatly appreciated

Same Old Targeting Main Timeline Problem
Hey,

This should be working but it doesn't..

I have 1 scene with 2 movie clips. one movie clip is nested inside the other one. When the timeline of the 2nd nested movie clip reaches its end, i want it to go back to Scene one on a frame i've labelled "home".

I have:

tellTarget ("_root.") {
gotoAndPlay ("home");
}

instead of doing so, it just loops over and starts playing in that same movie clip.
this is getting frustrating! i know it should be something easy to do.
thanks

Targeting Main Timeline From Button In Mc
I need help. I am constructing a web site in MX. I place a drop down menu in a movie clip to keep it from affecting the main timeline . I am unable to successfully target frames lables in the main timeline from the movie clip.

Targeting Main Timeline From External .swf
I am creating a looping movie that will load external .swf's into an empty movieClip (display_mc). I want to be able to have the external .swf target the main timeline once the .swf ends. I am putting script on the last frame of the external .swf attempting to target a specific frame on the main timeline. However, it isn't functional. Any suggestions on how to accomplish this will be greatly appreciated.

Sample Code:
MainTimeLine - Frame 1 = _root.loadMovie("external.swf",display_mc);
ExternalTimeLine - LastFrame = _parent.display_mc.gotoAndStop("frame");

[F8] Targeting Main Timeline From Movieclip
Does anyone know how you would target the main timeline from a movie clip placed on the main stage? I have one of those news / text scrollers as a movieclip placed on the main stage with buttons inside of it—I want to have that button load a .swf into a container on the main timeline outside the movieclip, is this possible? Thanks for the help.

Targeting MC On Main Timeline From An AS File
Here's the setup. I have two MC's on the main timeline. Also on the main timeline, I am creating an object from an external class. I would very simply like to control the "visible" property of the two MC's from the new object. How do I reference these MC's in the class's file? I've tried using "parent.next_mc.visible", but I'm not getting there. Any suggestions or do I need to include more info?

Targeting Main Timeline From External SWF..
I have imported an external SWF into my main movie timeline which contains buttons. How do I target a frame on my main movie timeline from the external file? I've tried
on (release) {
_root.gotoAndStop(5);
}

I know this should be simple - can someone help please??

Targeting Main Timeline From AttachMovie (help)
'ello 'ello!
I'm working on this project, where i attach movies to an empty movieclip. In these attached movies, i have a button that needs to target a function on the main timeline.
Example:

on the main timeline, i have an action that loads a bitmap onto the background: loadBitmapSmoothed("background.jpg",bg_con);
On the main timeline, i also have a button with following action:
on(release){
this.mc_holder.attachMovie("MC_products",1);
}

Then, in the attached movieclip i have a button that needs to swap the image previously loaded into the 'bg_con'-movieclip, like thus:
on(release){
_root.loadBitmapSmoothed("product_1.jpg",bg_con);
}

For some reason, this doesn't work. I've also tried using _level0. but nothing happens. Any good ideas anyone?
Any help is welcome, i shall bow in respect to anyone who might come up with a solution.

cheers

Mikz

Targeting Main Timeline From A Higher Level
Hello,

Does anyone know how to target the maintime from a movie loaded into level 1? I want the main movie to go to frame 3 when I click a button in an swf loaded in level one. I tried saying:

blahblah_btn.onRelease = function() {
_root.gotoAndStop(3);
}

This code is on the timeline (actions layer) of the movie in level 1. It doesn't work. The main movie still stays in frame 1. Do I need to specify level 0 somehow? How do I say this?

Thanks!
Mary

Targeting A Frame Within An Mc On The Main Timeline From A Button In Another Mc
I'm sure you all find this quite simple, but I just can't figure it out!
Please Help!

I have two mc's on the main timeline

In one mc(agendaClip)I've got a button
In another mc (navLoopOnOff) I've got two frames

Now I would like to point to the second frame in the mc "navLoopOnOff" from the button within the mc "agendaClip".

How do I do that?

(I'm using flash MX 2004 pro)

Thanks a bunch!

Leoni

Targeting A Movieclip's Frame From The Main Timeline
Hello,

As stupid as it might seem. I am having a lot of trouble in targeting a movie clip's(that is placed within the main timeline, scene 1) specific frame from a bottom that exists in the main timeline.

I have created a button, and I want to make the button(placed on the main timeline, scene 1 - not nested) simply to goandplay a movie clip. Yet somehow nothing occurs.

Here is the code for my button. "movieClip1" is the name of an instance of my movieclip called "Intro". the number 115, the frame I want it to start at.

on (release) {
_root.movieClip1.gotoAndPlay("115");
}

Can someone please help me?

Thank you

Jaime Nacach
jaimenacach@yahoo.com

Problems Targeting Main Timeline From Within Movieclips
Hello there,

I am trying to modify a slidemenu script but don't really know how to accomplish it. The sliding menu is horizontal and slides each direction according to the mouse position. Basically, all I want is for the thumbnail photo buttons in the menu to open the corresponding photo larger above the menu. I have a series of buttons within three mcs. (this is necessary for the sliding script to work). In the original script, the button name is targeted to a label with the same name in a new scene.

The code on the button is:

on (release) {
gotoAndStop("/:" add eval("..:text"));
// THIS goes to the FRAME with the name of the button you just clicked on.
}

The MC code is:

// --------------------------------------------
// tmi=total menu items
// dup=new movie duplicates
// butn=original movie button
// --------------------------------------------
// FIX original Button:
butn:text = /:Menu0;
while (Number(n)<Number((/:tmi*2)-1)) {
n = Number(n)+1;
dup = "butn" add n;
duplicateMovieClip("butn", dup, n);
setProperty(dup, _x, Number(getProperty(dup, _x))+Number(n*getProperty(dup, _width)));
setProperty(dup add "/b", _x, getProperty (dup add "/b", _x) + (1));
set(dup add ":n", n);
// assign button name from variables
if (Number(n)<Number(..:tmi)) {
set(dup add ":text", eval("/:Menu" add n));
} else {
set(dup add ":text", eval("/:Menu" add (n-/:tmi)));
}
}


The problem I am having is that I don't want to go to a new scene ( because I am only loading photos) but would like to target a label on the main menu. I have tried many ways including (my label is named "one"):

on (release) {
_root.gotoAndStop("Main" "one");
}

on (release) {
_root.gotoAndStop("one");
}

on (release) {
gotoAndStop("Main" "one");
}
on (release) {
_level0.gotoAndStop("one");
}

But none of these work. There must be a way to do this no? Please someone enlighten me! I have been going crazy for three weeks now trying to figure this out.

Thanks very much for your support,

Niki

Targeting A Frame Label On The Main Timeline
Hi guys,

basically, i have made a menu (a movieclip) to navigate around a small application i am using, and i would like the links in this movieclip to point to various frame labels on the main timeline.

I have tried to use the

Code:
parent.movieclip.gotoAndPlay("frameLabel");
command inside the function that has the CLICK event listener attached to it, but for some reason it will not do it!!

i hope this makes sense and any help will be greatly appreciated!!

Thanks in advance

Rob

Targeting A Frame Label On The Main Timeline
Hi guys,

basically, i have made a menu (a movieclip) to navigate around a small application i am using, and i would like the links in this movieclip to point to various frame labels on the main timeline.

I have tried to use the Code:

parent.movieclip.gotoAndPlay("frameLabel"); command inside the function that has the CLICK event listener attached to it, but for some reason it will not do it!!

i hope this makes sense and any help will be greatly appreciated!!

Thanks in advance

Rob

Targeting Btns From Main Timeline Frame Script
Hello,
I'm trying to put my actions on the first frame, rather than on the buttons themselves. In this below example, the soundOff btn works, but the soundOn doesn't. (works fine when I attach the script to the button)
code:

//sound off button
this.sound_mc.soundOff_btn.onRelease = function()
{
_root.sound_mc.gotoAndPlay(2);
stopAllSounds();
//updateAfterEvent();
};

//sound on button
_root.sound_mc.soundOn_btn.onRelease = function()
{
_root.sound_mc.gotoAndPlay(1);
miltSound.start(0, 9999);
//updateAfterEvent();

};



(soundOff_btn is in the first frame of the sound_mc movie clip, while soundOn_btn is in the 2nd.)

I've used the targeting built into the actionscript window (so I know I'm not typing in anything wrong), tried absolute instead of relative, but it's not getting the message. Thanks for any tips!

Targeting Sections In Main Timeline From Separate Menu SWF?
Hello,

Site: http://leayah.com/leayah2.html

Not entirely new to Flash but still learning Actionscript.

I made a site, but the menu isn't loading properly. If you reload the page the menu loads, but not sure why not loading every time.

Right now menu and site sections in main SWF file. Maybe I put the menu into a separate SWF file it would load properly?

If the site sections are in the main SWF timeline, then how do I do the actionscript for the menu buttons?

Ie)
menu in level7
main site in level0
site sections are "product section", "about us section", "glossary section" on main timeline

So I'm not loading any SWFs, just moving between sections on main timeline.

Help please...

Targeting A Frame Label On The Main Timeline From Inside MC
Hi guys,

I'm trying to use a goto and play function in AS3 and i am inside a movie clip... is there any way to target a frame label on the main timeline from the actionscript inside this movieclip??

thanks in advance!!

Rob

Loading A Movie From A Movie On Main Timeline, To A Specific Frame On Main Time Line
I need help loading a movie from a button in a movie on the main timeline. To a specific frame on the main timeline.
i.e. I have a navigation movie, in it is a load of buttons. I want to load separate movies to a blank movie on a specific frame on the main timeline.
I guess I am having target problems, I can load the movie in the main timeline, but not the frame i want it or the the blank movie in that frame.

Command To Main Timeline From "loaded Swish Movie"?
How do I get a command to main timeline from "loaded swish movie" from inside the (external) swish movie?

Can anybody help me...

Michiel

Targeting Root Timeline From Loaded .swf?
OK, here's what I'm doing -

from within an external .swf loaded, into _level1 of my main timeline,
I'm scripting:
stop()
_level0.gotoAndStop(10)

I'm successfull in communicating this command to the main timeline,
the problem is that this command is also being performed on the timeline of the external .swf - not what I want to have happen.

How do I perform this command on the main movie without effecting the timeline of the external .swf?

Thanks

Target Main Timeline From A Loaded SWF
I'm trying to target an MC on the main timeline from a loaded SWF. How is this done? "_root.mcName" doesn't seem to be working. Is this not possible? When the SWF is loaded into the main movie. The SWFs timeline is "_parent", and I thought "_root" would be used for the main movie timeline.

?????

[MX] Control Main Timeline From Loaded SWF
I have a question for everybody who's past the newbie stage :-)

I have a flash movie (mainmovie.swf) that stops wht a stop action at frame 10.

At frame 10 there's a MC (box1) that is used to load another movie (movie1.swf).

I want to place an action at the end of movie1.swf, that tells the playhead to go to frame 11 in the mainmovie (mainmovie.swf).

How can I do this?

The reason that I use a MC to load a another movie instead of loading it in another level is that in this way its easier for me to position stuff.....

Can anybody help me out please?
Thanx..

Controlling Main Timeline From Loaded Swf.
I have a index.swf loaded into a level on my main timeline.

loadMovieNum (index.swf, 2)

This loades fine. I need the index.swf to stop the main timeline it is loaded in. this is the code i have used before and it worked, this time it does not.

on (release) {
_root.level0.stop();
}

Please help. thanks

Dawn

Controlling The Main Timeline From A Loaded MC
Hi guys... im back i asked this question the other day and the solution i got didnt quite work so i decided to repost and be as descriptive as possible -my problem is i have my main movie "TuffSite" and in it i have various scenes... into which i have empty movie clips that will hold various parts of my design in movie clips on my stage, in this case, i have my "menu_clip" loading into "menu_holdr" and in "menu_clip" i have my buttons -id like them to effect "TuffSite" lets say i want a button to go to and play frame 1 of a scene called Design in the main movie "TuffSite" i'll paste the code bellow but i owondering if the fact that im loading a movie clip into a movie clip and tryin to effect a movie a couple of layers up? i used to the following code which seemingly should work:


on (release) {
_root.TuffSite.gotoAndPlay("Designs")
}


as i understand it the root is refering to my main movie... so the only reason i can think of is that i've missed a "level" or something -any ideas, im gettin pretty Freaked out man!!!

Loaded Swf Communicating With Main Timeline
Hi Everybody,

I have posted and searched all over for an answer to this problem, but have had no luck. I’m hoping you can help. I have set up a gallery of graphic design work. I want to be able to click on a small version of each piece in the gallery and have it “grow” into a larger version. Then when that larger version is clicked, I want it to shrink back down and return to the submenu.

I have been able to make it so that when the small version is clicked, it loads a swf of that piece“growing” into the larger version. And when the larger piece is then clicked, the timeline jumps to another keyframe on the swf and “shrinks” the piece.

What I would like to happen is that when the swf reaches the last frame, it jumps to the submenu on the main timeline, but I’m having trouble making the timeline of the loaded swf communicate with the main timeline.

I think the problem has to do with adding the Child to the stage, but if I don’t add the swf to the stage, it doesn’t show up.

Thanks so much in advance for your help!

Here is the code:

//This loads the swf file that shows the piece enlarging and shrinking.

var requestBigEngine:URLRequest = new URLRequest("bigEngine.swf");
var bigLoader:Loader = new Loader();
bigLoader.load(requestBigEngine);

//This listens for the completion of the load of the swf and starts the function "bigEngineLoaded" which puts the swf on the stage and makes a movie clip (bigEngineMC) out of the loaded swf so its timeline can be controlled.

bigLoader.contentLoaderInfo.addEventListener(Event .COMPLETE, bigEngineLoaded);

function bigEngineLoaded(myevent:Event):void {
var bigEngineMC:MovieClip=myevent.target.content;
stage.addChild(bigLoader);


//When the enlarged piece is clicked, it "shrinks" and the viewer is returned to the submenu

bigEngineMC.addEventListener(MouseEvent.CLICK, gobacktoSubMenu0_0);

function gobacktoSubMenu0_0(evt:Event):void {
bigEngineMC.gotoAndPlay("engineShrink");
}

//This is what doesn’t work:

if (bigEngineMC.currentLabel == "gobacktoSubMenu0_0") {
parent.gotoAndPlay("printSub0_0");
bigLoader.unload();
}
}

Accessing Main Timeline From Loaded Swf
Hi all,

I'm running into a timeline/display list problem.

Inside my main movie ("main.fla") I am loading a swf ("sub.swf"). I'd like sub.swf to control the main.fla timeline. I've researched and tested a number of methods but haven't had any luck.

I'm currently using this line.


ActionScript Code:
MovieClip(root).gotoAndStop("btn_advertising");

Thank you,
Joe

Copyright © 2005-08 www.BigResource.com, All rights reserved