Do you have any references, books, or tips for people trying to get back into programming with AS ?
I have some basic programming knowledge, but the last time I did anything with Flash was around 2005. I gather the workflow has slightly changed since then …
I’m planning on using AnimateCC with FlashDevelop.
I know most AS3 semantics. Basically I knew Flash Professional in 2014 when I was 12/13 years old (I was only good at using timeline scripts) and a bit later in 2015 I was having medium JS knowledge (I’ve created a site and forum from zero in Hostinger at 2014 December) and I had built a space-ship game just for test. Under the hood, I think Flash Professional uses (A)MXMLC or maybe its front-end for building a FLA project and outputting SWFs.
When you set you entry-point script there on Flash Pro., it must define a class with that script name, into a package equivalent to its relative pathname or into a unnamed package.
Adobe Flash Platform official documentation
eg. “ActionScript 3.0 Developer’s Guide” or the infamous AS3LCR (Language Core Reference)
the pros are that it is a pretty damn good documentation from the mothership itself, that you can download it as PDF (portable, local, even works on mobile reader).
the cons is that people prefer to go ask a quick question on stackoverflow instead of reading the damn doc.
- Adobe AIR official documentation
eg. “Building Adobe AIR Applications”
- Adobe Flex 4.6 official documentation
- ActionScript Native Extensions official documentation
eg. “Developing Native Extensions for Adobe AIR”
- Optimizing Performance for the Flash Platform (kindof an official documentation)
ActionScript 3.0 Reference for the Adobe Flash Platform
the pros are the tons of examples (thanks to asdoc), the always updated reference, the selection of runtime versions and the redirection to topics into many of the Adobe official documentations (above).
the cons are well … some things are kept out of the documentation like the Proxy class, the IExternalizable interface, and other “strange things” like avm2.intrinsics.memory etc. and there are no user comments.
I have already spent quite some time with Google, trying to find answers to a bunch of question, but it seems that a lot of old places and tutorials no longer exist. And the same with some of the Adobe documentation … How sad.
So, Zwetan : thank you very much for this long list ! I will read it all … eventually.
When I used Macromedia Flash, we programmed inside the timeline. Do I understand it correctly that this is frowned upon now ?
And what about Flex ? Is that still used ? I’m guessing for games, I should use AIR + ASC2, right (for desktop/mobile)?
I like web for small free games, but I’m not sure if that’s still convenient, with the switch to html5. I guess there will be more problems with browser compatibility and such …
You don’t have to read it all but as reference if you’re not sure how an API works or other things like that, you will probably find the details in the official doc.
For rotten links, well … it happen everywhere on the internet
try your luck with web archives wayback machine: https://web.archive.org/
You can still do it with Animate CC but imho it is not the best way to do once your program become quite big (it’s like the goold old days of AS2, AS3 can do much better).
Usually what I advise is to build the assets in Animate CC, export them to SWC with named symbols
and then use the external SWC as an external library in Flash Builder (or any other IDE) to do the programming.
But really it depends on the project itself.
So Flex is 3 things really
the IDE, Flex Builder, which got renamed to Flash Builder
not update since last version 4.7 but you can work with it for most projects
Now the thing to understand if you can have 2 paths depending on which SDK you choose
either use the Flex SDK (either old Adobe Flex SDK or new Apache Flex SDK)
that you can merge with the “old” AIR SDK (based on ASC1)
or use only the “new” AIR SDK (based on ASC2)
almost the same but it uses a new compiler
The differences in compilers are not that important (unless you badly need some specific things)
and technically you can use both the compilers, for ex: you could use a SWC compiled with ASC2
in a project that use the Flex SDK merged with AIR SDK (ASC1).
If you use something like Flash Builder and need to use different versions of the Flex/AIR SDK
it is easier to use the “Flex SDK merged with AIR SDK”, but really a detail if you build only 1 project for 1 platform.
That said, I would say knowing how to setup both is a plus for a dev.
For the technical, here the differences using ASC 2.0
In short ASC2 is a stricter compiler and allow for inlining and dead-code elimination,
but it can confuse a lot of dev when it comes to compile font and/or writing strict AS3.
Yeah well SWF on the web is soon to be dead since Flash EOL has been announced for 2020,
you can still work with SWF files and use HTML that embed SWF on the desktop etc.
see for ex AIR, HTML and SWF, but SWF running inside the default browser on the user’s desktop is a dead end.
If your ultimate goal is to produce games for the web, Flash/SWF is not anymore the solution.
Maybe Apache Royale will bring a solution to that in the coming years,
maybe you can ditch the web and produce only for desktop and/or mobile,
or maybe you can ditch AS3/Flash/AIR and move to HTML5/CSS/JS (which imho is a dead end too for other reasons).
In fact, tech move really fast and it’s pretty hard to predict what will work nicely in the futur,
only thing I can say is if you plan to produce a small’ish Flash game to publish as SWF on the web,
it can still work now, but expect it to become harder and harder for your users to play it from now to 2020, and in 2020 it will be technically impossible as all major browsers will have removed altogether the flash plugin.
But the same you can take an “old” SWF game sources and update it to publish on mobile with AIR,
you can also plan your new SWF project the same way.
You need the named symbol so you can access/control it from code
but you don’t have to name all the child symbols if you don’t need to
In itself you can not directly access the stage, you will need to
select all the stage timelines and layers and move it to a MovieClip with a symbol name
for ex MyStageSomething
usually the workflow is:
while working within Animate CC
you drag n drop the named symbol onto the stage
then work/test it for the animations parts
then you export the FLA to a SWC
from the project in “code mode”
you reference the SWC in your external libraries
and you add to the stage the named symbol you need
It’s nothing new, in the past in the flash examples you could have seen
a clock edited in Flash CC, you would have different individual symbols:
the dial, the minute hand, the hour hand, the case, etc.
Then in the code part you could have a UIClock class
aligning and composing visually all those symbols together.
adding the logic connected to a timers, so when the time is updated
you move the minute hand and/or the hour hand, etc.
It depends what you try to do, you can as well use none of them (Flex or Feathers)
or use both of them or only one, whichever fit better your need for components/skinning.
So I would say Flex SDK would be better fit for a UI that does not have animations
but need to display a lot of grid/tables like a database editing software.
Feathers SDK would be better for mobile UI when you need the speed of Stage3D
for things like those long scroll list you see on mobile where it speed up and bounce etc.
Personally I don’t like to use components/skinning, if the UI is really custom
I think you can feel limited by the components that are available and what you can do with the skinning,
so most of the time I build everything from scratch depending on what the app need.
That said, components SDK/frameworks can be convenient if you don’t really want to think how you build the UI, but I don’t subscribe to the idea that they earn you time in the long run.