Jump to content
Search Community

Liquidstage question [SOLVED]

Monnone test
Moderator Tag

Recommended Posts

Great thanks. Ok, this my sound like a stupid question but is LiquidWrapper part of the LiquidStage class or is that separate? I can't seem to find any documentation for it. We are a "Shockingly Green" member but I don't see it in the packages.

 

Thank you!

Brian

Link to comment
Share on other sites

Jack, I found it. Thanks for pointing me in the right direction!

 

var bkGnrd:LiquidWrapper = new LiquidWrapper(bkgrnd_mc);

LiquidStage.stretchObject(bkGnrd, LiquidStage.TOP_LEFT, LiquidStage.TOP_RIGHT, LiquidStage.BOTTOM_LEFT);

 

Brian

Link to comment
Share on other sites

It's working great except on initialization it's not resizing properly. I made a call to updateBackground right away but it throws this error:

 

Error: Error #2099: The loading object is not sufficiently loaded to provide this information.

at flash.display::LoaderInfo/get width()

at MethodInfo-280()

at MethodInfo-279()

 

So it looks like the MC it's trying to resize isn't ready yet? How can I make sure it's loaded, ready to go, then resize? I'm not loading anything externally; it's all on the stage.

 

I'm calling it like this:

 

updateBackground(null);

function updateBackground(event:Event):void{

}

 

Again, your help is GREATLY appreciated Jack.

 

Thanks,

brian

Link to comment
Share on other sites

Nevermind. I worked it out:

 

stage.addEventListener(Event.ENTER_FRAME, initBkgrnd);
function initBkgrnd(e:Event):void{
    trace(bkgrnd_mc.loaderInfo.bytesLoaded);
    if(bkgrnd_mc.loaderInfo.bytesLoaded == bkgrnd_mc.loaderInfo.bytesTotal){
         updateBackground(null);
    }
  stage.removeEventListener(Event.ENTER_FRAME, initBkgrnd);
}

 

Thanks for your help!

Brian

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...