Jump to content
Search Community

loaderMax accessing BitmapData?

bonassus test
Moderator Tag

Recommended Posts

I'm trying to load a bitmap with LoaderMax and then use it as a bitmapfill but i'm having trouble accessing the bitmap data or even the loaders rawContent which I assume is where i get the bitmapdata. Would someone please steer me in the right direction?

 

 

the image is loaded here

thumbQueue = new LoaderMax({maxConnections:1});							
thumbQueue.append(new ImageLoader("body-bg.gif", {name:"bg"}));

 

 

and then I can't access the bitmap data what am i doing wrong?

var bgTile = loader.thumbQueue.getLoader("bg");

trace(bgTile);
   // ImageLoader 'bg' (assets/body-bg.gif)

trace(bgTile.content);
  //[object ContentDisplay]

trace(bgTile.rawContent);
 //null

trace(bgTile.rawContent.BitmapData);
 error...

 

how do i assign body-bg.gif to bmd?

var bmd:BitmapData = ?????(0,0); //
     var content = new Sprite();
       addChild(content);
content.graphics.beginBitmapFill(bmd);
       content.graphics.drawRect(0, 0, 1500, 500);
       content.graphics.endFill();

 

Thanks for any help

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...