FlexBuilder to FDT Migration - actionscript-3

I'm new to FDT and I'd like to move some (actionscript)projects from FlexBuilder to FDT.
I've noticed FDT can read .actionscriptProperties from FlexBuilder, so just setting the workspace to my FlexBuilder workspace got the projects, the current one open, the rest of them closed which is great.
I got a an error on the way:
"Error opening the editor.
No editor descriptor for id com.adobe.flexbuilder.editors.actionscript.ActionScriptEditor"
which makes sense...I the last editor used was the as editor from flexbuilder, which isn't present in fdt...no biggie here.
My problem is that I don't get the FDT autocomplete working, not even for the default AS3 classes( Sprite, TextField, etc. )
I've tried right clicking the project then Flash Project > Remove Flash Nature
then Flash Project > Add Flash Nature again...but it didn't seem to do anything.
I don't even know what it does. I'm guessing it's telling FDT to treat this project as CS3 or Flex compiled project.
I've also imported a project from SVN in FDT and no autocomplete.
So, how do I get the great FDT auto-completion for a FlexBuilder Actionscript Project opened in FDT ?

The currect version of FDT ships with an "Flex project importer". In the flash explorer under "Import -> Import Flex Builder 3 Projects".

I think I must be satisfied with the answer that there is no easy answer. The is no lazy-man's option of just opening a flexproject in fdt just like that and having everything working.
So I guess the answer would be using Export/Import.

Related

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.

VerifyError: Error #1014: class could not be found

I'm developing AS3 project using Flash Builder 4.5 (also with library Away3D 4.0 and Flex 4.5.1 SDK).
Also, I add my own SWC library, which I compile previously into my project.
It works find if I import class in my SWC library, however I want my swf run in a stand-alone flash player 11.
I follow this tutorial:
http://help.adobe.com/en_US/flashbuilder/using/WSe4e4b720da9dedb5-4dd43be212e8f90c222-7ffb.html
Now, I could run my app in a flash player 11, but I got an error in run time:
VerifyError: Error #1014: XXX class could not be found
And XXX is my class in SWC library. How should I fix this?
Merged into code means this, in project properties -> Flex Build Path -> Library Path -> Framework Linkage. Framework lingage has two options Merged into code and RSL. Chose Merged into code. This should solve your problem.
We had this problem when trying to build a project using a Native Extension.
Classes within the NE weren't being found at runtime, but were accessible in Flash Builder.
It turned out that by default the .ANE file wasn't copied to the device.
To fix this, change the following project property:
ActionScript Build Packaging -> Apple iOS -> Native Extensions -> Check 'Package' for the ANE
No idea why it wasn't included by default. When you uncheck 'Package' you get a warning telling you that it may cause runtime issues!
In my case, we had a nested reference to the same library which needed to load before the other library also using it. This fix can be accomplished by unchecking the 'Automatically determine library ordering based on dependencies' and moving the library up in the chain of Build path libraries. Flash Builder was unable to determine the correct order base on dependencies because we had 2 different versions of the same library. The error would only happen during run time.
I had this problem after installing AIR 3.9 and trying to upgrade a project.
It was also saying there was an RSL error, before throwing a succession of #1014 errors.
It worked after I set the textLayout.swc link type in Advanced ActionScript Settings to 'merged into code' instead of the default (RSL)
Hope this helps!
Since I landed on this page searching for this error message and none of the above solutions worked for me, here's how I finally managed to work around it:
It seems that this error happens particularly when you include old libraries that were compiled with the old compiler but compile your app with the new one. Unfortunately the error sometimes fires and when you compile again it doesn't; at other times it works fine in the debug version but then it fails in the release.
What worked for me is to include dummy objects in your main app which are instances of the class that the verify error complains about:
import some.classpath.to.TheClassThatFailsOnVerify;
function YourMainApp(){
var dummy:TheClassThatFailsOnVerify = new TheClassThatFailsOnVerify ();
}
At least in my case the errors only fired for classes that were not used directly in the app but only internally in the swc library code, so by having the dummy objects in the main app I force Flash Builder to include those classes in the compilation.
In some cases you might have to first find the swc that contains the class in question since it's not part of the library swc you use but it's again a library that that swc uses itself.

