Archive for January, 2008

Quick lil combo box

So today I saw that Yahoo dropped their set of ASTRA components for AS3. And... WOW is all I can say. I'm so glad to see a company like Yahoo doing this. Giving back to our community in an open source way! Its really beautiful and makes them really feel like family. Almost as much if not more than Adobe. It's just wild to see them doing almost more than Adobe does to push flash! I am thrilled to see them sharing with our community!

So just for fun I have decided to post my not so AS3 or OOP combo box. Its my first try and I built it in about 2 hours but its a great start. Its built with AS2 of course since I haven't made the leap of faith to AS3. But it works and serves its purpose. It would be really easy to extend this and make it much more dynamic and have TONS more functionality but hey its free and it will get you moving in the right direction.

So the reason I built it was it seemed like the component most art directors like to have custom designed drop downs and one of the most common in forms. All of the drop down components I have found and tried to edit have just been a 'pain in my arse'. So this is my super simple and sleek lil version. Easily editable and here for your grabin'. :) I know its not ASTRA but hey it is what it is!

Download Here


U.S. State Array/List for Flash

Ok so just right now I was having to find a list of states and put them in this custom drop down 'component' I was building. But I didn't have a full list of the states and anywhere. So I decided I would compile two lists for you guys to use if need be.

I did do a google search trying to find it, but all I could find was one for PHP and not Flash. So... here you go! Hope it helps a few of you guys out! Oh and keep in mind this was a QUICK post. Sorry if there are a few errors. Let me know if you find any also so I can update!

Update: I looked over both arrays and they should match up and work great. Enjoy!

Check after break for the code...

Continue reading 'U.S. State Array/List for Flash'

Blist invites. Get em while they last.

Hey guys last night I got my invite key to the blist beta site. Its a pretty interesting Flex app for sharing a database with friends, family and really anyone you want to. Anyway if any of you guys are interested in seeing what they have built comment below and I will share the love.

I really want to know what you guys think of this app and how you might see it useful to you. Right now I am not seeing how I could potentially use it but maybe I am missing something. Mostly I see myself browsing docs others are sharing. Maybe it would be fun to keep some tutorials I want to put together in a blist doc. That way all you guys would be able to edit and improve the code in them. To build a better database of scripts we all regularly use. Whata you think?

Update: The guys at blist put up there live demo from DEMO today if you are interested in watching it also.

Blist logo

Dear Adobe,

So I have been reading these types of posts:

http://www.reflektions.com/miniml/template_permalink.asp?id=456
http://aralbalkan.com/1126

and wondering what is gong to be happening with flash. And if you guys are going to be killing off the mid to low flash developers as time goes by and on into the new flash players etc?

So here is my questions:

Why are we making it more difficult for non programmers to pick up actionscript and play with it? It used to be so easy for many types of designers/developers to open flash and instantly get a lot out of it. It seems like you have wanted to cater to the few that bitched about actionscripts non traditional programming format and not to the designers turned developers. Now we have gone into the AS3 days where we can't code on buttons (which is fine for me but maybe hard for others) and we can hardly code on the timeline for that matter. We are needing to start hiring engineers almost to develop flash sites now because its become so complicated to understand this new programming language. I mean this is what made flash so amazing in the past. I went to art school and got a job dong flash. And in two years I could code great sites and simple games. Now I am able to do about anything in AS2 but moving to AS3 has been a huge leap cause OOP is a completely new concept. And I think it is for MANY non traditional developers and developers wanting to pickup a product like flash WAS.

What does this mean to the future of flash? Are we going to see the traditional advertising flash sites start to fail due to budget and demand for creative engineers (which are few and far between) that want alot of money. Are you guys developing a product for app developers? Or for the MASS amounts of AS2 developers out here creating great creative work. I mean do you think flash would be where it is if it wasn't for designers to be able to open flash read a few tutorials and start tweaking code. The imperfections of actionscript coding style is what made it so appealing to SO many people worldwide. No longer can a creative director understand how to tweak a AS3 site without a tremendous amount of ramp up time to learn OOP concepts.

