Language: ChineseGermanSpanishFrenchDutchItalianRussian
123 Flash Chat Forums

Go Back   TOPCMM Community > SWFKit > SWFKit Support

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-16-2002, 11:50 PM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default [quote]finding REAL movie path

chaler says:


Quote:

Hi, support team!

Here is my situation. I have a cd-rom presentation with nested structure. "Main" movie - script-based interface 1 frame long and "content" movies loaded by relative paths into "main" movie. So actually I need to find where "main" movie is. Method getAppDir() doesn't work here because it returns weird path in temp directory or I have to pack all "content" in projector to extract there too. So far my solution is:

In SWF Kit:

1. include only main.swf with "pack movies" UNCHECKED.
2. write script appPath

//+++begin of script

//script 1

FlashPlayer.bindData("appPath");

FlashPlayer.updateData(true);
FlashPlayer.appPath = FlashPlayer.movie;

var s = FlashPlayer.appPath;
var b=s.slice(0,s.length-8);
FlashPlayer.appPath = b;

FlashPlayer.updateData(false);
FlashPlayer. unbindData("appPath");

//+++ end of script/

3. build and then copy "content" structure to directory with main.swf (or copy .exe and main.swf for proper paths).

In Flash MX:

1.In first frame of main.swf place script:

//+++begin of script

_root.appPath = "";
fscommand("ffish_run","appPath");
myInterval = setInterval(function () {
if (appPath != "") {
clearInterval(myInterval);
delete myInterval;
_global.appPath = _root.appPath;
delete _root.appPath;
}
}
, 40);

//+++ end of script

2.now to load myMovie.swf into main.swf with loadMovie command:

loadMovie("myMovie", appPath+"myMovie.swf, 1)

That works for me but seems to be little bit tricky for someone not familiar with scripting. Am i miss an easier way?

chaler
Reply With Quote
  #2 (permalink)  
Old 12-16-2002, 11:50 PM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re: [quote]finding REAL movie path

Maybe you can use the "loadMovie" method of the "FlashPlayer" object to load your movie in FFish Script directly, without waiting for value of "appPath".

The new update of SWFKit will come out soon. It supports pack addtional files. You can extract any single file and get path of it conveniently.
Reply With Quote
  #3 (permalink)  
Old 12-16-2002, 11:51 PM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re: [quote]finding REAL movie path

You can also find the movies in this way:

Code:
var movies = getMovies();
var path_of_main_movie = movies[0];
var path_of_content_movie = movies[1];
But you cannot test it in preview mode because in preview mode the "getMovies" method always returns only the first movie in your movie list.

Reply With Quote
  #4 (permalink)  
Old 12-16-2002, 11:51 PM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re: [quote]finding REAL movie path

chaler says:


Quote:

Thanks for quick answers! I think that for now my way is good enough - i'm new to ffish and have enough coding on actioncript side. Waitnig for finding path is not a problem because it will run on initialisation and only once.

BTW, the name "ffish" - is it related to Fred Fish in some way?
Reply With Quote
  #5 (permalink)  
Old 12-16-2002, 11:52 PM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re: [quote]finding REAL movie path

"FFish" is not related Fred Fish,maybe you can related it with "Flash Fish" or what ever you want,
Reply With Quote
  #6 (permalink)  
Old 01-27-2003, 03:24 PM
Junior Member
 
Join Date: Jan 2003
Posts: 7
Default Re: [quote]finding REAL movie path

This is a really important issue and it should be added to the SWFKIT help file with clear examples. You reply:

Maybe you can use the "loadMovie" method of the "FlashPlayer" object to load your movie in FFish Script directly, without waiting for value of "appPath".

This does not work, or we would not have this problem. You also say,

The new update of SWFKit will come out soon. It supports pack addtional files. You can extract any single file and get path of it conveniently.

It is out now but packing additional files makes the projector exe as big as all the files in the project (some 250MB in my case).

The reply:

var movies = getMovies();
var path_of_main_movie = movies[0];
var path_of_content_movie = movies[1];

sounds easier but seems to be lacking a way to get the directory information that leads to the subfolders on the CD. So far only chaler's solution makes sense to but it is complex. Can you explain exactly how to use

var movies = getMovies();
var path_of_main_movie = movies[0];
var path_of_content_movie = movies[1];

???

Vanuatu


Reply With Quote
Reply

Was this information helpful?    Yes No



Thread Tools
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 07:38 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.