Scriptplayground Network

Archive for the 'Actionscript' Category

by mkeefe on Oct 1st, 2007

Love is in the AIR

OK not the best title ever, but the information within the post is far more important.

Adobe has released AIR beta 2 which offers a wide selection of updates, including:

ByteArray
Clipboard, Drag and Drop
Door
File API
HTML
NativeWindow
Relative URLs
System

In other news regarding AIR I was just given approval to post information about an AIR application that I developed while working with Organi Studios which can be learned about here.

I leave this post asking a question to all potential AIR developers.

1. What features of AIR do you find the most interesting?
2. What features do you find to be the least interesting?

Again, here is the link to download AIR

Head on over to CodeApollo if you want to talk about AIR.

by mkeefe on Aug 21st, 2007

Flash Player 9 Update

Just hours after Adobe released the Flash CS3 Air Compiler, they have released an update to the Flash Player.

Here is what got updated/added:

  • Support for H.264 video and HE-AAC audio codecs
  • Multi-core support for vector rendering.
  • Full screen mode with hardware scaling.
  • Flash Player cache…
  • more

Seems the Adobe Labs has been very busy these last few weeks.

by mkeefe on Aug 17th, 2007

PHP to generate font code for Flex

I have been loading Fonts for a project for over 2 hours now and I am about 70% done. Basically I needed an SWF library of fonts to be used in an application I am developing, problem is the font needs to be registered (loaded) in order for the “New Font” option to see it. Now on the Mac I found adding/deleting fonts is easy, but very time consuming.

This is all being done in AS2, of course my love of Flash comes in to AS3, where I was able to (just for testing) create this little PHP script that reads a directory of fonts and creates the embed tags for me.. figured I would share it, so here it is.

Again, this is ONLY for AS3 (in Flex).

<?php
$dir = opendir('./fonts/');
while (false !== ($file = readdir($dir)))
{
if ($file != "." && $file != "..")
{
print "@font-face {\n\tsrc:url(\"fonts/" . $file . "\");\n\tfontFamily: myFont;\n\tflashType: true;\n}\n";
}
}
closedir($dir);
?>

It repeatedly prints out import blocks, like this:
@font-face {
src:url("fonts/LT_13171.ttf");
fontFamily: myFont;
flashType: true;
}

Continue Reading »

by mkeefe on Aug 10th, 2007

Flash printing, not playing nice

While working on a Flash project this week I came across a nice bug in the printing process. Basically you create a couple of shapes on the stage, call the print process and you get a printed page.. well thats how it is suppose to work.

However I found out that the local version of Flash doesn’t print the colors correctly and I did have one of my developer friends test this with the same results.

After a few hours wasted trying stuff I published the movie and went on with the rest of the project. Well today I tested it all live and found out the colors were perfect.

Local print results

picture-2.png

Live (server) print results

picture-3.png

You will notice I got a nice purplish blob and no V2 component label when printed locally. Just wanted to put this out there so you don’t waste time testing code like I had to.

by mkeefe on Jul 2nd, 2007

AIR Compiler for Flash CS3

Adobe has indeed talked about compiler support for CS3 however it isn’t available at the moment. Well Grant (gskinner) Skinner has developed an AIRCompiler for CS3. It is (as he mentions) a little difficult to get running, but once you do you can compile and test AIR applications inside Flash CS3. Hats off to gskinner for putting this one together.

« Prev - Next »