Go Back   Northcode Support > SWF Studio V2 (Closed)
FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Display Modes
Old 2001-07-11, 10:42 AM   #1
DriverDown
Registered User
 
Join Date: Jul 2001
Posts: 19
Unhappy

Oh, man, I need help... I have a huge presentation that we have been developing for quite some time. The powers that be want to put more video into the presentation, and I agree 100% that it improves the product, however, each SWF (the video has been converted using Wildform Flix) video must be set to internal to be called properly.

To explain - the main movie is the only movie that is internal (or this is the plan). It calls between 15-30 SWF files that are set to external in a folder in the SWF Studio layout. These external SWF files then occasionally call smaller size video SWF files into an empty movie clip. And this brings about my problem. So far the only way I have been able to accomplish this last part is by setting these smaller video SWF files to internal and drastically increasing the size of the EXE.

Any ideas?
DriverDown is offline  
Old 2001-07-11, 11:34 AM   #2
DriverDown
Registered User
 
Join Date: Jul 2001
Posts: 19
Well, I think I have it working... finally.

Although I never would have thought this would work... my main movie was always using the FSCommand ORG and putting the result in a variable called path. I would load the movies using something like this:

loadMovie (path+"\\Modules\\FILENAME.swf")

Trouble is, the SWF Studio FSCommands would not work in the external movies and I couldn't think of a way to pass this variable along since the file could really be launched from anywhere... simple solution was this:

loadMovie (_level0.path+"\\Modules\\FILENAME.swf")

Never thought that would work and so never tried it! Surprise, surprise.
DriverDown is offline  
Old 2001-07-11, 11:35 AM   #3
northcode
Tim
 
northcode's Avatar
 
Join Date: May 2001
Location: Ottawa
Posts: 11,873

You can use the ORG command in the first frame of your main movie to create a variable that points to the projector startup directory. This variable is created at the _root level no matter where you call ORG from so you can use it anywhere.

fscommand("ORG", "startdir");

The _root.startdir variable won't be available immediately, it takes a couple of frames for Flash to populate the variable when SWF Studio sets it.

If you don't need to use it immediately you can just wait. If you need it fast you can set up a simple frame loop to wait until it's been populated.

Code:
FRAME1:

   var startdir = "";
   fscommand("ORG", "startdir");

FRAME2:

   // leave this one empty

FRAME3:

   if (_root.startdir == "") {
      gotoAndPlay(_currentFrame-1);
   }

FRAME4:

   // now you can use _root.startdir in your main
   // movie or any movie you load.
Once you know _root.startdir has been populated you can use it to form paths to your movies if you know their locations relative to the projector startup directory.

loadMovie(startdir + "\\my\\other\\movies\\thisone.swf", "/");

You can also use the WHEREIS command to return the path to any item in the Layout but it's more work because you'll need a little frame loop (like above) for each call. WHEREIS always returns it's results in a _root level variable called ssWhereIs.

Here's an example of how to locate and load a movie that's called "mymovie1" in the projec tree. It doesn't matter what the actual file name is or whether it's internal or external, SWF Studio will find it.

Code:
FRAME1:

   _root.ssWhereIs = "";
   fscommand("WHEREIS", "MOVIE mymovie1");

FRAME2:

   // leave this one empty

FRAME3:

   if (_root.ssWhereIs == "") {
      gotoAndPlay(_currentFrame-1);
   }

FRAME4:

   loadMovie(_root.ssWhereIs, "/");
northcode is offline  
Old 2001-07-11, 11:55 AM   #4
DriverDown
Registered User
 
Join Date: Jul 2001
Posts: 19
Thanks again! Did I mention that NorthCode support is also very thorough and helpful?

I did have the first level of external movies working, I just couldn't get the movie clips to load into these first level movies that had already been loaded off the main movie... I was just not aware that you could call that path using _root.startdir or _level0.path and never bothered to try...

DriverDown is offline  
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes