Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Modifying a .fla outside flash

Status
Not open for further replies.

flagusco

Instructor
Aug 11, 2003
4
US
I don't know if this has been addressed, but I have what I think is a fairly complicated question.

I have been using flash professionally for about a year now, and I know it pretty well. I am primarily an artist, but I do understand the structure of Actionscript and can get through most things fine.

My question is this:

I want to set up a main timeline that has 50 frames which is basically a slide show. Then what I want to do is to be able to have a script or some other program build the FLA so that It will have just the number of frames I want at any given time. so lets say I only want 20 frames instead of 50, but I don't want to have to open the main timeline because everything in the main movie loads dynamically using LoadMovie. Is this even possible? Or am I always stuck with opening the main movie, setting the number of frames and recreating the swf each time? any help is much appreciated. Thanks.
 
Can't you use XML to do this. I think ColdFusion has support to do what you want, if you have access to a server running ColdFusion.
 
That's a possibility. I read something about arrays also. Would it be possible to have an array set up in a text file, yet have buttons that simply point to the next item in the array, and when it gets to the end, loop back to the first item in the array?

Im not much of a programmer, so if there is a good tutorial that explains how this can be done, that would be awesome.
 
your idea of using text files and arrays is the simplest solution


text file

&images=one,seven,saturday&


flash

lv = new Loadvars()
lv.onLoad = function(){
myArray = lv.images.split(",");
}
lv.load("Image.txt");

my_btn.onRelease = function(){
gotoAndStop(myArray);
i++;
if(i>images.length)i=0;
}


just make sure all the frames you will want to go to in the fla have labels and its those frame labels you will add to text files.
 
Bill! Bill! Cleverness!
italicizes your post unless you use code tags or uncheck "Process TGML" at the bottom of the post window!
Remember?

They must be having a lot of fun around their table!

Regards,

cubalibre2.gif

[bigcheeks] I'm Bill Watson's biggest fan!
[bigcheeks]
 
This looks like the best solution. Thanks for the tips.
 
With that faulty displayed syntax? Yes, I guess it would!

Regards,

cubalibre2.gif

[bigcheeks] I'm Bill Watson's biggest fan!
[bigcheeks]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top