Loading External SWFs

Loading external SWFs is a pretty easy, very useful way, to help build a Flash site that does not overwhelm the users bandwidth. You may want to build a pretty complex site but you cannot expect the user to download a 3MB SWF to use your site. With the loader you can have the user progressively download parts of the site as they request it.

To start we will be using the Loader Class.

var loader:Loader = new Loader();
var req:URLRequest = new URLRequest();
var url:String = “mySwf.swf”;

req.url = url // we put the url string in the url request

loader.load(req) // load the requested swf

addChild(loader);

Next week I will show your a more advanced way(better) of implementing this.

1 comment so far ↓

#1 Lynne Austin on 05.11.09 at 1:15 am

Приятно, сидя на работе. Отвлечься, от этой надоевшей работы. Расслабиться, и читать написанную тут информацию =)

Leave a Comment