Copy link to clipboard
Copied
Hello,
I am following along with a book on AS3 development and the book's exercise files are structured by the chapter. Is there a way I can set up Flash Builder to compile whatever Actionscript file I have open as the document class? Or, if not, what would be the quickest way to set up the compiling of all these AS files?
Thank you!
Kevin
No problem. Without having your exact project and the book sample structure, it's a bit hard to tell what's going on.
I asked the Flash Pro feature team. They recommend opening the FLA in Flash Pro and setting the publish settings to "Default".
If you're still having issues, my next question is is the FLA even necessary? Do you have symbols in the FLA that you're or are you strictly using ActionScript? You can create a pure "ActionScript Project" in Flash Builder where the main application .as fil
...Copy link to clipboard
Copied
If you have Flash CS5 and FB4, you can use the FLA file to create a Flash Professional project in Flash Builder (File > New > Flash Professional Project). As long as the main application (document class) has a dependency on the file, it will compile.
Jason San Jose
Software Engineer, Flex Mobile
Copy link to clipboard
Copied
Hi Jason,
Thanks for the response. I do have both FPCS5 and FB4 & have, I believe, tried the method you're describing. The problem is that the exercise files are all document classes with different names. I'd set the document class name as 'Main' in Flash Professional, copy the example code into it, and change the .as file's name, say 'Test', to Main. It works, but it's labor intensive for hundreds of exercise files. I also tried setting the src build path to ch2, ch3, ch4, etc., but it gave me an error about package names. Any other ideas (or perhaps could you explain the dependency you mentioned in greater detail)? Thank you VERY much again!
Copy link to clipboard
Copied
You can make each file an "ActionScript Application". Right click on the project, Properties > ActionScript Applications. Click on the "Add..." button to add each file.
Jason San Jose
Software Engineer, Flex Mobile
Copy link to clipboard
Copied
Thank you so much for your help. That almost worked! The applications want to run when I choose the Run Application command but they throw an error saying they need an HTML file. I tried the Flash Professional "Test Movie" comman as well, but it just runs the Default Application as. file.
Copy link to clipboard
Copied
Try project properties > ActionScript Compiler, uncheck "Generate HTML wrapper file".
Copy link to clipboard
Copied
You are a saint to keep helping. It's now saying the swf is not found:
Would I need to manually add some kind of AS to specify SWF background color, width, & height to get it to compile a swf?
i.e.
[SWF(width=990,height=720)]
Or is it impossible to target an fla that has its document class set to a specific file?
Copy link to clipboard
Copied
No problem. Without having your exact project and the book sample structure, it's a bit hard to tell what's going on.
I asked the Flash Pro feature team. They recommend opening the FLA in Flash Pro and setting the publish settings to "Default".
If you're still having issues, my next question is is the FLA even necessary? Do you have symbols in the FLA that you're or are you strictly using ActionScript? You can create a pure "ActionScript Project" in Flash Builder where the main application .as file is essentially equivalent to the FLA document class.
You said earlier: "The problem is that the exercise files are all document classes with different names. I'd set the document class name as 'Main' in Flash Professional, copy the example code into it, and change the .as file's name, say 'Test', to Main. It works, but it's labor intensive for hundreds of exercise files". If the intent here is that each exercise "document class" is a standalone class with no dependencies on a FLA, then you're better off using Flash Builder's "ActionScript Project".
Jason
Copy link to clipboard
Copied
It was right to use an Actionscript project. Thank you!
Copy link to clipboard
Copied
Great. Glad I could help. Thanks for your patience.