ActionScript 2 (AS2) SuperLoader – taterboy
August 13th, 2008 | Filed under: Tips
Here is an AS2 version of the SuperLoader. It works just like the AS3 version found in the Custom HTML Templates post.
Quick Use:
1. Add loaderbar.swf and mainLoader.swf to your current project directory.
2. In the html file for your current project, replace the src and movie parameters to mainLoader.
3. Then add [,'flashVars','swfURL=FlashProjectToLoad.swf'] to the load script.
Example for AC_RunActiveContent:
AC_FL_RunContent( 'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0', 'width', '472', 'height', '280', 'src', 'mainLoader', 'quality', 'high', 'pluginspage', 'http://www.macromedia.com/go/getflashplayer', 'align', 'middle', 'play', 'true', 'loop', 'true', 'scale', 'showall', 'wmode', 'window', 'devicefont', 'false', 'id', 'mainLoader', 'bgcolor', '#000000', 'name', 'mainLoader', 'menu', 'true', 'allowFullScreen', 'false', 'allowScriptAccess','sameDomain', 'movie', 'mainLoader', 'salign', '', 'flashVars','swfURL=imgViewer.swf' ); //end AC code |
Example for HTML Object/Embed:
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="472" height="280" id="mainLoader" align="middle"> <param name="allowScriptAccess" value="sameDomain" /> <param name="allowFullScreen" value="false" /> <param name="movie" value="mainLoader.swf?swfURL=imgViewer.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /> <embed src="mainLoader.swf?swfURL=imgViewer.swf" quality="high" bgcolor="#ffffff" width="472" height="280" name="mainLoader" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /> </object> |
4. If your frame rate is different then 30, you will need to update the frame rate in the mainLoader.fla file.
5. If you are using this loader inside of your Flash movie, you may also need to comment out the line that sets _root to the loading file [mainMC._lockroot = true;].
Demo:
Source Here
|
No comments yet.
RSS feed for comments on this post. TrackBack URL