Archive for the ‘flash’ Category

Apollo is now Adobe Intergrated Runtime Flex 3 Moxie is beta to the public

Jun
11

Wow, Apollo is now beta. I’m going to still call it Apollo. I like it better then that stale name it is now. I like the acronym but not the full name.

Also Flex 3 beta is out!!! Get it now.

Flex builder 3 MOXIE

Flex SDK

Apollo beta 1

Apollo SDK

HAPPY CODING

Filter Data with ArrayCollection

Jun
6

After watching a Lynda.com tutorial realized I didn’t have to do as much work to filter data.

the filterFunction is a public property of the ICollectionView witch is the class that the ArrayCollection extends from.

So this function/method is accessible to a ArrayCollection.
[as]

< ?xml version="1.0" encoding="utf-8"?>

< ![CDATA[
import mx.collections.*;

private var collectionArray:Array;
[Bindable]
private var collectionData:ArrayCollection;

private function init():void
{
collectionArray = [{first: 'Dave', last: 'Matthews'},
{first: 'Amy', last: 'Grant'},
{first: 'Bilbo', last: 'Baggins'},
{first: 'Jessica', last: 'Tandy'},
{first: 'Paris', last: 'Hilton'}];
collectionData = new ArrayCollection(collectionArray);
}

public function filter():void {

//pass my filter function to the method w/ no ()
// you must also refresh it
collectionData.filterFunction = filterFirst;
collectionData.refresh();

}
// function see's if the searchField's text is equal to the "first" object of the collectionData

//if true it show results, if false it shows nothing
private function filterFirst(item:Object):Boolean
{
return (item.first == searchField.text)

}
]]>
[/as]

Problems w/ this:

  1. I have not found a way to match with just typing in “Da” and it is case-sensitive
  2. When you type in a non-matching string it will not reset to beginning state. (I’m sleepy so maybe that’s why I can’t figure it out.)

DFWAUG – Presentation

May
20

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

Actionscript 3 Clouds

May
8

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]

Flash CS3 animator class and loading XML animation at runtime

May
4

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:

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();
 
}

Tweened Menu

Oct
12

The funniest commerial

Sep
26

Asians want to be so black they got to be sterotyped in a commerial. That’s funny cause you know they couldn’t do a similar thing to black people we’d protest. HA! Click to see

Menu mouse 3

Sep
3

Mouse follow 2

Sep
1

Here is an update from the mouse follow menu. It only works when you are 100px in.

this.mcMouseFlo.onEnterFrame = function() {
if (_root._xmouse < 100) {
this._y = _root._ymouse;
if (_root._ymouse <= 60) {
this._y = 60;
}
if (_root._ymouse >= 301) {
this._y = 301;
}
}
};

Mouse follow menu

Aug
31

Hey so I’m behind on flash knowledge but did this all by myself no help from boone or anybody. It a small Movie Clip that follows the mouse under a mask. Simple but I like it. Excuse the design, I was going for function not look. Now I need to get the box to stay a bit while over the button and not follow so close.


this.mcMouseFlo.onEnterFrame = function():Void {

if (_root._xmouse < 89) {
this._y = _root._ymouse;
}

if (_root._ymouse <= 60){
this._y = 60;
}
if (_root._ymouse >= 240){
this._y = 240;
}

}