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.
Related
I have a custom component(eg. MyButton) used in several swfs. I'd like to share the component in runtime, thus once our designer change the button's visual effect, we need not publish all flas that uses this button.
In as2, I can put this button in an asset fla(eg. lib.swf) and check the "export for runtime share" in symbol property. Then copy the button to a fla(eg. main.swf) and check the "import for runtime share", this works fine. However in as3, after doing above, if I put a button instance on stage and modify its inspectable property, i'll get a compile error "1046:Type was not found or was not a compile-time constant".
I searched the web and found this http://www.kirupa.com/forum/showthread.php?317257-Runtime-Shared-Library-woes. Then I tried the swc approach, but it seems swc will be compiled into swf, it doesn't share at all.
the shared component must be put on the stage, because all fla will be modified by our designer while he knows nothing about programing.
we can not use flex, all operation must be done in Flash CS5.
1: Placed on Library all of your components to .fla as follows: my fla names BrushClip.fla the components wrapped a MovieClip. and be ActionScript Linking export to ActionScript Class.
2: File - Publish Settings check SWC format and publish as follows:
3: check, created swc file in your project. now you can using a swc other project you must linking to SWC library in File-ActionScript Settings-Library Path. and later if you change a components design, re-publish. and copy and paste swc file. automatically will change restart swf file. BrushClip.swc has a all components.
you can access as follows:
var brushClip0:MovieClip = new BrushClip0();
addChild(brushClip0);
var brushClip10:MovieClip = new BrushClip10();
addChild(brushClip10);
I've found the solution.
Give the Sprite that holds the imported components a binding class
Edit the class file, declare the components yourself regardless of whether checked the "auto declare instance on stage"
I am making a swc file with code that I have made in actionscript and it works correctly. However after I take all the code and put it into a swc library and it creates the swc with out any compile errors. I go to use the swc and it gives me warnings and want run spaying that
"Description Resource Path Location Type The definition Arrow.Right_png$c7cf89b0fd8fa396e54e299a767d2beb1814885492 depended on by plus.assetsClass in the SWC D:\Adobe Flash Builder 4.7\as3Test\bin\as3Test.swc could not be found projectName line 0 Flex Problem"
Does anyone know why it is doing this or what is going on?
So i figured out what i was doing wrong so what i was trying to do is build some Actionscript into a swc file for reuse in other project.
In side the swc I had some as3 files that had some embed codes in them such as...
[Embed(source="Botton Arrow Down.png")]
public static var buttonDown:Class;
Witch works when it is in a project but when you use the above code in a swc the spaced cause it to not be able to find the embeded file. After the swc is compiled. BUT this does not cause a compiler error in the swc it just causes a warning saying that it can't find the file on the project that you are using the swc in. To fix this just remove all of the spaces.
[Embed(source="Botton_Arrow_Down.png")]
public static var buttonDown:Class;
With the spaces removed it work fine. I don't know about this but it is something to remember when using swc to hold embed assets. Hopefully someone will be able explain why.
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
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 !
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.