• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

How do I set up FB4 to compile some exercise files?

New Here ,
Nov 02, 2010 Nov 02, 2010

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

Screen shot 2010-11-02 at 1.01.03 PM.png

Views

1.1K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Adobe Employee , Nov 02, 2010 Nov 02, 2010

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

...

Votes

Translate

Translate
Adobe Employee ,
Nov 02, 2010 Nov 02, 2010

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 02, 2010 Nov 02, 2010

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!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Nov 02, 2010 Nov 02, 2010

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 02, 2010 Nov 02, 2010

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.

Screen shot 2010-11-02 at 4.59.10 PM.png

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Nov 02, 2010 Nov 02, 2010

Copy link to clipboard

Copied

Try project properties > ActionScript Compiler, uncheck "Generate HTML wrapper file".

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 02, 2010 Nov 02, 2010

Copy link to clipboard

Copied

You are a saint to keep helping. It's now saying the swf is not found:

Screen shot 2010-11-02 at 5.17.42 PM.png

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?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Nov 02, 2010 Nov 02, 2010

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 03, 2010 Nov 03, 2010

Copy link to clipboard

Copied

It was right to use an Actionscript project. Thank you!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Nov 03, 2010 Nov 03, 2010

Copy link to clipboard

Copied

LATEST

Great. Glad I could help. Thanks for your patience.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines