Jump to content
Search Community

LiquidArea Preview - null object error

brantseibert test
Moderator Tag

Recommended Posts

When I switch off preview I get the ever popular : Error #1009: Cannot access a property or method of a null object reference.

 

THIS DOES NOT THROW AN ERROR:

 

var la3:LiquidArea = new LiquidArea(this, 500, 200, 400, 300, 0xFFFFFF);

la3.preview = true;

la3.attach(device1, ScaleMode.PROPORTIONAL_INSIDE);

ls.attach(la3, ls.TOP_LEFT);

 

THIS DOES THROW A 1009 ERROR:

 

var la3:LiquidArea = new LiquidArea(this, 500, 200, 400, 300, 0xFFFFFF);

//la3.preview = true;

la3.attach(device1, ScaleMode.PROPORTIONAL_INSIDE);

ls.attach(la3, ls.TOP_LEFT);

 

Thanks for your help.

Link to comment
Share on other sites

Why are you attaching a LiquidArea to LiquidStage? Don't do that :) It's unnecessary - LiquidArea automatically attaches itself via PinPoints (by default its upper left corner attaches to the upper left corner of the stage and same with the lower right corner). You can use the LiquidArea's pinCorners() if you need to pin the corners differently.

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