Log inSkip to content

May 16th, 2008

Flash Player 10 beta released

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:

1. Create your Flash movie and write ActionScript with the current development tool (Flash CS3).

2. While writing your ActionScript code take into consideration that the new identifiers, methods and properties will not be recognized by the compiler, so use square brackets where necessary, so instead myObject.propertyName use myObject[”propertyName”], and instead myObject.methodName() use myObject[”methodName”]().

3. Compile the sources into a SWF file.

4. (This step seems to be optional.) Up to now my SWFs compiled for player 9 were running in Flash Player 10 without any change, and I could use the new features. However it seems possible that setting the target version to 10 is required in some cases, so if you meet such case just change the 4th byte of the SWF file to hexadecimal value 0A (decimal 10 - this byte indicates the target player version) using a hexa editor (e.g.: XVI32).

5. Create an HTML document for embedding your Flash movie. I used SWFObject 2, which is compatible with Flash Player 10, and the embedding HTML looks like this one:

< !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 
		<script src="http://blog.tengerstudio.com/wp-admin/swfobject.js" type="text/javascript"><!--mce:0--></script>
		<script type="text/javascript"><!--mce:1--></script>
<div id="myContent">
<h1>Alternative content</h1>
<a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></div>

Replace the parameter values of the embedSWF() method and let’s go. Don’t forget to place swfobject.js into the same directory as the HTML document, and of course install Flash Player 10 :)

Here is a small sample script which uses the new 3D features for creating a rotating object:

var ns: Namespace = new Namespace("http://www.adobe.com/2008/actionscript/Flash10/");
var minZ: Number = 0;
var maxZ: Number = 1000;
var zStep: Number = 10;
 
function enterFrame(aEvent: Event): void {
	logo.ns::rotationY += 1;
	logo.ns::rotationZ += 1;
	logo.ns::z += zStep;
	if (logo.ns::z &lt; minZ || logo.ns::z &gt; maxZ)
		zStep = -zStep;
}
 
addEventListener(Event.ENTER_FRAME, enterFrame);

You can see this sample on-line here. Don’t forget to install Flash Playar 10 to see it in action.

The API documentation of the new player is not available at the moment, so discovering the new features is a must :)

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>



Calendar

May 2008
S M T W T F S
« Apr   Jun »
 123
45678910
11121314151617
18192021222324
25262728293031

Categories

Monthly Archives