Archive for the ‘Flex’ Category

HOWTO Create a Facebook App using FlexBuilder

Jun
24

So for a couple of weeks, I’ve been messing around w/ building a simple app using Facebook. I decided to use the new ActionScript 3 API created by Adobe and Facebook. I wanted to do a little tutorial because some of this information is hard to understand since most of the API has definitions like, ” “.

In this tutorial I will show you how to login to Facebook, retrieve your friends list and populate a TileList with their pictures. Ok, let’s get started.

Read more »

Adobe Evangelist Daniel Dura visits Travelocity

Apr
15

So today Daniel Dura, an Adobe Evangelist, came by Travelocity to talk about Flash, Flex and AIR. It was interesting to here him speak and his hair was redder then pictures led on. But I won’t hold that against him. Read more »

Papervision 3D 2.0 / Great White Example

Dec
26

If you haven’t heard from the whole Flash community Papervision 3D 2.0 is out w/ textures, more interactive features and new coding conventions like BasicRenderEngine Class. I was working on a Coverflow thing for a client a week ago that I abandoned and just moded Doug McCune. But when I was going to do it myself I was using the Great White Trunk.

Here is what I came up with:

[as]

package
{

import caurina.transitions.Tweener;

import flash.display.*;
import flash.events.Event;

import org.papervision3d.cameras.*;
import org.papervision3d.materials.*;
import org.papervision3d.objects.*;
import org.papervision3d.objects.primitives.*;
import org.papervision3d.render.BasicRenderEngine;
import org.papervision3d.scenes.*;
import org.papervision3d.view.Viewport3D;;

public class PV3DTest extends Sprite
{
[Embed(source="images/one.jpg")]
private var Pic:Class;

public var scene:Scene3D;
public var camera:Camera3D;
public var viewport:Viewport3D;
public var renderer:BasicRenderEngine;
private var photoContainer:Plane;

public function PV3DTest()
{
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
init();
}

private function init():void
{
scene = new Scene3D()
camera = new Camera3D();
camera.focus = 500;
camera.zoom = 3;

renderer = new BasicRenderEngine();

viewport = new Viewport3D(stage.stageWidth, stage.stageHeight, false, false, true, true);
viewport.addEventListener(Event.ADDED_TO_STAGE, init3d);
addChild(viewport);
}

private function init3d(e:Event = null):void
{
var data:Bitmap;
var photoMat:BitmapMaterial;

data = new Pic() as Bitmap;

photoMat = new BitmapMaterial(data.bitmapData);
photoContainer = new Plane(photoMat, 220, 210, 6, 6);
camera.target = photoContainer;
//photoContainer.yaw(45);

scene.addChild(photoContainer);
renderer.renderScene(scene, camera, viewport);
addEventListener(Event.ENTER_FRAME, render);
}

private function render(evt:Event):void
{
Tweener.addTween(photoContainer, {rotationY: 45, transition:”linear”, time:.5});
Tweener.addTween(viewport, {x: 300, transition:”linear”, time:.5});
renderer.renderScene(scene, camera, viewport);
}

}
}

[/as]

Source | Example

Tidbit #3 – testing additions to your code – Control Variable

Nov
28

When when you add features to a class and they aren’t seeming to work, STOP. Your doing something that doesn’t jive w/ you code. You are overwhelmed w/ all the code you already have. You are missing something or your code just doesn’t work w/ what your trying to do.

Solution:

Simple, create a new class. Name it controlVariable (yep, just like in Science class). Try that troublesome code there all by its self. That way if it works in controlVariable then you know you code is correct and just the implimenation in you project is off. I feel this is very helpful when I’m in the trenches. Cause sometimes some code chunks don’t play well w/ others.
Don’t be prideful and recompile a swf for 2hrs just because you think, “I declared that Blue Rectangle, it should be there”. When you didn’t addChild or import or instantiate the Shape Class.
Hope this helps someone.

Flash/Flex Tidbit #1

Oct
18

I have noticed some times I’m an idiot spending an hour on something that would have take five minutes if I’d have paid attention. Well I’m going to start sharing some things I’ve learned from these times.

  1. in Flash/Flex when using the TextEvent.LINK make sure your textfield is set to selected = true.
    the link is clickable even when selected = false, just nothing will happen. Very fishy that should be changed. It is very misleading.

How to set up and get WebOrb communication with Flex 2 with no service-config.xml

Oct
1

So at work we are experimenting with WebOrb to ditch XML. No for good but definatly when there will be a lot of parsing. Anyway, our PHP Programmer downloaded WebOrb and we looked at the examples but the example were either banking on you having previous Flex Data Services experience or they were not that good in my opinion. The most crucial info was not even on the tutorial application page. So I’m going to walk you through the tutorial with the modification I used to get it working from various Google Searches. Mainly no service-cofig.xml.

Read more »

Creat snapshots of Video Display w/ ArrayCollection to a List

Aug
14

This example is a modification from flexblogexamples.com. It was original to make a snapshot of cuepoints but I though why not on click so you can specify what you want a picture of. I know not original but still useful to post. view source

ArrayCollection DataGrid filter Example v3

Aug
1

This version has radio buttons to search first or last names, onFocus of TextInput box text is cleared. source | v2 | v1

ArrayCollection DataGrid filter Example update

Jul
28

**UPDATE**

Thanks to the help of Nolan I was able to get it to:

  1. works with case-sensitivity
  2. and resets data as you type.

————————————-
I redid the ArrayCollection example so take a look at this example:

[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: 'Dave', last: 'Chappelle'},
{first: 'Amy', last: 'Grant'},
{first: 'Bilbo', last: 'Baggins'},
{first: 'Jessica', last: 'Tandy'},
{first: 'Jessica', last: 'Simpson'},
{first: 'Paris', last: 'Hilton'}];
collectionData = new ArrayCollection(collectionArray);
}

public function filter():void {

collectionData.filterFunction = filterFirst;
collectionData.refresh();

}

public function filterReset():void {

collectionData.filterFunction = null;
collectionData.refresh();

}

private function filterFirst(item:Object):Boolean
{

return item.first.match(new RegExp(searchField.text, 'i'))

//return( item['first'].indexOf( searchField.text ) > -1 );
//return item['first'].match(new RegExp(string, “i�))

}

private function search():void
{
if(searchField.text !=”)
{
filter()
}
else
{
filterReset()
}
}
]]>

[/as]

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