Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...

kiogo

Members
  • Content Count

    10
  • Joined

  • Last visited

Community Reputation

0 Newbie

About kiogo

  • Rank
    Member
  1. Ok, I figured out what my problem was, basically I was attaching the image loader before it was added to the stage. I removed the onComplete handler, set liquidArea to _imagesContainer and made sure the slide was on the stage before attaching it to area. area = new LiquidArea(_imagesContainer, 0, 0, 980, 590); _curSlide = slide; _imagesContainer.addChild(_curSlide.image); area.attach(_curSlide.image, {scaleMode:ScaleMode.PROPORTIONAL_OUTSIDE}); area.update(); Works perfect now. Thanks for all you help!
  2. I'd like to keep the images within the container. When I specify that container for liquidArea, I still get the parenting error. ls = new LiquidStage(this.stage, 980, 590, 980, 590); _imagesContainer = new Sprite(); this.addChildAt(_imagesContainer, 0); area = new LiquidArea(_imagesContainer, 0, 0, 980, 590); area.preview = true; private function _onCompleteHandler(event:LoaderEvent):void{ area.attach(event.target.content, {scaleMode:ScaleMode.PROPORTIONAL_OUTSIDE}); area.update(); } _imagesContainer.addChild(_curSlide.image); //ensures the image is at the top of the stacking order
  3. Ok, thanks. Now I'm having an issue with the display object parent - "Error: The parent of the DisplayObject agencynetImage added to AutoFitArea instance7 doesn't share the same parent." So... if all of my imageloaders are being added to _imagesContainer with addChild(), do I need to change the liquidarea target? public function SlideshowExample() { super(); ls = new LiquidStage(this.stage, 980, 590, 980, 590); area = new LiquidArea(this, 0, 0, 980, 590); area.preview = true; Thanks so much for your help!
  4. I see what you mean, thanks for the explanation. Is it possible to attach each child (slide) to area from the ImageLoader? I tried this without any luck: new ImageLoader("assets/images/" + image.@name + ".jpg", {name:image.@name + "Image", centerRegistration:true, scaleMode:"proportionalOutside", bgColor:0x000000, estimatedBytes:820000, onFail:_imageFailHandler, onComplete:_onCompleteHandler}) private function _onCompleteHandler(event:LoaderEvent):void{ area.attach(event.target, {scaleMode:ScaleMode.PROPORTIONAL_OUTSIDE}); }
  5. All slides would be a child of _imagesContainer, and that's what's been attached to the area. Do I need to re-attach _imagesContainer to area each time _imagesContainer.addChild(_curSlide.image); is called? I've posted a download to the code example here. http://www.kiogo.com/dev/slideshow-mod-nc.zip If you could take a look and see where I'm going wrong I would really appreciate it. Thanks for all your help on this.
  6. Thanks, on further experimenting, if I set the loaders like this, removing the width/height: new ImageLoader("assets/images/" + image.@name + ".jpg", {name:image.@name + "Image", x:0, y:0, centerRegistration:true, scaleMode:"proportionalOutside", bgColor:0x000000, estimatedBytes:820000, onFail:_imageFailHandler}) Then the first image behaves perfectly, but the following images will still show a gap above and below, or to the left and right depending on their orientation. Currently I'm calling area.update() after the slide has been added, but that seems to be updating just the cont
  7. Sorry, that was the problem. Thanks!
  8. Hello, I am trying to modify your (excellent!) slideshow example so that the image scales to full screen, proportionalOutside. It seems to be working for vertical images, but horizontal images show red (area preview) at the top and bottom. Here's my code pertaining to the liquid area: public var ls:LiquidStage; public var area:LiquidArea; public function SlideshowExample() { super(); ls = new LiquidStage(this.stage, 980, 590, 980, 590); area = new LiquidArea(this, 0, 0, 980, 590); area.preview = true; this.addChildAt(_imagesContainer, 0); area.attach(_imagesContainer, {s
  9. Hello, I am having problems with liquid area when specifying a scale mode, I get the following error: Scene 1, Layer 'actions', Frame 1, Line 4 1118: Implicit coercion of a value with static type Object to a possibly unrelated type String. Where line 4 is: area.attach(box_mc, {scaleMode:ScaleMode.PROPORTIONAL_OUTSIDE}); If I remove the scale mode, I don't get an error, this below works fine: import com.greensock.layout.*; var ls:LiquidStage = new LiquidStage(this.stage, 550, 400, 550, 400); var area:LiquidArea = new LiquidArea(this, 0, 0, 550, 400); area.attach(box_mc); T
  10. Hello, Is it possible to update a liquid area on the fly? Basically I have 3 positions that I need my mc to adapt to. For example: Starts at: area.attach(mc, {scaleMode:ScaleMode.STRETCH}); Then via an event, I want the mc to tween to: area.attach(mc, {scaleMode:ScaleMode.HEIGHT_ONLY}); And another event would pin the same mc to the left of the screen: area.attach(mc, {scaleMode:ScaleMode.HEIGHT_ONLY, hAlign:AlignMode.LEFT}); Is it possible to update the liquid area params this way? And tween between the changes? Thanks for any help!
×