This page require Adobe Flash 9.0 (or higher) plug in.

AS3 : Tips for Gaia Flash FrameWork Development

I decided to share some how tos today for Gaia Framework based on my development experience. For those reading this the first time and don’t know what is GAIA framework about, try going to this post and read more about it.

gaia_flash

Let’s get started – check out the list below for today’s how tos of the day :-

  1. How To : Get the length of the assets loaded inside the page?
  2. How To : To Load an Asset of Unknown Type?
    e.g. src=”http://www.mymp3.com/loadfile.php?id=123

1) How To : Get the length of the assets loaded inside the page?

var assetArray = page.assetArray;
trace("Assets Loaded in this Page : "+assetArray.length);

2) How To : To Load an Asset of Unknown Type?

When I enter, a dynamic loading asset with query string, I got an error. How to load an asset of unknown type? Simple, add type attribute to it. If it’s a mp3 use type=”sound” if it’s a swf use type=”movieclip”.

 <asset id="game0" src="beach/superbeachball.swf?lang={language}" type="movieclip" preload="false" />

The valid types are

  • netstream
  • sound
  • xml
  • movieclip
  • stylesheet
  • soundclip (as2 only)
  • bitmap (as3 only)
  • sprite (as3 only – for BitmapSpriteAssets)
  • json (as3 only)
  • bytearray (as3 only)

Other Cool Related Stuff

1 Comment so far »

  1. sadar said

    am December 25 2009 @ 5:35 am

    Interestingly, and in some versions work?

Comment RSS · TrackBack URI

Leave a comment

Name: (Required)

eMail: (Required)

Website:

Comment:

CommentLuv Enabled