1 Replies - 481 Views - Last Post: 11 October 2010 - 10:54 AM

#1 Alhazred  Icon User is offline

  • D.I.C Head

Reputation: 9
  • View blog
  • Posts: 181
  • Joined: 25-July 07

The resize stops the animation

Posted 11 October 2010 - 05:40 AM

I've got a vertical bar which comes on the stage with a simple animation from left to right made on the timeline, not by code.

This code resizes the bar to fit the stage height.
import flash.display.Stage;
import flash.events.Event;

var myStage:Stage = this.stage;
myStage.align = StageAlign.TOP_LEFT;
myStage.scaleMode = StageScaleMode.NO_SCALE;

myStage.addEventListener(Event.ENTER_FRAME,initSite);

function initSite(e1:Event):void {
	
	sidemenu_mc.height = myStage.stageHeight;
	
}


sidemenu_mc is the bar, which is 180px wide.
The problem is that the bar appears, but only a bit, something like 2 or 3px, then it stops.
I guess it stops as the resize is executed, infact if I comment the line with the resize command the animation goes on, but of course without the resize.

Is it normal this behaviour? How to solve the problem?

This post has been edited by Alhazred: 11 October 2010 - 05:40 AM


Is This A Good Question/Topic? 0
  • +

Replies To: The resize stops the animation

#2 Alhazred  Icon User is offline

  • D.I.C Head

Reputation: 9
  • View blog
  • Posts: 181
  • Joined: 25-July 07

Re: The resize stops the animation

Posted 11 October 2010 - 10:54 AM

Solved, I've made the tween inside the sidebar timeline in place of the main timeline.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1