Archive for May, 2007

DFWAUG – Presentation

I learned a lot from yesterday’s presentation of the Display List of Actionscript 3 (in the realm of public speaking for programming). If you missed it here are the files and presentation.

Dallas-Fort Worth Adobe Users Group Actionscript 3 presentation

Add comment May 20th, 2007

Actionscript 3 Clouds

I made my own rendition to AS3:Cookbook example of Perlin Noise, an effect created for Tron believe it or not.

[as]

package {
import flash.display.Sprite;
import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.events.Event;
import flash.geom.Point;
import flash.display.BitmapDataChannel;

public class Clouds extends Sprite
{
private var _bitmap:BitmapData;
private var _xoffset:int = 0;
private var _w:Number
private var _h:Number

public function Clouds(w:Number, h:Number)
{
_w = w;
_h = h;
_bitmap = new BitmapData(_w, _h, true, 0xffFFFFFF);
var image:Bitmap = new Bitmap(_bitmap);
image.x = image.y = 0;
addChild(image);
addEventListener(Event.ENTER_FRAME, onEnterFrame);

}

public function onEnterFrame(event:Event):void
{
_xoffset++;
var point:Point = new Point(_xoffset, 0);

_bitmap.perlinNoise(200, 100, 2, 1000, true, true, 8, true, [point, point]);
}
}
}

[/as]

2 comments May 8th, 2007

Programmin Flex 2 pre-review

Programming Flex 2 imageI have been reading O’Reilly’s new book Programming Flex 2: The comprehensive guide to creating rich media applications with Adobe Flex. I’m enjoying it, I’m trying for this to be the first programming book I read cover cover and don’t just read the first 2 chapters and then act like I know what I’m doing. After 5 days I’m on chapter 8/19.

I like the book it reads well and is not confusing at all. When the book finally came in my Barnes and Noble, after a month and a half delay, this past Tuesday; I was hesitant to us my gift card on a book that may tell me the same stuff I can find on Adobe’s quick start pages. I thought I really want to learn Flex. No just from a going through the motions sence but know when, why and where I’m using components or Flex all together. The only way know to that is reading, not copy and pasting. The book has already given me some ideas for an Apollo app for work. I’m now realizing what Flex if for.

I’ll post when I finish it to give a final review.

Add comment May 6th, 2007

SecurityError: Error #2122. Anyone?

This guy lays it out on how to stop that stupid error in Flex 2.0.

http://tinyurl.com/2ytl43

2 comments May 5th, 2007

Flash CS3 animator class and loading XML animation at runtime

So there is a new animator class. It works like FuseXML. The animations are set by nodes and attributes.
To do this:

  1. start a CS3 document
  2. make an mc called ‘abox’
  3. make an animation
  4. select the animation
  5. Commands > Export Motion XML
  6. name xml file “motion.xml”
  7. create an actionscript layer
  8. Then load XML as usual.

add:

[as]import fl.motion.Animator;
import fl.motion.MotionEvent;
import flash.net.URLLoader;
import flash.net.URLRequest;
import flash.events.*;

var abox_xml:XML;
var requester:URLRequest = new URLRequest(”motion.xml”);
var loader:URLLoader = new URLLoader(requester);
var abox_animator:Animator;
loader.addEventListener(Event.COMPLETE, startAnimation);

function startAnimation(evt:Event):void {

abox_xml = XML(evt.target.data);
abox_animator = new Animator(abox_xml, abox);
abox_animator.play();

}[/as]

Add comment May 4th, 2007


    Blog Calendar

    May 2007
    M T W T F S S
    « Mar   Jun »
     123456
    78910111213
    14151617181920
    21222324252627
    28293031  

    Posts by Month

    Posts by Category