Flash Builder 4 Documentation Error? - actionscript-3

still getting use to Flash Builder.
i'm writing pure ActionScript, without MXML, to create AIR applications.
when i try to reference the documentation by Command + Clicking on code (in this case i Command + Clicked on "Sprite") i receive the following error:
Source could not be found for
flash.display.Sprite in
/Applications/Adobe Flash Builder 4/
sdks/4.1.0/frameworks/libs/air/airglobal.swc
i'm trying to launch the Adobe Help application, if it's not already open, and display the appropriate documentation. same this as if i had Right-Clicked on some code in Flash Professional CS5 and select View Help from the popup list.

Shift + F2 To change it, go to window -> preferences -> general -> keys.

Command clicking on a class name takes you to its source file. Cmd-clicking any class you wrote yourself or have .as files for in your source path, will do that but for the built-in classes that live inside swcs you don't have the source. So that's what the error tells you.
New in FlashBuilder4 is the ASDoc window that will show you documentation for the class that your cursor is near (don't know how to phrase that accurately).
What is sadly missing as far as I know from FB4 is the help section containing the ActionScript dictionary. Only online but not as easily usable as context-help was in FB3.

Related

Referencing outlets with Tab Bar Application vs. View Based Application

Okay, so I can successfully link a UILabel in the Interface Builder to whats written in my code by dragging the blue reference line to "File's Owner" and selecting the label I referenced in my code only when using a View Based Application.
However, using the exact same code and the exact same process in a Tab Based Application (hence dragging the blue line in the interface builder to "File's Owner" in FirstView.xib) the only option that show up when connecting the UILabel to "File's Owner" is "View" rather than the other options, such as "titleLabel or albumLabel", that I wrote in my code.
Please tell me is there something I am doing wrong?
Thanks
Try control-dragging (dragging while holding ctrl key) to the actual variable definition in FirstView.h (or equivalent file).
My experience is migrating to Xcode 4 and storyboards is a much cleaner solution. Connecting outlets/view transitioning is much cleaner in storyboards instead of old interface builders.

Can you debug swc in flash builder

Can you debug and step through the code of a swc files in flash builder?
Let's say you even have access to source code (coming from flex library project or flash professional project)! If how?
Thanks
Yes you can, though there are some limitations (as FlashBuilder will tell you when you do it), but simple stepping is no problem.
If you have the source code in a project in FlashBuilder, FB should find the associated code automatically. If you don't you can associate the source code to the swc manually. Go to the Flex Build Path window; click on the arrow next to the swc; double click the row that says "Source attachment" and enter the path to the source code.

class not found in Actionscript error

I am trying to run the program from http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf61c8a-7ff4.html
I am using Adbobe builder version 4.6 i encounter this problem WAVwriter class not found
when i do import com.adobe.audio.format.WAVWriter;
Also var outputFile:File = File.desktopDirectory.resolvePath("recording.wav"); File type is not found..
How to resolve this error
Exactly as Adnan Doric said. And if you want to output your file using Flash Player runtime (instead of AIR), you should use flash.net.FileReference class. Calling its dowload() method will pop up an external dialog which can be used to save your file.
File is an AIR class, make sure your project is for desktop or mobile (AIR). If not, you can make new desktop project by going to File/New/Flex Project... and check in the Desktop checkbox (for mobile, choose Flex Mobile Project).
Regarding WAVWriter, make sure you linked the related sources.

How to configure FlashDevelop for unit test builds?

I'm using AsUnit for unit-testing my current AS3 project. My Main() is basically:
if ( UnitTest )
runUnitTests();
else
runMainProgram();
where I change UnitTest before building depending on whether I want to run the program or run the unit tests. Is there a way that makes it easier to switch between the two modes?
Optimally, I'd use F5 for building with UnitTest=false and another hotkey for building with UnitTest=false. What is the closest I can get with FlashDevelop?
You can do the following in FlashDevelop
if(CONFIG::debug) {
trace("Debug");
} else if(CONFIG::release) {
trace("Release");
}
These correspond to the drop down in the toolbar next to the play button.
See this link: http://www.flashdevelop.org/wikidocs/index.php?title=AS3_Conditional_Compilation
In terms of the shortcut, just create a macro that switches the release mode then hits play. From there you can add any shortcut you would like to your macro. So one shortcut will launch the course into debug/release mode as required.
Also note, you can have other CONFIG::bla's - so you might want to have CONFIG:unit1, CONFIG:unit2, etc, etc. See above link.
Easy solution:
duplicate the FlashDevelop project file (.as3proj) and name it "MyProject_tests.as3proj",
open this project, create a new ProjectTests class and set it as the main class,
change the output SWF in project settings.
Add another project file. To run the test using it as the primary. "Document class" the context menu on the file.
Like Chris mentioned, you can use FlashDevelop's Compiler Constants to do what you need, though it is a bit cumbersome turning these constants on and off.
However, there is a FlashDevelop plugin called Config::Toggle that makes that significantly quicker by providing an additional panel where you can enable/disable boolean constants with 1 click. The linked website describes the value of the plugin far better than I ever could. Hope that helps.

Flash Builder 4 Issue

I'm having a strange issue with Flash Builder 4.
It shows all my objects in a Flash Professional FLA file as errors.
Let's say I have five buttons in my moview named: button1, button2, button3, button4, button5.
Flash Builder is flagging all of them with red error on the right side of the screen as button1 is undefined. But it is button in the FLA movie and FB4 cannot see it.
It's really annoying with a large project showing 100 errors.
This never happened before in using Flash Builder.
It still compiles and plays in Flash when I test movie, but I would like it to either see the buttons and accept them or ignore them altogether.
This is the problem with lib - playerglobal.swc
Try to remove it from library list then add it again. Path to the swc may look like this:
C:\Program Files (x86)\Adobe\Adobe Flash CS5.5\Common\Configuration\ActionScript 3.0\FP10.2
Did you choose "Flash Professional Project" when you created the Flash Builder project?
If so, check that the .fla is present and pointing to the correct path in Project -> Properties -> Flash Professional
and that it is set as default in Project -> Properties -> Actionscript Applications