Jump to content
Search Community

Sync render and tween

moxol test
Moderator Tag

Recommended Posts

I have a big .mxml file (2,5 mb) which consists of Graphic (copied from FXG) that contains large number of Paths.

Because of complexity Flash needs a couple of seconds (depending on window size) to draw graphics.

 

I need to start TweenMax when Flash complete rendering and appearing on screen of that .mxml file.

I have added Event.RENDER event listener function to start TweenMax but it's out of sync, meaning that TweenMax always starts earlier then .mxml appears, for a couple of seconds.

I have tried to use some other Event, but RENDER is last one fired.

Best way that I have found out is to delay TweenMax, but that is not precise and I can't ever be sure how much to delay.

 

How to sync mxml appear and TweenMax start?

Link to comment
Share on other sites

Let me make sure I understand this:

 

You are sure that the RENDER event is getting fired correctly (after your mxml graphics render) and yet you're creating a TweenMax in that event handler that somehow fires BEFORE the event fires? Or are you saying that the RENDER event fires too early? I'm not familiar with loading/displaying .fxg files or what events Flash dispatches for that sort of thing. Have you checked the Adobe docs?

Link to comment
Share on other sites

Let me make sure I understand this:

 

You are sure that the RENDER event is getting fired correctly (after your mxml graphics render) and yet you're creating a TweenMax in that event handler that somehow fires BEFORE the event fires? Or are you saying that the RENDER event fires too early? I'm not familiar with loading/displaying .fxg files or what events Flash dispatches for that sort of thing. Have you checked the Adobe docs?

 

Event.RENDER is fired when Flash Player is about to render the screen.

After that Flash Player schedules screen render for frame (according to this http://www.senocular...erofoperations/

 

In RENDER event listener function I've started TweenMax.

 

Since Event.RENDER is just starting of rendering screen which will be actually rendered in couple of seconds, TweenMax is not sync with appearing of rendered screen, which I want.

 

Problem is that there is no Event.RENDERED so that I can start TweenMax when screen is rendered.

 

I am not sure how to solve this.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...