Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 05-04-2005, 12:45 PM   #1
swamyg1
Registered User
 
Join Date: May 2005
Posts: 8
Cool Menu on external swf to load other swfs on main.swf

Heya,

I'm having a hard time figuring out how paths work and can't find a specific tutorial anywhere for my situation. I have a external swf containing a menu called menu.swf... this loads immediately with my main. When I click on a button I am trying to load another external swf into the main... How do I write for the code for the button and how do I path it back to the main? For example, say the movie clip I want to load on the main is called baby.swf with the instance name baby1...

This is what I am doing and it doesn't work, for the button inside menu.swf:

on (release){
_root.baby1.loadMovie("baby.swf", 2);
}

On my main timeline I have the code for the container like this:

createEmptyMovieClip("baby1_holder", 2);
baby1_holder.loadMovie("baby.swf");


I have a stop on the first frame of the baby1 movie.

Please let me know if I am on the right track here...

Thanks!

Last edited by swamyg1; 05-04-2005 at 04:24 PM.
swamyg1 is offline   Reply With Quote
Old 05-04-2005, 06:43 PM   #2
Barn
digital curmudgeon
 
Barn's Avatar
 
Join Date: Feb 2005
Location: http://www.were-here.com
Posts: 1,082
Default

I'm curious to know what you expect the "2", the second parameter of your button event's loadMovie method, to do?

I'm also not clear on your structure.

What movie is loaded into _level0?

Into what movieclip instance or level is menu.swf loaded?

And are you really trying to load the same movie baby.swf into two different movieclip instances on the _root of _level0?
Barn is offline   Reply With Quote
Old 05-05-2005, 02:11 AM   #3
swamyg1
Registered User
 
Join Date: May 2005
Posts: 8
Default

Heya,

Thanks for getting back to me... Ok, to answer your questions. I don't expect anything to happen with that 2, it shouldn't have been there. My structure is as follows... I have a main.exe with a backgound rust.exe AND menubar.exe that loads immediately on initial load. On button press I would like to pull up other backgrounds (green.exe) that lay over my rust.exe but under my menubar.exe. So, menubar.exe is located directly in the main. Is it possible to do this? I would like for these backgounds to be pulled up on my main.exe, not on my menubar movie... I don't think I have the structure right.

Attached is the FLA for what I am trying to do... it would be great if you could take a look, maybe there is a better way to do this.

Thanks for your time!
Attached Files
File Type: zip FORUM.zip (48.8 KB, 486 views)
swamyg1 is offline   Reply With Quote
Old 05-05-2005, 02:59 AM   #4
digitalMarytr
Registered User
 
Join Date: Mar 2005
Posts: 15
Default loading swfs and control

ok give this a shot try using the MovieClipLoader() object.
the syntax is like this

_root.createEmptyMovieClip("menuHolder_mc", 1)
//declaration of loader
my_mcl = new MovieClipLoader();
my_mc.loadClip("menu.swf", "menuHolder_mc"):

as far as the button script getting thru the right path. your going to need to use the same function. but write it as a function for the button... dig?

chad
digitalMarytr is offline   Reply With Quote
Old 05-05-2005, 01:01 PM   #5
swamyg1
Registered User
 
Join Date: May 2005
Posts: 8
Default huh?

Unfortunately, I have never been the sharpest tool in the shed... I have gotten by so far in Flash but I'm not really sure what you mean by:

"as far as the button script getting thru the right path. your going to need to use the same function. but write it as a function for the button"

Whenever I put the script you gave me into the main.exe I get errors in the syntax. Is there anyway you can guide me to a live example?

Thanks!
swamyg1 is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:35 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.