Home Tutorials Forums Articles Blogs Movies Library Employment Press Buy templates

Go Back   ActionScript.org Forums > General > Animation and Effects

Reply
 
Thread Tools Rate Thread Display Modes
Old 02-21-2002, 04:40 PM   #1
lizuka
Registered User
 
lizuka's Avatar
 
Join Date: Feb 2002
Location: france
Posts: 21
Default load movie disaster

hi there!
I'm trying to load maroc.swf into pixs.swf but once it's loaded, maroc.swf's script doesn't work anymore.

script in maroc.swf (which is a diaporama):

on (release){
_root.tophs.play(_currentFrame+1);
if (_root.tophs._currentFrame==11) {
_root.tophs.stop ();
}
}

on (release){
_root.tophs.prevFrame();
}
lizuka is offline   Reply With Quote
Old 02-21-2002, 10:36 PM   #2
pixelwit
village halfwit
 
pixelwit's Avatar
 
Join Date: Jul 2001
Location: USA, PA
Posts: 3,188
Default

You probably loaded your SWF into a target clip. This means any reference to the "_root" will resolve to the _root of the timeline the SWF was loaded into (probably _level0). To overcome this load your movie into a level (rather than a target clip) or remove all references to _root in the SWF you are loading.

Hope it helps,

-PiXELWiT
http://www.pixelwit.com
pixelwit is offline   Reply With Quote
Old 02-21-2002, 10:40 PM   #3
Billy T
Oops I did it again
 
Billy T's Avatar
 
Join Date: Oct 2001
Location: Melbourne
Posts: 8,578
Default

did your post get cut off? if you are pasting code from flash use the # button up the top

anyway your problem is probably due to your paths. Where did you load the movie into? level 1?

change all the _root to _level1 and see how you go...

cheers
__________________
Billy
Online Galleries
Free Flash Video Tutorials
Photo Website Template

Don't email or PM me questions...
Billy T is offline   Reply With Quote
Old 02-22-2002, 02:22 AM   #4
apprentice
Member
 
Join Date: Jan 2002
Location: San Bernardino, CA
Posts: 75
Default

Quote:
Originally posted by pixelwit
You probably loaded your SWF into a target clip. This means any reference to the "_root" will resolve to the _root of the timeline the SWF was loaded into (probably _level0). To overcome this load your movie into a level (rather than a target clip) or remove all references to _root in the SWF you are loading.
I'm also having the same problem. I'm confused here (as I'm still relatively new to scripting). What exactly is the difference between loading the movie into a level vs. a target clip? Isn't a target clip itself in a level other than the _level0? I tried removing all references to _root in the SWF I loaded, but still couldn't get it to work.
apprentice is offline   Reply With Quote
Old 02-22-2002, 04:49 AM   #5
pixelwit
village halfwit
 
pixelwit's Avatar
 
Join Date: Jul 2001
Location: USA, PA
Posts: 3,188
Default

Every _level has it's own _root. The root of each level is the level itself. This means the _root of _level0 is _level0. The _root of _level1 is _level1. This means if you load a SWF (swftoload.SWF) into a target clip on _level0 of "main.SWF" all the references to _root in swftoload.SWF will resolve to _level0 which is the root timeline of main.SWF rather than the main timeline of swftoload.SWF.

To make things just a bit more confusing, If you load swftoload.swf into _level1 rather than a target clip on _level0, all references to _root (from within swftoload.SWF) will resolve to _level1 which is the main timeline of your swftoload.SWF. That means all your reference to _root will continue to work without having to alter the code in swftoload.SWF.

Hope this helps,

-PiXELWiT
http://www.pixelwit.com
pixelwit is offline   Reply With Quote
Old 02-22-2002, 05:03 AM   #6
apprentice
Member
 
Join Date: Jan 2002
Location: San Bernardino, CA
Posts: 75
Default

Thanks Pixelwit, I got it working now. Somewhere along the line of my learning I was confusing path levels with _levelX's. What an adventure it's been for me this past week!!
apprentice 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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Created 100% bg movie - how best to load main content (nested mc or .swf)? mskirk Simple Stuff (Newbies) 1 07-30-2004 01:22 AM
Problem With Loading MovieClip Into SUB movie JakeMX Components 2 07-28-2004 11:07 PM
load movie into another movie anbis ActionScript 1.0 (and below) 0 07-27-2004 03:14 PM
load movie specific frame: no solution works jubal44 ActionScript 2.0 3 05-24-2004 10:59 AM
load movie navigation question exactpixel ActionScript 1.0 (and below) 4 09-19-2002 02:38 AM


All times are GMT. The time now is 08:49 PM.


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