| Home | Tutorials | Forums | Articles | Blogs | Movies | Library | Employment | Press | Buy templates |
|
|
#1 |
|
Registered User
Join Date: Feb 2002
Location: france
Posts: 21
|
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(); } |
|
|
|
|
|
#2 |
|
village halfwit
Join Date: Jul 2001
Location: USA, PA
Posts: 3,188
|
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 |
|
|
|
|
|
|
|
|
#3 |
|
Oops I did it again
Join Date: Oct 2001
Location: Melbourne
Posts: 8,578
|
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... |
|
|
|
|
|
#4 | |
|
Member
Join Date: Jan 2002
Location: San Bernardino, CA
Posts: 75
|
Quote:
![]() |
|
|
|
|
|
|
#5 |
|
village halfwit
Join Date: Jul 2001
Location: USA, PA
Posts: 3,188
|
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 |
|
|
|
|
|
#6 |
|
Member
Join Date: Jan 2002
Location: San Bernardino, CA
Posts: 75
|
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!! |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
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 |