|
| Play multiple flash animation |
 |
Sat, 19 Apr 2008 02:30:24 +000 |
Hi, i would like to randomly play multiple swf files one after one, like
slideshow of swf files
here is what i want:
- load multiple external swf file from a main swf.
- a swf play and when is finish the next one play, i mean the next one have to
wait that the first one is finishing play before playing.
- if its possible, preload the swf file, so the user do not have to wait that
all swf file have to load, i mean loading the first swf file, play it and
preload the next one during the first one playing.
- do all this randomly
the code i attach serve to play one external files, i didnt know how to play
multiple one.
im not sure if the adobe interface attach code correctly, so i pasted here:
import flash.display.*;
import flash.net.URLRequest;
var rect:Shape = new Shape();
rect.graphics.beginFill(0xFFFFFF);
rect.graphics.drawRect(0, 0, 500, 120);
rect.graphics.endFill();
addChild(rect);
var ldr:Loader = new Loader();
ldr.mask = rect;
var url:String = "http://swffile.swf";
var urlReq:URLRequest = new URLRequest(url);
ldr.load(urlReq);
addChild(ldr);
thanks
import flash.display.*;
import flash.net.URLRequest;
var rect:Shape = new Shape();
rect.graphics.beginFill(0xFFFFFF);
rect.graphics.drawRect(0, 0, 500, 120);
rect.graphics.endFill();
addChild(rect);
var ldr:Loader = new Loader();
ldr.mask = rect;
var url:String = "http://swffiles.swf";
var urlReq:URLRequest = new URLRequest(url);
ldr.load(urlReq);
addChild(ldr);
|
| Post Reply
|
|
|
|
|
|
|
|
|
|