This new community you are trying to build is great for Flex/AIR but terrible for Flash. The creative appeal is falling away and now becoming a DEVELOPERS playground and not a 'devigners'/designers playground. You are going to find less and less designers converting to developers as time goes on making the gap that much wider between the two. And much harder for businesses to communicate between the two departments. Which will again kill the creative appeal to flash. All I ask is please be careful what you do with our precious flash. And don't forget about the mass amounts of developers that made flash what it is. By coming from a design background to become self taught flash developers who helped create the product you have today!

px4 (blog) from me to you.

Wicked! The guys at wired.com and Matthew Hurst from MS Live Labs put together a kick ass flash piece to show you how our blogs work and get the posts to new vistors like YOU hopefully. Its kinda fun to see in a graphic! Go on over wired.com and check out the piece!

wiredblogs.png

Startup weekend… Come to Dallas!

So what's it going to take to get a bunch of you Dallas people to vote for Startup Weekend to come to Dallas?!?!? I had kinda forgot about it until I read Ryan Stewart's post talking about Skillbit the project that they created this past weekend in Seattle, WA at the Startup Weekend! How much fun would that be? Concept and start building a company with a bunch of strangers?!?! 50 Hours locked up together to think of something new and different with a bunch of talented minds from all types of technical backgrounds. What a blast! So if you live in Texas go vote and bring Startup Weekend to us!

Startup Weekend!

Flash Embedding - Wordpress

So last night I was trying to embed the flickr gallery 'swf' from my post yesterday. But I was having some serious issues with either Bad Behavior or Akismet stripping away my javascript when trying to embed it directly in my post. So I was forced to find a different/quick workaround. Solution was Kimili. Its a simple wordpress plugin that makes embedding flash easy as:

[kml_flashembed movie="/path/to/your/movie.swf" height="300" width="300" /]

So no more worries and it even makes use of SWFObject if you desire. Big thanks to the guys who built Kimili! Great work!

Kimili

Adding iPhone favicon (apple-touch-icon.png)

Hey guys so I was bookmarking some sites on my iPhone with the new 1.1.3 update and was noticing that meebo, engadget and gizmodo had custom iPhone icons. So obviously I was like damn that's cool I want one for my site! And come to find out its easy cheesy. Just create a 57x57 png and name it 'apple-touch-icon.png'. Upload it to your desired site folder and walla! There it is. Go bookmark your site and enjoy! And bookmark my site too! Thats that info. Thought I would share. You can see my icon at http://blog.projectx4.com/apple-touch-icon.png. Enjoy!

Info via blog.jotlet.net. He even has a template to create your own quickly. But you will have to crop it if you want it to fit properly.

Flickr Slideshow - Take 1 (swx+fuse)

Ok so, 1, remember going into this... In no way did I ever say I was a programmer. I am a scripter at heart. Quick down and dirty, rapid development is my game and its worked well so far. There are plenty of better was to build this and extend it. All of which I would like to hear about! So here goes my version of an incredibly quick build of a simple swx+fuse image slide show! Enjoy!

So this is a simple copy, paste and your ready to go! But that's not why I am sharing the code. This was built to show whats possible and to get you started on building your own bigger, faster and stronger version of the same thing. I really encourage all of you to share with us what you have done with this code and how we can all become better coders ourselves from sharing and collaborating.

The following code will allow you to pull recent public photos or even photos from your favorite user and just the change of a methodType. Also please be sure to have the SWX class files in your project folder when running this code. Enjoy!

