Many thanks for the tip Chris, I decided to try and load the assets via an external xml file as jpgs instead of swfs to make the application as scalable as possible without having to recompile anything as suggested. I still have some way to go, I've got the jpgs loading and positioned where I want them on the stage but am still struggling to:
a) Convert the bitmap to a movieclip - and reference 'linkURL' attribute in the xml file b) add captions - I have two lines that need to be added, one for the title, another for the date. I have followed the advice in the Gaia documentation - loading the assets xml file into the index page in the site.xml file with the following code in my index.as var assetNodes:XMLList = IXml(assets.projectAssets).xml.asset; var designPage:IPageAsset = Gaia.api.getPage("index/nav/design"); Gaia.api.addAssets(assetNodes, designPage); TweenMax.to(this, 0.3, {alpha:1, onComplete:transitionInComplete}); } Then In my design.as file } override public function transitionIn():void { super.transitionIn(); TweenMax.to(this, 0.3, { alpha:1, onComplete:transitionInComplete } ); var assetArray:Array = page.assetArray; var len:int = assetArray.length; for (var i:int = 0; i < len; i++) { trace(assetArray[i]); myBitmap = IBitmap(assetArray[i]).content; myBitmap.visible = true; myBitmap.x=(i % 4) * 240; myBitmap.y = int(i / 4) * 180 + 60; myBitmap.alpha = 0; TweenMax.to(myBitmap, 0.5, { delay:1, alpha:1, ease:Circ.easeInOut } ); } Should I be creating a movieclip in the design.fla file with a dynamic text field that serves as a container for the bitmap array and create a button array from that? If possible I'd also like to add ROLL_OVER and OUT effects i.e. ROLL_OVER fires the caption whose y position and alpha are then tweened in and are visible.ROLL_OUT = reverse and makes the caption invisible. Any help would be awesome Many thanks Marco Terrinoni - Director MULARAM PRODUCTIONS web design // animation // illustration uk: +44 7876 652 643 e: <mailto:ma...@mularam.com> ma...@mularam.com w: <http://www.mularam.com/> www.mularam.com From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Chris Foster Sent: 21 March 2011 21:39 To: Flash Coders List Subject: RE: [Flashcoders] Loader Max Question Hi Marco, I've always found it much easier to let the Gaia framework manage my loading by adding items (like SWFs, images, mp3, flv etc.) as assets to the Gaia page. It's easier because I don't have to write code to solve the kind of problem you're asking about... The Gaia documentation is pretty thorough about how you can use the assets... In the case of your SWFs it looks like you'd need to create some buttons onstage (like a menu screen) and give them each a 'click' event handler to make the loaded SWF visible (and to hide any other loaded SWFs that are currently visible). Here's the docco on using assets: http://www.gaiaflashframework.com/wiki/index.php?title=Assets#How_To_Use _Assets Probably the most useful and important thing to know is that once your SWF assets are loaded, they're positioned at 0,0 and their 'visible' property is set to false. To display them, all you need to do is set the 'visible' property to true. And assuming that 'captions' means a single text title for each asset, you can place this info in an attribute of the asset node in Gaia, like this: <asset id="mySWF" src="something.swf" caption="Insert Caption"/> ...and then access this XML via E4X by using the 'node' property of the asset, like this: assets.mySWF.node.@caption ...and use that to populate a textfield. Keeping the caption in the XML means you can easily change the SWF as well as the caption without needing to recompile anything later. Hope that helps, C: _______________________________________________ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders