dasPoda

now with 12% more Poda

getDefinitionByName and swc libraries

No comments

anyone that's used getDefinitionByName for a library might very well know that the classes from a library cannot be accessed if they are not defined. I've done "that trick" many times where I have a function somewhere, anywhere that lists the classes that I might need so that they get compiled into the flash file for later retrieval. I remember comming across this workaround (right way of doing it) where I don't need to do this.

I keep forgetting that you can include the complete library. This menu is in FlashDevelop under Options(right click on library, under "Add To Library"), but it's a flex compiler option, presumably, available to all IDEs.

Downside, obviously, is that everything gets compiled so be careful not to include libraries you don't intend to use. For this reason I"m using two separate libraries, an asset library and a content library.

Written by dasPoda

Saturday 18 June 2011 at 7:07 pm

Posted in flash

Used tags: ,

No comments

Leave a Reply

(optional field)
(optional field)
Remember personal info?
Small print: All html tags except <b> and <i> will be removed from your comment. You can make links by just typing the url or mail-address.