Blog Archives
Flash and Silverlight Coverflows
After reviewing a few different flash coverflows, stumbled across the following:
Flash gallery:
http://flash-gallery.com/?c=104&gclid=CPTvuPDCj6cCFUHt7QodfwQFbw
Weber Design Labs:
http://www.weberdesignlabs.com/blog/2007/09/flash-itunes-cover-flow-version-2/
Flash XML:
http://www.flashxml.net/cover-flow.html
Flash Components.Net:
http://www.flashcomponents.net/components/flash_galleries_and_slide_shows/flash_stack_and_coverflows.html
If you’re not opposed to silverlight however, I encourage you to check this one out by Telerik:
http://www.telerik.com/products/silverlight/coverflow.aspx
Load External HTML file in CS5
Upon initial google search for the above title phrase, I came across no results! Only after resorting to my second search avenue (Google Books :)), did I then stumble across “The CS5 bible“.
Thanks to the brilliance of Google Books, I was able to read through only the chapters I needed (you rock Google!) and discover the solution I was actually looking for was – Adobe Air.
Adobe Air allows you to embed HTML as well as other content within the html, such as JS and additional flash files all within a flash framework allowing you to utilize actionscript and other traditional elements. The end result is now an extremely portable flash file which acts as a wrapper or window to your web application. This is also now very easy to port into a standalone out of browser application using the “projector” functionality of CS5.
The code:
var container:Sprite;
var html:HTMLLoader = new HTMLLoader;
html.width = 400;
html.height = 600;
var urlReq:URLRequest = new URLRequest("http://www.adobe.com/");
html.load(urlReq);
container.addChild(html);
References
Google Books, http://books.google.com/
Amazon, http://www.amazon.com/Photoshop-Bible-Lisa-DaNae-Dayley/dp/0470584742
Adobe Air, http://www.adobe.com/products/air/
Adobe LiveDocs, http://livedocs.adobe.com/flex/3/html/help.html?content=ProgrammingHTMLAndJavaScript_02.html
Load SWF from Fla file CS5
The title of this blog was my initial search in google upon looking for a way to load and play an external SWF file inside a new FLA project file.
In AS2, I recalled this was easily achieved using MovieClip, however, Adobe has deprecated this functionality in favor of the newer AS3 concept of “loader” objects.
See syntax below and references for helpful links:
var myLoader:Loader = new Loader(); addChild(myLoader); var url:URLRequest = new URLRequest("filename.swf"); myLoader.load(url);
Slightly less orthodox, but code below works also. Note URLRequest can point to a local file or a remote SWF file on the web.
swfLoader = new Loader(); swfLoader.load(new URLRequest("filename.swf); addchild(swfLoader);
Can also be done using UI Loader:
import fl.containers.UILoader; var myUILoader:UILoader = new UILoader(); myUILoader.source = "Rich Investor.swf"; myUILoader.move(0, 0); myUILoader.scaleContent = false; addChild(myUILoader);
Using Adobe Air in publish settings:
package { import flash.display.Sprite; import flash.html.HTMLLoader; import flash.net.URLRequest; public class HTMLLoaderExample extends Sprite { public function HTMLLoaderExample() { var html:HTMLLoader = new HTMLLoader(); var urlReq:URLRequest = new URLRequest("Rich Investor.htm"); html.width = stage.stageWidth; html.height = stage.stageHeight; html.load(urlReq); addChild(html); } } }
References
Load external SWF files into Flash Player, http://kb2.adobe.com/cps/141/tn_14190.html
Creating new MovieClips in ActionScript 3.0, http://blogs.adobe.com/pdehaan/2006/07/creating_new_movieclips_in_act.html
Loader vs MovieClip http://forums.adobe.com/thread/434686?tstart=1
Loader vs. UILoader, http://www.kirupa.com/forum/showthread.php?t=283920
Getting Started with AS3 and Flash CS3, http://www.actionscript.org/resources/articles/636/2/Getting-Started-With-AS3-and-Flash-CS3/Page2.html
UI Loader, http://www.gotoandlearnforum.com/viewtopic.php?t=17761
MovieClip (object) http://www.adobe.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dictionary505.html
Loading a .swf file into a .fla file, http://www.flashmove.com/forum/showthread.php?t=9318
Add video to Flash, http://help.adobe.com/en_US/flash/cs/using/WSb03e830bd6f770ee-70a39d612436d472f4-7ff8.html
Externally loading SWF into movie clip, http://www.actionscript.org/forums/showthread.php3?t=156851