- Home /
Flash build does nothing at all
I'm just starting to experiment with the new Flash export feature. Everything broke, as predicted, because I wasn't using strict mode in my scripts. However, I've reduced my script down to essentially nothing, yet the Flash build still does nothing.
My script looks like this:
#pragma strict
function Update () {
transform.Translate(0, 0, 100 * Time.deltaTime);
}
It really does nothing but move the game object it is attached to forward every frame by a time-sensitive amount. I attached this script to my camera. Otherwise, the only other things in my scene is a large cube with a texture on it so I can see my own movement, and a light so I can see anything at all.
Running this project in Unity works perfectly, with my camera moving slowly over the surface of the cube. In Flash, the scene appears but no movement occurs. It's as if the Update function is never getting called (or any other functions for that matter).
I thought for a moment that it may have been due my use of a Mac to do the compilation, but exporting the AngryBots sample game worked correctly (with a few minor glitches).
It's not related to Time.deltaTime either. Placing a static value for the z coordinate in translate still results in no movement.
What's going on here?
I solved this problem, but my answer has not yet been approved. The problem had to do with spaces in the filename of the script.
Answer by Dwight House · Jan 30, 2012 at 07:45 PM
Solved! The Flash export process does some kind of mapping of the filename to AS3 class. The filename for my script had a space in it, which would result in an illegal classname. I don't know if other illegal characters will cause a failure in the final exported game. I'm submitting a bug on this.
Your answer

Follow this Question
Related Questions
Distribute terrain in zones 3 Answers
flash problem 2 Answers
Using a flash swc library when building for flash in 4.0 1 Answer
mouse doesnt work in flash build 1 Answer
How can I find the line number in flash build error (simple)? 1 Answer