A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: embed-tag for images - how to use?

  1. #1
    Member
    Join Date
    Jun 2011
    Posts
    85

    embed-tag for images - how to use?

    Hi,

    I would like to know if I have to dispose an image in AS3/Flex when using the EMBED-tag:

    Code:
    [Embed(source="../../../../../assets/interface/pause/cancel_btn_off.png")]
    		public static const CancelOffBtn:Class;
    
    private var cancelOffBtn:Bitmap = new Library.CancelOffBtn();
    
    addChild(cancelOffBtn);
    When I addChild this class and remove it via removeChild, do I have to dispose this or is this unnecessary? I just ask because it uses the Bitmap-class and under normal circumstances you have to dispose it for the garbage collector.

    Or is there another way to embed images without the Bitmap class? I just ask because I'm new to Flex and have problems embedding my stuff into my game. Thank you very much.

  2. #2
    Senior Member cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,449
    Here is all about embedding in Flex:

    http://livedocs.adobe.com/flex/3/htm...t=embed_4.html
    - The right of the People to create Flash movies shall not be infringed. -

  3. #3
    Member
    Join Date
    Jun 2011
    Posts
    85
    Thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center