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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Loading SWF files into an FLA

Status
Not open for further replies.

CTsang8

Programmer
Jul 18, 2007
1
US
I need to first lay out what I am working with. I have two main files:
index.fla
slideshow_1.swf

First I will explain how I setup the fla for slideshow_1.swf. Each frame in the main timeline contains a different movie clip that plays a picture fading in and fading out. In each movie clip I have the actionscript "_index.nextFrame()" so that it jumps back out to the main timeline after it's finished playing and then moves onto the next frame, entering the next movie clip. When I test the swf files, they work fine.

In the index.fla I have it setup so that each frame represents a different page. Slideshow_1.swf is loaded into frame one. I use the actionscript loadMovie().

Obviously I am arranging things this way in order to minimize the file size of index.fla. Here's the problem: When I test index.fla the first movie clip of slideshow_1.swf plays like it's supposed to, but then it does not continue on to play the rest of the movie clips. Instead it automatically jumps out after playing the first movie clip and then moves on to the following frame in index.fla timeline.

What I believe is happening is that the actionscript _root.nextFrame in the swf's are causing them to jump to the index.fla timeline rather than staying within the slideshow_1.swf. I'm sure there is some kind of way around this, but I simply don't know what it is.

If anyone has the answer, or rather, a more efficient means of setting things up so that my webpages load faster, that would be great. Thanks for all of the help!

 
I think your problem is caused by the use of "_root". If you change _root.nextFrame() to _parent.nextFrame() it should work. (Or use _lockroot, but _root should be avoided really.)

Kenneth Kawamoto
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top