Update: some of the color coating is off on my style sheet. I will be updating later. Sorry. :(

Update 2: I had some requests for people to see it working. So here you go! Enjoy!

flickrgallery.swf

 
/*
 
SWX + Fuse - Take 1
 
by: Corban Baxter
 
url: blog.projectx4.com		This was written to give some developers simple a quick fix and insite
 
into rapid flash development with some great tools such as swx and fuse.
 
*/
 
import com.mosesSupposes.fuse.*;
ZigoEngine.register(Fuse, FuseFMP, PennerEasing, FuseItem);
 
import org.swxformat.SWX;
//setup the SWX object please see swxformat.org
var swx:SWX = new SWX();
swx.gateway = "http://www.swxformat.org/php/swx.php"; //please change to your domain running swx.
swx.encoding = "GET";
//swx.debug = true;
swx.timeout = 2;
 
var userName:String = "yourUserNameGoesHere"; //used for getUserPhotos method
var photoStyle:String = "small";
var numPhotos:Number = 100;
var page:Number = 1;
var myPhotos:Array;
var currentImage:Number;
var img:String;
//var methodType:String = "getUserPhotos"; //get specfic user photos
var methodType:String = "swxPhotosGetRecent"; //get public photos
var extras:String = "tags"; //comma delimited for getting extra photo info, see service for options
var images:MovieClip = this.createEmptyMovieClip("images", this.getNextHighestDepth());
var back_mc:MovieClip = images.createEmptyMovieClip("back_mc", images.getNextHighestDepth());
var front_mc:MovieClip = images.createEmptyMovieClip("front_mc", images.getNextHighestDepth());
 
function getPhotos():Void {
if(methodType == "getUserPhotos"){
 
var callParameters:Object = {
serviceClass:"Flickr",
method: methodType,
args:[userName, photoStyle, numPhotos, page],
result:[this, resultHandler],
timeout:[this, timeOutHandler],
fault:[this, faultHandler]
};
 
}else{
 
var callParameters:Object = {
serviceClass:"Flickr",
method: methodType,
args:[photoStyle, extras, numPhotos, page],
result:[this, resultHandler],
timeout:[this, timeOutHandler],
fault:[this, faultHandler]
 
};
 
}
 
swx.call(callParameters);
 
}
 
function resultHandler(event:Object) {
 
//callback to run when app has loaded the flickr image array requested
 
//trace(newline+newline+"RESULT: "+event.result);
 
myPhotos = event.result.photo;
total = myPhotos.length;
currentImage = random(total);
 
loadImage(currentImage);
 
}
 
function timeOutHandler() {
 
//do something when call fails to respond in allowed timeout period
 
//getPhotos();
 
trace("timed out");
 
}
 
function faultHandler(event:Object) {
 
//user or system error please give feedback to the users
 
//this would need to be some php call but you understand the point...
 
//getURL("mailto:hello@yourdomain.com?subject='were having flickr gallery issues'");
 
trace("critacl error");
 
}
 
var mclListener:Object = new Object();
 
mclListener.onLoadComplete = function(target_mc:MovieClip) {
 
target_mc._alpha = 0;
 
};
 
mclListener.onLoadInit = function(target_mc:MovieClip) {
 
trace(target_mc._height);
 
//fade up image and rerun the loop
 
var f:Fuse = new Fuse();
f.push({ target: target_mc, ease: "easeOutQuad", time: 1, _alpha: 100 }); //fade up front_mc
f.push({ func: setBackImage, args: img }); //places loaded image in back_mc to create a cross fade look for next iteration
f.push({ delay: 2 });
f.push({ func: loadImage, args: currentImage });
f.start();
 
};
 
mclListener.onLoadProgress = function(target:MovieClip, bytesLoaded:Number, bytesTotal:Number):Void {
 
trace(target + ": " + bytesLoaded + " bytes of " + bytesTotal);
 
}
 
var image_mcl:MovieClipLoader = new MovieClipLoader();
 
image_mcl.addListener(mclListener);
 
function loadImage(num:Number):Void {
 
var total:Number = myPhotos.length;
img = myPhotos[num].src;
image_mcl.loadClip(img, images.front_mc);
currentImage++;
if(currentImage == total){
currentImage = 0;
}
 
}
 
function setBackImage(img:String):Void{
trace(images.back_mc);
images.back_mc.loadMovie(img);
}
 
getPhotos();

Gaia Framework AS2… now AS3

And all I have to say is wow!

Have you guys seen this stuff? The Gaia Framework by Steven Sacks? I just stumbled on it yesterday and he released the AS3 version today! From what I have seen this could change my development process and could work out for any one from beginners to advanced coders. I would recommend stopping my the site and see his screencast on the gaia framework. Let me know what you guys think it looks pretty incredible and very easy to use.




Bad Behavior has blocked 252 access attempts in the last 7 days.