Sunday, April 4, 2010

How to do something before the...

聽聽聽 I want to use Lingo to do something before everything is seen (before the first frame, and before the exe interface appears). But I don't know how to realize.

聽聽聽 For example, I want to run the code:

聽聽聽聽聽聽聽 alert(''test begin!'')

before everything is seen. I have tried to write the statement in startMovie(), prepareMovie(), prepareFrame(), and beginSprite(), and all failed. In all case, the alert message is popped after the interface appears.

聽聽聽 How to do? Thanks!

How to do something before the...

It depends on exactly what you want to do. In some cases you might have to set your movie to open with a stage size of 1 x 1, or completely off screen, before you do what you want and resize/move it. In other situations the lingo.ini file can be used to execute the #startup handler. However, you should only rely on this handler to set global variables - some objects, like cast members, sprites, etc. aren't available. Refer to the existing lingo.ini file in your Director\Configuration\聽 folder

No comments:

Post a Comment