Author Archive
Wednesday, June 25th, 2008 | Author: dehash
Posting just to keep some of the resources linked in a single post – will add to this list as further resources are found:
—===General===—
YouTube Announcement
YouTube APIs Developer Forum
YouTube Data API FAQ
—===Flex AS3 Related===—
as3-youtube-data-api
Youtube Data API AS3 – Tutorial
Martin Legris’ Blog (as3-youtube-data-api author)
more links
—===Flex Examples===—
as3-youtube-data-api usage example(with source code)
Example Flex YouTube Player(with source code)
—===fin===—
Update: No need for Developer Key to load the chromeless player from now on the new chromeless player URL is: http://www.youtube.com/apiplayer
Category: YouTube API | Comments off
Wednesday, June 18th, 2008 | Author: dehash
Flex YouTube API feed + search display. download source code here
Uses library @ as3-youtube-data-api
Nice player example @ on_the_other_hand
author of as3-youtube-data-api has a blog @ blog.martinlegris.com
update: added in a simple player to view the movies.
.
Update 2: Added source code download for the feed display
We are making a Cairngorm version of this but here is a simple component version to test.
The source code for the feed display component (not the player) is here
It is a FlashDevelop3 Beta7 project file and uses the Flex3 SDK to compile. To build the project requires the as3-youtube-data-api library Just download youtube-google-0.95.zip and add it to the project path and compile, that is it.
All of the hard work is done by SimpleFeedGrabberExample.as which uses the excellent as3-youtube-data-api library to load feeds from YouTube and parses them into an ArrayCollection which is the Bindable datasource for the display. This is a simple version that will likely change a lot when it is in our Cairngorm project but works fine for now.
as3-youtube-data-api notes: in strict mode you get a few warnings of variables declared without datatypes in the as3-youtube-data-api library but these are easy to fix. Also YouTubeClient has been removed in the library version released yesterday but we substituted YouTubeFeedClient in its place and that seems to work ok.
—
Once the above is complete to integrate with into the otoh player grab the source code from here:
* copy the src directory into this project src folder
* make YouTubeTest.mxml the target file + make 3 edits to it:
* put xmlns:ytfeeds=”ytfeeds.*” in the Application tag at the top
* put <ytfeeds:YTFeedComponent top=”325″ /> just before </mx:Application>
* insert your YouTube Developer key into YouTubeTest.mxml and compile.
Now when you click on a movie in the display it can be played in the otoh player because video.text is set to the selected movie ID.
Update:
Added a Comments viewer, and a related movies tab using the as3-youtube-data-api
View the updated flex youtube movie here
Category: Code Examples, Flash, YouTube API | 15 Comments
Sunday, April 20th, 2008 | Author: dehash
An alternative to excessive typing or copy + paste that is worth consideration is a Cairngorm code generator like The Cairngen Project
Project now moved to GoogleCode
Category: Flash | Comments off
Sunday, April 06th, 2008 | Author: dehash
Category: Flash | Comments off
Monday, March 31st, 2008 | Author: dehash
flex builder 3 now free for students Flex Builder 3 is now free for students and faculty of eligible educational institutions
Category: Flash | Comments off
Friday, February 22nd, 2008 | Author: dehash
VirtualBox allows you to run one OS within another. Currently typing this from an Ubuntu guest running on an XP host and the performance is very good.
Some simple instructions to set it up can be found here
Category: Linux | Comments off
Monday, December 10th, 2007 | Author: dehash
Category: Code Examples, Flash, Flickr API | 2 Comments
Sunday, June 24th, 2007 | Author: dehash
[EDIT] For a more up to date post click here http://www.dehash.com/?p=152

