Showing posts with label flash 11. Show all posts
Showing posts with label flash 11. Show all posts

Monday, 24 October 2011

Cubic Bezier Curves - Flash 11

With all the (deserved) hype surrounding Stage3D, it's easy to miss some of the other great new features of Flash Player 11.

Over the weekend I tried and failed to find an example of Cubic Bezier Curves (cubicCurveTo), so there was no way out but to build one. In the past this would required a degree in maths and a minimum 4 litres of Red Bull, but with the new command any idiot can do it, and here's the proof...

DEMO

Click to add a point, click and drag to set the bezier curve. Right click to either "end" or "close" the polygon.
Once the polygon is drawn, use the control points to change the curves and vertex positions.
Press "Reset" to, err, reset.

And here's the source to get you started on your very own Illustrator clone.

Thursday, 21 July 2011

Setting up CS5 and CS5.5 to target Flash 11 player

I've seen a lot of people looking for a way to publishing Flash 11 content from the CS5 and CS5.5 IDE, so here's a quick guide...

(I don't have CS5.5 myself, or a Mac, but have set it up on a mates machine so I know it can be done, please bare with me!)

1. If Flash is running, close it. Go into your Flash directory (usually Programs > Adobe > Flash) and find Common > Configuration > ActionSctipt3.0
In that folder you should see several folders, including FP9 and FP10 etc.
Create a new folder and call it FP11.



2. Download the globalPlayer.swc from Adobe labs.
http://labs.adobe.com/downloads/flashplayer11.html
Save it in your new folder. (it will have a longer name, so rename it to playerglobal.swc)

3. You need to create a player profile, so you can choose Flash Player 11 from Flash.
Under Common > Configuration > Players you will see a bunch of xml documents. Open the one called FlashPlayer10_1.xml or any Flash 10 player file.
In that you will see a path to a playerglobal.swc
Change the path so it points to the one you just downloaded and change the name of the player, etc.
There's 2 lines I changed in my CS5 version:

<player asversion="3" id="FlashPlayer11" version="13"></player>

and

<playerdefinitionpath as2="$(UserConfig)/Classes/FP10;$(UserConfig)/Classes/FP9;$(UserConfig)/Classes/FP8;$(UserConfig)/Classes/FP7" as3="$(AppConfig)/ActionScript 3.0/FP11/playerglobal.swc"></playerdefinitionpath>


(I don't know why it's version 13, but it is!)

Save the file in the same folder, as FlashPlayer11.xml
Here's a link to my file, if you're stuck, but it may vary slightly depending on where you have flash installed.
http://www.videometry.net/broomstick/FlashPlayer11.xml

Now you should be good to go!

Remember to choose Flash Player 11 in you publishing settings and Hardware Settings: "Level 1 - Direct" to turn on hardware acceleration.
When publishing, you need to publish direct to the browser (F12) as Flash will still have a F10 stand alone player for previewing/debugging.

If you want to run examples that use the EMBED tag you will need to download the Flex SDK.

Any questions, or variations you come across, just make a comment and I'll help if I can.

Good luck!