views:

633

answers:

4

I am trying the FDT editor on a project that previously ran successfully in Flash CS3.

FDT builds and runs it successfully but the SWF is blank (white). I've tried a few viewers on the output file and it is actually blank.

One difference is that now my project doesn't seem to include my entry .fla file. I'm new to Flash/ActionScript and am wondering whether that FLA file included some magic akin to a public static void Main method in other languages.

So, if I'm building an application purely in ActionScript 3 (no .fla files) how do I specify the entrypoint, canvas size, etcetera?

Of course, it's possible that I have set up FDT incorrectly :)

EDIT: Newbie alert!

Turns out that the white stage I was seeing via FDT was because my FLA was running in a different folder and I couldn't load any of my resources, so nothing was ready to display. I also had FDT configured in such a way that I wasn't seeing the error via the debugger.

This question is a bit dumb. Is it normal to delete questions like this?

For anyone else coming at Flash/ActionScript from a solid programming background, I found this to be a pretty good overview of the display model:

http://livedocs.adobe.com/flex/3/html/help.html?content=05_Display_Programming_02.html#152593

+1  A: 

You can ONLY publish fla based content from the Flash IDE, so if you're not going to use that anymore you'll need to publish an assets swf of your graphics, etc.

I presume you're using the MXML compiler? If so check adobe live docs on how to set the stage size etc.

Iain
+2  A: 

The equivalent would be the constructor of the main class. That's the class that you specify for compiling (in principle, the rest of the classes are compiled only if they are referenced in code being compiled, be it the main class or any class reference by it).

In the Flash IDE, it would be the constructor of the Document class (if you happen to use one, it's not mandatory) or just the first keyframe in the main timeline.

Juan Pablo Califano
You're right. The required entry point is given to the compiler as a class name, and your 'app' starts with its constructor. Thanks.
Drew Noakes
+1  A: 
jpencola
Thanks for this. I was expecting the stage size to be determined in code but that doesn't appear to be the case. Thanks for your insight. I'm enjoying learning Flash.
Drew Noakes
+1  A: 

You can use the SWF metadata to set a few things in your main class For example -

[SWF(width='455', height='200', backgroundColor='#123456', frameRate='25')]

John Burton