Exported SWC doesn't preserve auto-complete functions' parameters' names

I am using Flash CS5 and I have created a large, rarely changing framework that I don't want to be recompiled every time I use it in my projects.
I must be doing something wrong because the "auto-complete" functionality doesn't show the names of the parameters of the functions.
For example, I have a function:
public class Hey {
public function show(name:String, num:Number, data:Array):void {...}
}
I export the SWC file and when I import it into another project, then the auto-complete for this function shows :
show(arg0:String, arg1:Number, arg2:Array):void
So, instead of "name", "num" and "data" I get "arg0", "arg1" and "arg2".
I have downloaded other SWC files and the auto-complete gets the names correctly.
Am I doing something wrong at export-time?
I have never been able to get an SWC generated with the Flash Pro IDE to supply the correct parameter names in code hints. For some reason, the Flash IDE either does not use the same compiler or does not use the same compiler options as the Flex SDK toolkit.
You can generate code-hinting-compatable SWCs with Flash Builder by creating a Flex Library project. The "Flex" part of "Flex Library" is a little misleading. You can build AS3-only SWC files with this project type.
Or if you don't feel like shelling out the money for Flash Builder, you can always download the free Flex SDK and use the compc compiler to generate the SWC for you. It's the same tool set that Flash Builder uses to generate SWCs, so you will get the same code-hinting ability. The syntax is pretty straight-forward if you're used to command line tools:
compc -source-path . -include-classes MyCustomClass -output=MyLibrary.swc
Hopefully someone can post a better answer and prove me wrong, but I've never seen a Flash-generated SWC include the parameters in code-hinting.
I suppose you compile with debug=false but should be debug=true to keep all necessary data in swc including arguments names.
Optimizing libraries means to remove debugging and other code from the library prior to deployment. For normal libraries that you are not using as RSLs, you do not need to optimize. This is because you will likely want to debug against the library during development, so you will need the debug code inside the library. And, when you compile the release version of your application, the compiler will exclude debug information as it links the classes from the library.
http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf69084-7ad5.html
For me the easiest way was to import the code to a Flash Develop project, and install a plugin to export swc's: http://sourceforge.net/projects/exportswc/
After installing Flash Develop go to Tools ยป Install Software and install the AIR SDK + ASC 2.0 (Action Script Compiler 2.0).
Furter information here: http://www.flashdevelop.org/community/viewtopic.php?t=2987

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

FLVPlayback skin modification problem in Adobe Flash CS5 with AS3

I have been working on modifying an existing FLVPlayback skin. Ideally I would like to have one that uses a counter.
The problem is, all the fla's provided for the skins with counters fail to publish/compile correctly. Fla's are here: C:\Program Files\Adobe\Adobe Flash CS5\Common\Configuration\FLVPlayback Skins\FLA\ActionScript 3.0
I do end up with a swf, but it doesnt' work when applied to my FLVPlayback instance on the stage. (All skin fla's beggining with 'Minima' do not work, even the skins without the counters)
I get the following warning when publishing: Warning: unable to load SWC FLVPlaybackAS2.swc
If I go to 'File -> Publish Settings -> Flash -> Settings', FLVPlaybackAS2.swc is not in my Library Path. So, I added it... (C:\Program Files\Adobe\Adobe Flash CS5\Common\Configuration\Components\Video\FLVPlaybackAS2.swc) But I get the exact same warning.
It seems strange to me that it would throw a warning about FLVPlaybackAS2.swc... this is an AS3 fla provided by Adobe. I also tried adding FLVPlaybackAS2.swc, FLVPlaybackAS3.swc, FLVPlaybackAS3_2.5.swc etc, with no change.
Another developer here has tried also and come up with the same problem. We are both on PC's and have all Adobe updates.
Anyone have any ideas?!
Thanks,
James.
Guys... I found answer ! Just remove all from your source paths in the publish settings when you look to ActionScript 3.0 setting for your Skin FLA ! ( as default you can see here some path to video folder where is SWC files)
it's look like a bug but i did it and now my skin working.. now in this lines are empty field in my FLA..
if you want ask me and i will answer how it works.. good luck with this strange bug !