Reputation: 1005
I have to animate a shape to and fro just like pendulam continuously on a stage without updating it. Actully i am converting a flash to html using adobe flash pro cs6 and toolkit for createjs and flash contains a arrow in next button which is continuously moving to and fro here is link of flash which i am converting. https://dl.dropboxusercontent.com/u/79167545/sp_dla_dominican_photo_album_p2.swf
Upvotes: 1
Views: 59
Reputation: 16892
Short answer: You don't.
You could tick the animation without updating the stage, but then you wouldn't be able to see it.
If you want this drawn to the screen you will have to use stage.update()
- this is what invokes all the drawing/render updates.
The frame-concept from FlashCS does not exist in that form in CreateJS. My guess is that in you .swf file you use the buttons with gotoAndStop(...)
, is that correct? - If so, this cannot be done with the CreateJS-stage. If you want to do that with CreateJS you would have to use a MovieClip (however, this is not so elegant) - but my suggestions is to have the objects like this:
Stage
├─ Page1 (createjs.Container)
│ ├─ Contents [Bitmap, MovieClip, Shape, whatever...]
│ └─ Button (animated, with eventListener:click -> Page1.visible = false; Page2.visible = true;
└─ Page2 (createjs.Container)
├─ Contents [Bitmap, MovieClip, Shape, whatever...]
└─ Button (animated, with eventListener:click -> Page2.visible = false; Page1.visible = true;
Upvotes: 2