Below is an example using Papervision3D AS3 engine using Flex2 SDK and FlashDevelop3 Beta 2. Look here for a fantastic Shark Demo
more…
Category: Code Examples, Flash, Papervision 3D | Comments off
Wednesday, June 20th, 2007 | Author: dehash
It is still in Beta but is completely usable in my experience
Download Info
Category: Flash | Comments off
Monday, October 23rd, 2006 | Author: dehash
I got some useful feedback at Flashcoders about my SVG post below. So far from what I found there is no golden rule for predicting filesize when embedding svgs except that usually the swf will be smaller.
I tried some of the suggested Inkscape optimising tips (ungroup,convert to paths, removing metadata/gradient definitions) and others (Vacuum Defs, Paths simplify) but none had a notable filesize impact once that particular svg was embedded in Flash (although they do benefit other svgs).
The main culprit seems to be the three shadows below the base and one once they were removed from the svg took the resulting swf from 63k down to 30k which is roughly the svg/swf ratio I would expect.
Below left is the original monitor and the edited one one on the right, those shadows below the base add 33k (over half of the total).
One related thing I found is :
Original monitor svg = 64k adds 63k to the swf when embedded alone
Edited monitor svg = 69k adds 30k to the swf when embedded alone
Embedding BOTH svg files in the SAME swf adds only 63k to the swf
I am guessing that the reason why is that when converting embedded svgs to swf the Flex2 SDK caches paths and gradients converts them to symbols in the library so that if it finds the same definition in another embedded svg it pulls it out of the library instead of recreating it. But I would need to test it some more to be sure. Cool if it is though.
Category: Code Examples, Flash, Flex SVG | Comments off
Friday, October 20th, 2006 | Author: dehash
Adobe have released the Linux Flash 9 beta player. Available for download from here http://labs.adobe.com/downloads/flashplayer9.html
Hope it works out of the box on my Ubuntu.
The little discussion here says it should work fine :)
Update:
Actually it was simple to install
standalone: just su to root and unzip FP9_standalone_beta_101806.tar.gz and extract gflashplayer to your /bin directory
Firefox: just su to root and unzip FP9_plugin_beta_101806.tar.gz and extract libflashplayer.so to your /usr/lib/firefox/plugins directory
and so far it works just right too :)
Some discussion of the plugin at Ubuntu Forums and at linux questions and a positive review here
Category: Flash | Comments off
Tuesday, October 17th, 2006 | Author: dehash
Here are just a few of the nice vector clipart examples from at http://www.openclipart.org . All four originals are in SVG format created using Created with Inkscape and below is the code to embed them and apply DropShadow and Bevel filters to each using the Flex2 SDK to compile a Flash 9 swf.
The laptop svg is around 9k adds around 3k to the final swf. The vacuum svg is 36k and adds 11k, camcorder svg is 36k and adds 14k, and the monitor svg is 63k and adds around around 65k.
So all the swf conversions are smaller than their respective svg files except the monitor svg (and this adds more than twice the size to the swf of the other three put together).
Actionscript:
-
package
-
{
-
import flash.display.Sprite;
-
import flash.filters.DropShadowFilter;
-
import flash.filters.BevelFilter;
-
-
[SWF( backgroundColor='0x333333', frameRate='30', height='400', width='400')]
-
-
public class SVGfilters extends Sprite
-
{
-
// svg files from http://www.openclipart.org
-
-
[Embed(source="../assets/laptop.svg")]
-
private var SVG_Laptop:Class;
-
-
[Embed(source="../assets/camcorder_jaime_sanchez1.svg")]
-
private var SVG_Camcorder:Class;
-
-
[Embed(source="../assets/lcd_monitor_the_structor_.svg")]
-
private var SVG_Monitor:Class;
-
-
[Embed(source="../assets/blue_vacuum_cleaner_jaim_01.svg")]
-
private var SVG_Vacuum:Class;
-
-
public function SVGfilters()
-
{
-
init();
-
}
-
-
private function init():void
-
{
-
-
var mySVG_Laptop:Sprite = new SVG_Laptop() as Sprite;
-
mySVG_Laptop.scaleX=0.25;
-
mySVG_Laptop.scaleY=0.25;
-
mySVG_Laptop.x=50;
-
mySVG_Laptop.y=0;
-
mySVG_Laptop.filters = [ new DropShadowFilter() , new BevelFilter() ];
-
addChild(mySVG_Laptop);
-
-
var mySVG_Vacuum:Sprite = new SVG_Vacuum() as Sprite;
-
mySVG_Vacuum.scaleX=0.25;
-
mySVG_Vacuum.scaleY=0.25;
-
mySVG_Vacuum.x=190;
-
mySVG_Vacuum.y=30;
-
mySVG_Vacuum.filters = [ new DropShadowFilter() , new BevelFilter() ];
-
addChild(mySVG_Vacuum);
-
-
var mySVG_Monitor:Sprite = new SVG_Monitor() as Sprite;
-
mySVG_Monitor.scaleX=0.25;
-
mySVG_Monitor.scaleY=0.25;
-
mySVG_Monitor.y=150;
-
mySVG_Monitor.x=50;
-
mySVG_Monitor.filters = [ new DropShadowFilter() , new BevelFilter() ];
-
addChild(mySVG_Monitor);
-
-
var mySVG_Camcorder:Sprite = new SVG_Camcorder() as Sprite;
-
mySVG_Camcorder.scaleX=0.25;
-
mySVG_Camcorder.scaleY=0.25;
-
mySVG_Camcorder.x=190;
-
mySVG_Camcorder.y=200;
-
mySVG_Camcorder.filters = [ new DropShadowFilter() , new BevelFilter() ];
-
addChild(mySVG_Camcorder);
-
-
}
-
}
-
}
Category: Code Examples, Flash, Flex SVG | Comments off
Sunday, October 15th, 2006 | Author: dehash
An example of using SWFMill & MTASC based on the Natural Entry Point approach...
Update: Added some Fuse animation
command line
CODE:
-
"c:\mtasc\mtasc.exe" -swf classes.swf -cp c:\... -header 1:1:30 Application.as RotateFrog.as
-
"c:\swfmill\swfmill.exe" simple application.xml application.swf
application.xml
XML:
-
/*
-
library/rana03_architetto_france_01.png from http://www.openclipart.org/
-
*/
RotateFrog.as
Actionscript:
-
import com.mosesSupposes.fuse.*;
-
-
class RotateFrog extends MovieClip
-
{
-
-
function RotateFrog () {
-
-
ZigoEngine.register(Fuse,PennerEasing,FuseFMP);
-
FuseFMP.writeFilter(this,"DropShadow");
-
setFuse ();
-
}
-
-
function setFuse ()
-
{
-
-
var f:Fuse = new Fuse();
-
f.push({delay:1});
-
f.push({target:this, x:20, y:20,Bevel_angleTo:33,DropShadow_distance:44, Blur_blurX:0, Blur_blurY:0, seconds:2, ease:"easeInOutBack" });
-
f.push({target:this, x:300, y:300, Bevel_angleTo:233,DropShadow_distance:4,Blur_blurX:5, Blur_blurY:5, seconds:2, ease:"easeInOutBack", func:setFuse, scope:this});
-
f.start();
-
}
-
-
}
Application.as
Actionscript:
-
class Application extends MovieClip
-
{
-
-
function Application () {}
-
-
function onLoad ()
-
{
-
attachMovie ("rana03_architetto_france_01png", "clip", 1 );
-
-
}
-
}
Category: Flash | Comments off