Possible to step through/breakpoints as3 in flash buider when compiling with flash pro? - actionscript-3

As it says in the title, I have a project that is based in a Flash Professional .Fla
However, I am doing all of the code writing and editing in Flash Builder. They are both set to have the same source path.
Although Flash Pro has the step through/ breakpoints functionality, it is not aware of breakpoints I add in from Flash Builder.
Since the project is meant to be compiled through the .fla I also can't simply compile with Flash Builder.
Does anyone have this workflow setup, and have you managed to put breakpoints in your code?

This should work. I use the same setup almost all the time. How did you create your project?
I usually create the fla, then in FB I select new->flash pro project and point it to the fla file.
Now if I add a breakpoint in FB and I test the movie with ctrl(cmd)+shift+enter, the movie is published in Flash and is stopped at the first breakpoint.

Related

Converting SWFs to EXEs

I'm building a program in Actionscript 3 and would like to convert the .SWF file to an EXE without using Flash Pro CS5. I found http://swf-to-exe.com/ and it works well, but I'm wondering if there is another way to do this. In the long run we'll need Mac executables, too, and if I can avoid putting it all in Flash I'd like to do that.
The most simple way is to create projector file with Flash Player, but you have to do it for every OS. It embed the hole Flash Player into the resulting *.exe file.
Steps for exe:
Download 11.2.202.235 Flash Player vesrion
Open flashplayer_11_sa_32bit.exe
Open swf file with this FP or drag and drop swf on player
File->create projector
As I know the last FP version, where projector feature works is 11.2.202.235, for Mac it can be another version. There is the description of this #Bug 3363321 in Adobe bugbase
Adobe AIR is the standard solution for packaging SWF applications natively. The AIR SDK is freely available and includes the mxmlc compiler which will compile .as to .swf, and the adt packager will package your SWF and assets for Android, iOS, Windows, and OSX.
It looks like you want to bundle natively for Windows to produce an executable. Do you have a programming environment? You may want to check out the free Flash Develop IDE.
Ah, so you are using Flash Develop... Good, onward.
In Flash Develop, I created an "AIR AS3 Projector" type project named DesktopTest. I then modified the Packager.bat file according to the article I posted above. Change the OUTPUT and call adt lines and leave the other lines of the file in-tact:
set OUTPUT=-target bundle %AIR_NAME%
And:
call adt -package %OPTIONS% %SIGNING_OPTIONS% %OUTPUT% %APP_XML% %FILE_OR_DIR%
You then need to run CreateCertificate.bat once (right-click, execute). After that, compile your project and run PackageApp.bat. For my project named DesktopTest, this results in a DesktopTest sub directory that is my compiled app, with a DesktopTest.exe in it.
SWF converted to EXE is most likely a projector file, it still needs a Flash Player. Depending on build it could have the FP compiled into itself and thus don't need a Flash Player externally, but it comes with a cost or larger file-size.
Now with AIR, you have a choice to make a Flash project that will run natively trough the AIR virtual machine (that can be included for compilation time, so the user doesn't need to install it separately). But still, there WILL be a SWF file in that EXE or APP package.
Good thing about AIR - it works universally on both Win and Mac. Mobile platforms are also supported.
You can build AIR projects without buying Flash Professional, CC or Flash Builder. Just download the SDK and compile your code.
If you're using Windows, you can do it very easily with FlashDevelop - it's a powerful IDE that works out of the box. And it's free too!
http://www.flashdevelop.org
Get MDM Zinc. It has everything you need for crossplatform flash development.

FDT - Where is new Flash Project?

Up until this point I have been doing all of my coding in sublime text 2, and compiling with flash pro cs6. I have gotten pretty good with actionscript 3. I have been uing the mvc design pattern and used external libraries like admobs and electroserver. The real reason why I got fdt and wanted because I wanted to play a source file I downloaded in which the document class was mxml.
In every tutorial though I see them say, "oh just click new flash project". the problem is though that there is no choice "flash project" There is only actionscript project and fdt project or fla.
In flash ide I would use one .fla as a "shell" to publish from, and have another .fla with the assets that would be embedded in as3 from its swf. I'm sure that's not the way to set up files in fdt, but I dont know the right way to do it, or even the right way to start.
Maybe I am not finding the right page, but it seems that the documentation on the site is pretty weak. Are there good tutorials somewhere that will help me start compiling projects? thanks
A tutorial specifically for people transitioning from flash ide to fdt would be helpful too.
I could be wrong, but from this IDE, you can't compile fla.
Instead of this, it provides another approach to build projects.
You have to start "new FDT Project", select base and set main class,
which must be compiled.
In result this approach more flexible and convinient.

How to sharing classes code in different SWFs?

I am working on a Flash project. In the project there are lots of isolated FLA files which may share the same common classes code. To clarify the project limitation:
I could ONLY use Flash CS6 IDE. No modern tool such as Flash Builder or Flex, just pure Flash CS6 IDE.
I have to export the FLAs to SWFs one by one separately so each one of SWFs would contains a copy of the ABC of the common classes.
I have a loader.swf which was going to load all the other SWFs into a same ApplicationDomain. In other words all the duplicated ABC in the SWFs would be ignored because the loader.swf has also already involved that.
And my questions are:
Is there any way I could pre-compile all the common classes into a SWC or SWF and I could use it just like a DLL or SO?
If so how could I create such a SWC or SWF only by Flash CS6 IDE as I told before?
If I could create such a SWC or SWF how should I use it? Such as How could I change my configuration in the Flash CS6 IDE?
To be honest I don't know my idea is valid or not. Please, any advise would be great helpful.
Thanks.
I found the solution:
Create a FLA which would touch all the common classes
Exrpot the FLA I would get two files: SWF and SWC
Use the SWC as "External Library" in other FLAs
Use the SWF as Run-time Sharing Library to dynamic load it at run-time

How to set Flash Player window location in Flash project as3?

I have 2 monitors on my computer, also am writing a program on AS3 that is exported to standalone SWF. My task is to make my app fullscreen on 2nd screen. How can I do this?
I tried converting my project to AIR project. It is possible there by using nativeWindow property of Stage. (setting x coordinate so that it appears in second screen and then call fullscreen). It works in Flash, but when I'm running compiled swf outside Flash, my app crashes (nativeWindow property not found).
So please do help me to solve my problem. I am disappointed, have been looking for solution for already 3 days...
You have to stick with your AIR application and use it as it is supposed to: run the .air file. You can't launch an AIR swf alone because it will miss all the AIR runtime including the NativeWindow you are insterested in.
To be clear, you can't manipulate windows from a swf launched with the Flash Player.
Another solution would be to execute your swf from a web browser and use javascript called through ExternalInterface to move the windows. But it may be quite painful in comparison with AIR.

Are there any libraries that bring CS4 Actionscript to Flash CS3?

Are there any custom libraries available that allow me to code/publish in CS3 using some of the features of CS4?
EDIT:
I say "some", because I understand that it is obviously nearly impossible to reimplememnt CS4 in CS3.
There is no difference between CS3 and CS4 in terms of code. You just need to target the current Flash Player 10 platform in your publish settings. They are both using the same Actionscript 3 libraries.
You can't load a CS4 project in CS3, but you can save your project to be CS3 compatible inside of flash CS4.
Oh, my bad. It's true CS3 can not compile for the Flash 10 platform. Therefore, no. There is no library, because the changes all require the new benefits of the Flash Player 10.
You can however use flex to compile your code. This will however require you to convert your code to flex.
You shouldnt be able to run anything in CS3 that is CS4 compliant only, mainly because it should require flash player 10 to run the code correctly, which you cant compile for in CS3.