Jump to content


LiquidStage Question

Recommended Posts



On stage i have a "backgroundHolder" which succesfully listens to the liquidstage/area stuff.

This works as a background image.


ls = new LiquidStage(this.stage, stage.stageWidth, stage.stageHeight, stage.stageWidth, stage.stageHeight);
area = new LiquidArea(this, 0,0,stage.stageWidth, stage.stageHeight);
area.attach(backgroundHolder, ScaleMode.PROPORTIONAL_OUTSIDE, AlignMode.LEFT, AlignMode.TOP);
ls.addEventListener(Event.RESIZE, onLiquidStageUpdate);

This works fine.



Now the situation:

in thumbsHolder, a batch of images are loaded with loaderMax.

after clicking a thumbnail, I try to attach a movieclip (pictureHolder.largeImage) to the liquid stage. using my LoadLArgeImage function. fairly simple so to speak.

Inside that function I do a normal ImageLoader set up.

But I get an error,

Error: The parent of the DisplayObject largeImage added to AutoFitArea instance111 doesn't share the same parent.


Using this code:

function LoadLargeImage(toload):void
bImageLoader = new ImageLoader(toload, new ImageLoaderVars()
.height(stage.stageHeight - 50)
.y((bigPicture.largeImage.height/2) + 25)
var ls2:LiquidStage = new LiquidStage(this.stage, stage.stageWidth, stage.stageHeight, stage.stageWidth, stage.stageHeight);
var area2:LiquidArea = new LiquidArea(this, 0, 0, stage.stageWidth, stage.stageHeight-50);
area2.attach(bigPicture.largeImage, {scaleMode:ScaleMode.PROPORTIONAL_OUTSIDE, crop:true});


BAsically whats going on "on stage" are 2 movieClips aka no nesting except for the contents of bigPicture:



-bigPicture(holds next/previous/close buttons and the largeImage holder)


I am not entirely sure what causes this. Could anyone shed a light upon this?

Sorry (again) if the answer is rather obvious... at times i seems lost in the displaylist etc.

Many thanks.Tom

Link to comment
Share on other sites

You solved this, right? If I remember correctly, you e-mailed me and said you found the issue in your code (or maybe that was someone else with a similar problem). AutoFitArea and LiquidArea require that anything you attach() to them must share the same parent. It sounds like you're not complying with that requirement. Did you need more 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.