I am fairly new to Flash and AS3.
My questions is do I actually still need to use Flash CS6 to setup the stage and library files.
Or can it all be done from FlashDevelop ?
Thanks
Flash CS6 is an application similar to Photoshop, you generally use it for creating/structuring/positioning graphical resources and then makes it possible to animate these (from keyframe to keyframe) and then access the graphical content from code.
So, the answer is no, you can create a SWF file without Flash, you can embed content to use in AS3-code without flash and you can use flex-components and position them without flash.
But creating any bigger project like that would be pretty unnecessary since you just as well could use some other language or tools for doing that kind of stuff. Tools and languages that were designed to do this specific thing.
Few months ago I switched completely to FD and since today I successfully built everything only in FD. The reason was that I had huge project to publish, and I couldn't compile it in Flash because of memory shortage for JVM compiler. With FD that was not a problem.
So in short, no, you don't need flash any more.
Though maybe there can be some things that you can create quicker and easier way in Flash than in FD (for example: some timeline animation and then publish to SWC to use with FD).
I still have Flash installed, just in case for quick animation jobs.
You need it if you want to create graphic objects to use them later in your code. The alternative is to create everything by code
It depends. If you need to use vector graphics, drawn in Flash, then the easiest way to incorporate them in your project is to use the IDE-based project (http://www.flashdevelop.org/wikidocs/index.php?title=Projects#AS3_Flash_IDE_Project). This isn't the only way, but it's easier than packaging them up and using libraries. In this case you are effectively using FD just as an external AS editor (and it's worth doing it just for this, since it is a much better editor than the one built in to Flash Pro.
If, on the other hand, you are working with objects drawn in code, with text, or with external bitmaps, then no, there's no real need to use CS* at all.
The advantage to OOP is having an environment like Flash for layout. It's been pretty crucial for me as a designer and when implemented correctly with a proper class structure, becomes extremely powerful. It really depends on what you are using as3 for. I find the Flash architecture to be most advantageous in the context of interface design, but for things like games or "static" interactives, sometimes its much more efficient to do everything in code and compile outside of Flash.
Related
I have to "convert" some flash projects to HTML5/JS but I don't really know how I can do it :(
This flash projects are little "activities" like this one :
https://www.brainpop.com/artsandmusic/artconcepts/cameras/activity/#=standard
I did some research about it, but i'm a bit lost...
I found other people asking the same question and a lot of responses are to use Haxe/OpenFL and as3hx (https://github.com/HaxeFoundation/as3hx) but I don't really understand how to proceed...
Is it possible to load a .swf file with openfl-swf to create a similar .html file ?
Should I convert AS3 to Haxe3 with as3hx ?
Is there a simple way to just get a graphic render of this activities without any interactivity so I can add manually input text field ?
I never used ActionScript or Haxe before.
If someone has any suggestions i'll be glad to hear it :)
I hope my explanations are clear, english is not my first language, so excuse me for any mistake.
Cheers !
as3hx will convert only as3 code to haxe openfl and may well need hand tweaking. To make the code more flexible try to avoid extending Sprite then potentially it will be easier to use your activity logic in more webgl accelerated haxe solutions like Kha and Luxe.
You probably need clean seperation of the code and the onscreen layout.
To run a fla swf that is mostly graphics in openfl you need to use the haxelib https://github.com/openfl/swf, it can be quite fiddly getting to different children or frames and the gradients are not perfect, just remember when using it that it's not the same as accessing a child normally your using a structure that is a bit different to do that.
Alternatively you may find flump useful it can be used with openflump.
https://github.com/SavedByZero/openflump exports from flash IDE.
It converts lots of your graphics to png sequences in nested structures, it would probably be worth rebuilding textfields yourself.
Openfl js can be slow I suggest you do some tests before committing to a solution, since Kha or Luxe may provide you a more shader modern approach to graphics than a flash emulation api solution, but then all you assets largely need to be images.
I doubt if there is any ideal way but getting your logic in Haxe is really good idea because then you can do c++, c#, js etc.. The first step if you choose openfl is to perhaps to try just porting parts of your code to haxe and then use them as a swc in your current projects this will allow you to gradually check your conversion and fix an issues easily within a haxe flash approach prior to trying to do the same in html haxe. You may find the swf library is not ideal for html5 and that png's are the way to go, Animate now provides export png sequence which I have used in starling as3. Another approach to consider is the away3d plugin for Animate it can convert flash timeline into typescript away3d (2D ) that you can control with javascript code ( even haxe you may have got from as3hx if you remove some of the flash specific haxe and adjust it to work with the away3d 2d but I guess it could be very complex ).
I am making a project in AS3, but I have come to a point, where I need to branch out, because I want it to publish to 2 places, which each require a bit of different additional code to function properly. So is it possible to achieve that I do not need to make 2 projects and maintain 2 similar projects?
I hope I wrote it clear enough.
Thanks for your responses.
You can do several things, depending on whether you're working in the Flash IDE, Flash Builder, or one of the other tools like IntelliJ.
If you are working in the Flash IDE and/or have a Flash Professional project set up in Flash Builder, you can go into the ActionScript Properties panel and set up a source path that points anywhere (I usually try to keep it relative, but it's up to you).
If you're working without a fla/xfl, then you probably need to look at setting up a library project.
This is a big reaseon for OOP! Write Base Classes and extend them for your Projects as needed.
Also check out Conditional Compilation
so let's get to the thing. I have to estimate a project that's main goal is to migrate from FLASH interactive and complex animations into HTML5.
As far as I've read there are plenty of questions how to do it... so I've researched there is Swiffy / Wallaby / Adobe Flash Professional Toolkit for CreateJS and Online converters and here goes the BUT... but many persons said it won't handle more complex FLASH animations (only simple ones).
So the question is: Does someone have an experience with such a migration, is there a non-manual way to do it?
Thanks in advance!
Yes, there is a non-manual way to do it for most Flash animations that contain some ActionScript, as well as a limited set of more interactive applications. If ease is your first concern, try the latest release of Swiffy (5.0 when you wrote your question and as of this response). Swiffy supports a substantial feature set of ActionScript 3, more than enough for navigational controls.
Drawbacks:
The level of snappiness may be unsatisfactory; I have been happy with functionality of some simple game conversions but they are sluggish.
The end product is SVG, so you'll also have to contend with unsupported browsers.
Changes to artwork will probably need to be made to the natives first, then re-exported. Otherwise, there is a hefty JSON config you can edit (and watch it blow up).
You may need to get under the hood with sound (I use SoundManager2).
I am less familiar with the Wallaby/CreateJS workflow but ActionScript support during export from Flash is extremely limited. Essentially, it enables you to export your asset library for use with CreateJS on the JavaScript side.
Is there anywhere a GOOD tutorial page where I can learn ActionScript 3 ? Or can you help me out ?
I don't use a GRAPHICAL DESIGNER and I don't want to. All I need is code.
For example: things I need to learn quick:
Buttons and TextFields (basic form stuff)
Drawing canvas (like the html5 canvas)
Using FlashDevelop + Flash SDK, no plugins, no nothing. I just got it to work (compile, build and start a blank piece of nothing) and now I need to see what I can do with the ActionScript code.
Solved: Thanks to Dannyw the 2 items above could be solved directly (with minor additions)!
Julian's answer is very helpful too. Since I also wanted to browse through all standard classes in Flash:
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/index.html
I have some tips for you to become a great flashdeveloper:
Drop everything you know, start fresh. You have strange assumptions of how the workflow should be. If you want to become professional, you should be open for other workflows.
If your coming from actionscript 2, Dont think as2 is like as3, so don't try to do the AS2 thing with AS3. Again, drop everything you know.
Read & Learn the Adobe LiveDocs
Learn how the display list works.
Learn AS3 coding standards, learn to write clean readable code, later try to learn design patterns.
Learn how to use common actionscript libraries, TweenLite, Gaia framework, RobotLegs, Temple Library, Pure MVC, Away3D, as3corelib etc.
Dont try to reinvent the wheel, dont create your own framework, because you think there is none like yours, most starters step into that trap.
Code never inside the Flash IDE actionspanel, there are really nice actionscript editors like FlashDevelop, FDT, FlashBuilder, IntelliJ. But dont lose yourself in code, there is a lot visual stuff that can faster be build using the Flash IDE, so find a nice workflow, instead of limiting yourself.
if you like video tutorials; videos on gotoAndLearn.com, most have common practices.
If you like to learn from opensource projects: find as3 projects on github.com or wonderfl, check out how they did it.
if you like to read blogs: feeds.adobe.com is full of nice relavant blogs. Learn from the best.
Last but not least: there is no ultimate guide to become a flashdevelop-code-only-flash-developer. Like sport, you have to train and just experiment right away. So be open, use google alot, try to challenge yourself with excercises and fun experiments.
For buttons:
http://www.how-to-code.com/as3-actionscript3/as3-buttons/as3-button.html
For Textfields:
http://www.republicofcode.com/tutorials/flash/as3text/
For Drawing:
http://www.republicofcode.com/tutorials/flash/as3drawvectors/
I learnt actionscript the same way you intend to, just by reading tutorials on the internet and picking bits up as I went along. I eventually bought myself a big old actionscript bible too (Essential Actionscript 3.0 by Colin Moock), but can safely say that the internet was my most valuable resource!
Have fun with the tutorials :)
Use this:
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/index.html
BTW, You should almostly declare this website as holy when programming in AS3.
Using adobe flash or macromedia is recommended, follow these tutorials I learnt everything about flash from this website.
http://www.lynda.com/Flash-CS5-tutorials/flash-professional-cs5-essential-training/59964-2.html
I have made an application that is coded only in ActionScript 3.0, and uses HTML and JavaScript for the display.
I would like to have the same result, but using Adobe AIR. I do not know Adobe AIR at all, so I was wondering if you could direct to some good tutorials that will teach me how I can move my .html/.js/.as files to Adobe AIR please. I am using Adobe Flash Builder 4.
Thank you very much,
Rudy
Are you using HTML and JavaScript for anything other than embedding the SWF? If not, you can create a Flex project from Flash Builder (at least that was the way in Flex Builder 3 - I don't know if they've changed it) and mark output format as AIR to start with. The easiest way would be to add the main Sprite of your AS project as a child to the rawChildren of the WindowedApplication class of the AIR from the creationComplete event handler.
It is hard to say more without knowing what type of project you're talking about.
You could still do this, but you would have to embed your own browser. Look at HTMLLoader:
At the very simplest, your air app would create an html display, where you would then embed your swf into an html page. (almost exactly like what you're doing now). However, AIR's webkit seems fairly old, and they didn't import everything, so some css stuff like corner-radius, etc, will not display as you would in any other browser.
However, this will only get you so far, as you won't have AIR capabilities yet. You would have to extend HTMLHost to create an API for the javascript container to access desktop'y capabilities, when you when then again have to use ExternalInterface again. This is probably where things will get a lot more tricky.