Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 01-18-2010, 03:43 PM   #1
inertiat
Registered User
 
Join Date: Jan 2010
Posts: 4
Default [AS2] Loading root directory

Hi, if I have this script:

loadMovie("mymovie.swf");

applied to a button in a swf called movie1, with a file structure that looks like this:

Root:
-mymovie.swf
Folder 2:
-movie1.swf

What line of code do I use to make Flash look back one folder and load mymovie.swf? I don't know how to make it look back 1 folder to the root and load the movie from there.

I can't use the full path of my HDD because these files will be burned to a CD and so C:/My Desktop (which is the root folder btw) won't exist any more. Instead I just need to tell Flash to 'look back one folder'. Is this possible?

Many thanks
inertiat is offline   Reply With Quote
Old 01-18-2010, 03:53 PM   #2
fulanitok
Member
 
fulanitok's Avatar
 
Join Date: May 2005
Location: Belgium - Ghent
Posts: 72
Default

Hei inertiat,

So if I understand you the "folder 2" is into the "root" folder.

Why not just put the "movie1.swf" into the "root" and the "myMovie.swf" into the "folder 2".
fulanitok is offline   Reply With Quote
Old 01-18-2010, 04:00 PM   #3
inertiat
Registered User
 
Join Date: Jan 2010
Posts: 4
Default

Hi fulanitok, thanks for the reply.

I can't do that because basically, mymovie.swf is my portfolio of work. So when the client loads the CD all I want them to see is mymovie .swf and this folder2 which is where all my external content is loaded from. movie1.swf is one of those pieces of work which is to be loaded externally. That piece of work has an exit button, which when pressed I want it to load mymovie back up again, which requires it looking back to the root folder.

I have tried loading the content into a container in mymovie but the playback is very sluggish and it is more desirable for me to open a new swf and then reopen the mymovie from that swf when its finished with. Is it possible to make it look back one folder?
inertiat is offline   Reply With Quote
Old 01-18-2010, 04:06 PM   #4
fulanitok
Member
 
fulanitok's Avatar
 
Join Date: May 2005
Location: Belgium - Ghent
Posts: 72
Post

Hei man,

Why not just make a empty .exe where all will be loaded from "folder2", "myMovie.swf" and "movie1.swf" as well.
fulanitok is offline   Reply With Quote
Old 01-18-2010, 04:24 PM   #5
inertiat
Registered User
 
Join Date: Jan 2010
Posts: 4
Default

You sir are a genius!
Thanks so much!
inertiat is offline   Reply With Quote
Old 01-18-2010, 05:14 PM   #6
inertiat
Registered User
 
Join Date: Jan 2010
Posts: 4
Default

Actually, I have a problem unfortunately.
Loading mymovie.swf from the empty .exe works fine, but when I click on a button to load movie1.swf the window just goes white.
This is odd because if I play mymovie.swf directly, I can go back and forth from mymovie.swf and movie1.swf.

This is what my code looks like:
For the empty .exe I have this placed on the first frame of the timeline:
loadMovieNum("Folder2/mymovie.swf", 0);

In mymovie.swf I have this on the button to go to movie1.swf:
on (release) {
loadMovieNum("movie1.swf", 0);
}

And in movie1.swf I have this on the button to go back to mymovie.swf:
on (release) {
loadMovieNum("mymovie.swf", 0);
}


Any help would be great. I'm using AS2. I'm not a coding master so I don't know exactly what I'm doing
inertiat 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 On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:01 PM.

///
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.