Posted by Sankar.G | Posted in AS2 | Posted on 12:31 PM
we can import a SWF file in flash using action script
In AS2.0
code: loadMovieNum("example.swf",0);
it is simple is as2.0 example.swf is a file name & 0 is the level of the file
In AS3.0
code: var ldr:Loader=new Loader();
var urlrequest:URLRequest=new URLRequest("example.swf")
ldr.load(urlrequest);
addChild(ldr);
In as3.0 Loader is used to load a file in flash
urlrequest is used to get the link of the file
addChild is used to add that file to the scene
In AS2.0
code: loadMovieNum("example.swf",0);
it is simple is as2.0 example.swf is a file name & 0 is the level of the file
In AS3.0
code: var ldr:Loader=new Loader();
var urlrequest:URLRequest=new URLRequest("example.swf")
ldr.load(urlrequest);
addChild(ldr);
In as3.0 Loader is used to load a file in flash
urlrequest is used to get the link of the file
addChild is used to add that file to the scene
Comments (0)
Post a Comment