Monday, June 18, 2012

[Action Script] AS3 Stage resize issue June,2012

Hi guys and girls,

I have an issue with an image not being the stage width when it is resized.

Im using greensocks LoaderMax to load the image and tile it across the stage which works fine but when I resize the browser the image doesnt resize and I cant figure out what im doning wrong.

Here is the AS3 for importing and tiling the image:

ActionScript Code: var footer:Sprite = new Sprite();var footerImageSpt = new Sprite();// footervar footerImage:ContentDisplay = LoaderMax.getContent("footerImage");footerImageGrfx:Graphics = footerImageSpt.graphics();footerImageGrfx.beginBitmapFill(footerImage.rawContent.bitmapData);footerImageGrfx.drawRect(0, 0, stage.stageWidth, footerImage.height);footerImageGrfx.endFill();footer.addChild(footerImageSpt);I did try adding a event listener but couldnt get it to work, it resized the image instead of keeping it tiled.

Any help would be appreciated.:)
AS3 Stage resize issue

Related Post



0 comments: