Copy link to clipboard
Copied
Ok, I ran into a problem with tweening from one frame to another. It is hard to explain, but I'm gonna try . I have a class Main.as. In it I put my stuff on the Stage via addChild() method. Now I want to have another empty Stage at frame 25 where I can put different things on it. And I would like to tween from frame 1 to 25. Is that possible? I have read the class definition for Tween and it always needs an object to tween. Do I have to wrap everything on frame 1 into a sprite and on fram 25 into another sprite?
I hope someone understands my explanation
Thanks
add a parent movieclip to the stage in Main and add everything else to that parent (using addChild, for example). then when you're ready to display the next page, you can fade-out that parent. at the end of the fade remove the parent and null it (if it's never needed again).
you create another parent for your page 2 display, assign its alpha to zero, add the page 2 assets to that parent and fade it in while the page 1 parent is fading out. that will give you a cross fade.
Copy link to clipboard
Copied
you should rethink your setup.
if you want to tween objects created in Main into something else either add objects that have a timeline tween or tween the objects with actionscript.
Copy link to clipboard
Copied
Ok, so does meaning tween with actionscript, that I have to tween every object I have created in frame 1? The objects I did add to the Stage are MovieClip Symbols. Ok, some further explanation, maybe it helps to understand . Imagine the SWF is a book, frame 1 = page 1 and so on, so on each frame/page is different content, and all I want to do is to have a smooth transition from frame/page 1 to frame/page 2 or frame/page 4. If that is possible, then my next question is, do I still have access to the content on other frames/pages from within the Main.as and how do I add content to for example frame/page2, I thought there is only one Stage object or is the Stage object from frame 1 another than from fram 2?
Copy link to clipboard
Copied
what do you envision as a "smooth transition from page 1 to page 2?
Copy link to clipboard
Copied
Something like a fade-out and fade-in or a cross-fade . I dont know, if I get performance issues if I add 4 Sprites as containers for the pages to the stage and then add my objects to the Sprites and then tween the Sprites depending on what I want to display on the Stage.
Something what is also in my mind is, there is Actions-Frame and there is Class definition, what is the difference between those? Because I can only have one class assigned, but I can have for each frame different actions? In Objective-C I used a class to either create instances of that class or to have a reference to it.
Copy link to clipboard
Copied
add a parent movieclip to the stage in Main and add everything else to that parent (using addChild, for example). then when you're ready to display the next page, you can fade-out that parent. at the end of the fade remove the parent and null it (if it's never needed again).
you create another parent for your page 2 display, assign its alpha to zero, add the page 2 assets to that parent and fade it in while the page 1 parent is fading out. that will give you a cross fade.
Copy link to clipboard
Copied
Yes, thats what I was thinking about, use some containers to hold my objects, thanks for your help
Copy link to clipboard
Copied
you're welcome.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now