1

Hi i am new to the forums and i'm looking for some help with a current project.

i am basically making a website called www.noised.co.uk, feel free to take a look to see what my problem is and don't judge me on the images etc it has not been optimized as of yet.

but as you will be able to see when my screen re sizes the redraw is awfully slow. in AS2 i used updateAfterEvent() but as i understand you can only use this under a mouse or timer event (and another but i cannot remember which) all three of which i am not using to call my re sizer, i am using:

stage.addEventListener(Event.RESIZE, resizer)

so my question is how can i make this redraw a nice, smoother effect?

Tilley661
  • 19
  • 6

2 Answers2

0

I'm assuming that your stage.addEventListener(Event.RESIZE, resizer) is working fine and the function is called on the right time.

So looks like your function is some how like this:

function resizer(e:Event):void{
 obj.x = your calculation of position X;
 obj.y = your calculation of position Y;
}

All you need to do is use some Tween class like Tweenlite. http://www.greensock.com/tweenlite/

So inside your resizer function just change the content like this.

TweenLite.to(obj, 1, {x:your calculation of position X, y:your calculation of position Y });

Now the animation will be smoother

Fabiano Luiz
  • 63
  • 1
  • 1
  • 8
0

What you're experiencing is something that is caused by the flash player and the way it gets resized by the webkit renders. It's hard to get around it in AS3 code alone, but the following link shows how you can use a combination of JS and AS3 to get a smooth stage resizing

http://www.tagtixx.com/smooth-flash-resizing-in-webkit-browsers/

Michael
  • 3,776
  • 1
  • 16
  • 27