Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > ActionScript Forums Group > ActionScript 1.0 (and below)

Reply
 
Thread Tools Rate Thread Display Modes
Old 08-27-2004, 05:47 PM   #1
mjs2020
Registered User
 
Join Date: Aug 2004
Posts: 2
Default loadmovie _root and levels problem

Hi,
I'm loading an external swf file into a mc placeholder with the following code:

mc1.loadMovie(cliptoload.swf);

cliptoload.swf has plenty of actionscript in it and often it refers to "_root" which sould be interpreted as cliptoload.swf 's root, not mainfile.swf's root (which would be _level0).
All my actionscript with "_root" (in the loaded clip) is not being interpreted correctly. Am I missing somethig?
I'm on Flash MX (ver 6)...
thanks for any help
mjs2020 is offline   Reply With Quote
Old 08-27-2004, 06:08 PM   #2
Curly Brace
Rock is alive!
 
Curly Brace's Avatar
 
Join Date: Jun 2004
Location: Russia
Posts: 603
Send a message via ICQ to Curly Brace
Default

Howdy and Welcome... (as one unfamiliar person says)

So, what's wrong? Movie not loads, as not execute?
Curly Brace is offline   Reply With Quote
Old 08-27-2004, 06:14 PM   #3
oldnewbie
Banned by AS.org Staff
 
Join Date: Mar 2002
Posts: 10,533
Default

First, you should have double quotes on your swf's name...

mc1.loadMovie("cliptoload.swf");

Second, no, using loadMovie and loading your movie in a container clip (mc1), references to _root, will not refer to the _root level of the cliptoload.swf, but to the _root level of your main movie.

Either change all your references to _root ( in cliptoload.swf ) to this and/or 1 or more _parent, or load your movie on another level of your main movie - loadMovieNum("cliptoload.swf, 5); - where no script changes would be necessary, references to _root now, and only now, refering to the root level of the loaded movie, as opposed to the root level of your main movie, which would now in fact be _level0.
oldnewbie is offline   Reply With Quote
Old 08-28-2004, 12:44 AM   #4
mjs2020
Registered User
 
Join Date: Aug 2004
Posts: 2
Default

Thanks oldnewbie, your answer was clear and very useful.
The reason i'm loading into a container movieclip (mc1) is for masking and overlaying purposes. Loading into a new level will overlay cliptoload.swf on top of my main movieclip which is not what I want.
I guess the best thing to do is to go change all the _root's to relative paths with "_this" and "_parent"...
thank you vey much for the help anyhow!
mjs2020 is offline   Reply With Quote
Old 09-16-2004, 06:27 PM   #5
xefrx
Registered User
 
Join Date: Sep 2004
Posts: 14
Default loadMovie isn't working the way i want it to.

ok....i'm really new at this, but i have been getting the hang of flash. this is my dilemma. i have two swf files now.. a main, and a target. when published, i have moved and resized them to be side by side the way i like. i would like it when i click on a button on the main, the target movie changes to another movie. i know i need to use loadMovie and change the level. i did so in the action of the button on the main. but it loads the new swf inside the main.. not the target. how do i get it to direct it to the target's url? i would greatly appreciate it if someone could help me out.
thanks.
xefrx 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 07:36 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.