AS3 : Basic FLV Player

More resource may check here:
http://www.adobe.com/livedocs/flash/9.0/ActionScriptLangRefV3/flash/media/Video.html
http://www.adobe.com/livedocs/flash/9.0/ActionScriptLangRefV3/flash/net/NetConnection.html

AS3 Simple:

package {
import flash.display.Sprite;
import flash.display.MovieClip;
import flash.net.NetConnection;
import flash.net.NetStream;

import flash.media.Video;
public class main extends MovieClip {

private var nc:NetConnection;
private var ns:NetStream;
private var vid:Video;
private var client:Object;
public function main () {
// Initialize net stream
nc = new NetConnection();
nc.connect (null); // Not using a media server.
ns = new NetStream(nc);
// Add video to stage
vid = new Video(320,240);
addChild (vid);
//vid.x = ( stage.stageWidth / 2) - ( vid.width / 2 );
//vid.y = ( stage.stageHeight / 2) - ( vid.height / 2 );
// Changed since when deployed the
// above set the video player nearly off the screen
// Since I am lazy, I am just going to 0 them
// out for now. Apparently, I have a lot more
// to learn.
vid.x = 0;
vid.y = 0;

// Add callback method for listening on
// NetStream meta data
client = new Object();
ns.client = client;
client.onMetaData = nsMetaDataCallback;
// Play video
vid.attachNetStream ( ns );
ns.play ( 'test FLV.flv' );
}
//MetaData
private function nsMetaDataCallback (mdata:Object):void {
trace (mdata.duration);
}
}
}

Check if video is finish
================

p1

Import Animated Gif to Frame in Photoshop

  1. Make sure QuickTime 7 or later is installed on your computer.
    It is most likely installed during Adobe Photoshop or Adobe CS3 setup but can also be downloaded and installed from Apple web site.
  2. From the File menu, open Import submenu and select Video Frames to Layers… command.
    The Load dialog box shows up. (This will take more than two seconds the first time but appears immediately afterwards.)
  3. Navigate to the folder which contains your Animated GIF files.
    They will not show up on your Load dialog box.
  4. In the File Name field, type *.gif and press ENTER.
    Your animated GIF files will show up.
  5. Select the file you intend to import and click Load button or press ENTER.
    Import Video To Layers dialog box will show up.
  6. Ensure the Make Frame Animation check box is checked.
  7. Click OK button.
    The animation will load into Adobe Photoshop.

p1

as3 : Get full homepage url

eg: http://localhost:8080

function getHomeURL():String
{
var homeURL:String;
var port:String = ExternalInterface.call('window.location.port.toString');
var hostname:String = ExternalInterface.call('window.location.hostname.toString');

if(port && port!="")
{
port = ":" + port;
}
try
{
homeURL = ExternalInterface.call('window.location.protocol.toString') + "//" + hostname + port;
}
catch(Er:Error)
{
homeURL = "error";
}

return homeURL;
}

p1

Animatin Article

http://minyos.its.rmit.edu.au/aim/a_notes/anim_contents.html

p1

Walk Animation

http://www.idleworm.com/how/anm/02w/walk1.shtml

p1

My First AIR App : Facebook Avatar Maker

Facebook Avatar Maker.



Click on browse you photo, then your photo appear on app under frame, drag or zoom it to match your need, then click save, don't forget put the (.jpg) after your file name.

Next version:

- Add more frame style like: Drop water, Heart sign, and more

Download and Install:
- you will need Adobe Air Player to install this app, please get it from http://get.adobe.com/air/ [15.12MB]
- Download Facebook Avatar Maker.air from http://www.mediafire.com/?nj0yklm0jqe

Lol :)

p1