Recently somebody asked about creating multi-column text flow in ActionScript 2. I have suggested ActionScript 3 since it offers relatively simple solution, but after few minutes of thinking also figured out a solution for ActionScript 2. I know that AS2 is quite obsolete now and I personally doesn’t use it, only when it is unescapable, but probably there are still many people using it on daily basis for different reasons (legacy projects, target player version limitations, etc.), so even an AS2 solution may be useful.
Read the rest of this entry »
Posted by tenegri at June 7th, 2009, 18:14:43. Filed under: Actionscript, Flash
No Comments • Trackback • Permalink •
In this post I collected some useful resources related to Flash 10, which I found up to now. I’m going to keep this list up to date and extend it as I obtain more interesting links.
Targeting Flash Player 10 beta and development tools
1. Targeting Flash Player 10 Beta with Flex SDK 3.0.x
2. Flex 3 SDK Downloads - The latest Flex SDK, which is capable of compiling Flash 10 targeted movies. Also includes a stand-alone debug player (version 10)
3. Flash Player 10 support in FlashDevelop
4. How to get started with creating content for Flash Player 10 (video tutorial)
3D, the new Drawing API, GPU acceleration
1. Senocular: Flash Player 10 Drawing API
2. Tinic Uro: What does GPU acceleration mean?
3. How to take ordinary display objects into the third dimension in Astro (video tutorial)
4. Mike Melanson: Flash Uses The GPU
Creating dynamic sounds
1. Tinic Uro: Adobe is making some noise. Part 1
2. Tinic Uro: Adobe is making some noise. Part 2
3. Tinic Uro: Adobe is making some noise. Part 3
4. Keith Peters: Astro dynamic sound!
5. How to dynamically create sounds using the new features in Astro (video tutorial)
6. Leo Bergman: Random thoughts on Vectors and samplesCallbackData
Advanced text rendering
1. New text engine
Loading and saving files without server (FileReference)
1. Load and save files using FileReference
2. How to read and write local files using the new methods of the FileReference class (video tutorial)
Streaming, peer-to-peer audio and video
1. Peer to peer, Speex and UDP now in Flash Player 1
2. Justin Everett-Church: RTMFP in Flash Player 10 beta
3. Justin Everett-Church: Peer to Peer (P2P) in Flash Player 10 beta
Other topics
1. Leo Bergman: Random thoughts on Vectors and samplesCallbackData
Documentation
1. Flash Player 10 (Astro) API (new additions only)
2. Flash Player 10 Language Reference (official Adobe documentation)
Posted by tenegri at May 19th, 2008, 21:28:35. Filed under: Actionscript, Flash, Flex
2 Comments • Trackback • Permalink •
Since there is no public documentation for the new Flash Player 10 API I have created a small Flex application which makes easier to discover the properties and methods of the new classes. I also extracted the list of classes defined in the Flash 10’s playerglobal.swc (it is accessible in the latest build of Flex SDK) and placed into the class browser. So, now you can pick a class name from this list or enter a class name of your choice, click on the Describe button and see the result.
The class browser is on-line here.
Maybe I will post the results of my (and other’s) discoveries later with examples
Some keywords till then (beyond the features mentioned on Adobe’s site):
- run-time sound generation
- accessing local files through FileReference without uploading to a server
- new Vector class with generics
- etc.
[Update]
Some people reported that the class browser doesn’t worksand the version detection script prevents it from running (claiming a new player installation). I don’t know what does cause the problem, yet, but I provide here a direct link to the SWF itself until I solve the issue:
http://tengerstudio.com/public/flash10/class_browser/ClassBrowser.swf
[Update 2]
I made a minor addition, and the class browser now displays also the class’ constructor among the methods.
Posted by tenegri at May 16th, 2008, 10:01:08. Filed under: Actionscript, Flash, Flex
10 Comments • Trackback • Permalink •
Adobe released the beta version of the next Flash Player 10 (codename Astro). Further details, downloads, examples and videos are here:
http://labs.adobe.com/technologies/flashplayer10/
The development tools are not published yet, but you can configure Flex SDK to compile to Flash Player 10. Here is the how to.
If somebody is not familiar with Flex, it is possible to use Flash CS3 for the same purpose by utilizing some minor hacks. Just follow these steps:
Read the rest of this entry »
Posted by tenegri at May 16th, 2008, 00:13:42. Filed under: Actionscript, Flash, Flex
No Comments • Trackback • Permalink •
In Actionscript 3 all types, even the primitive types are considered as classes, so String, Number, Boolean, int are such ones, too. By invoking getQualifiedClassName() we can get the fully qualified class name of an object:
1
2
3
4
5
| var n_num: Number;
trace(getQualifiedClassName(n_num)); // Number
var n_int: int;
trace(getQualifiedClassName(n_int)); // int |
This outputs the result as expected: Number and int. The uint however seems to be somewhat different. If a value of uint type passed to getClassByName(), one would except that the result will be “uint”, but actually this is not true.
Read the rest of this entry »
Posted by tenegri at May 3rd, 2008, 16:19:29. Filed under: Actionscript
No Comments • Trackback • Permalink •
When loading a SWF into a Flash movie you can specify the application domain which the loaded movie will use. If this application domain is a child domain of the loader’s (or other movie’s) domain and “the child defines a class with the same name as a class already defined by the parent, no error results; the child simply inherits the parent’s definition of that class, and the child’s conflicting definition goes unused unless either child or parent calls the ApplicationDomain.getDefinition() method to retrieve it.” (quoted from the documentation)
The first part of the quoted sentence is true, but the second one is not working. Calling getDefinition() on the child domain will return a reference to the parent’s class instead of the child’s original one. I think this is rather a mistake in the documentation than a player bug, since it seems quite logical: referencing a class by the normal way and through getDefinition() should evaluate to the same value. Anyway, I already posted a small note about that to the online documentation.
Posted by tenegri at April 15th, 2008, 22:29:34. Filed under: Actionscript
No Comments • Trackback • Permalink •
Recently I played a little bit with namespaces in ActionScript 3 and found a somewhat weird thing. Namespaces have an associated URI which makes them unique. When you define a namespace you can specify an explicit URI or you can omit it. In the latter case the compiler will assign a unique value automatically, so everything should work perfectly. Class members placed into a namespace can be referenced by two ways:
1) by opening the namespace and then referring to the desired member:
1
2
| use namespace something;
myFunction(); |
2) by qualifying the method or property with the namespace:
1
| something::myFunction(); |
This is what the documentation says. But in practice when I omit the URI only the first way will work and the second one will not. The compiler passes over, everything seems to be OK, but suddenly my namespaces defined without URI are not found at run-time. E.g. I have a package where I define two namespaces, one without an explicit URI and one with a URI:
Read the rest of this entry »
Posted by tenegri at April 13th, 2008, 17:35:31. Filed under: Actionscript
2 Comments • Trackback • Permalink •