Archive for the 'actionscript' Category

Flash = Popup Happy… With a little help

So I might be WAY behind on this one but I had never found an exact answer as to how it could be accomplished. So I know most of you guys that build flash sites HATE when users click on a link in your site and FireFox or Internet Exploder try to block ur basic links! Well if your like me and can't get that to go away today is your lucky day! Here's what you do. Three easy steps!

1. Embed your site using the SWFObject
2. In the parameters for the SWFObject be sure to use wmode and set it to opaque or transparent.
3. Last thing is you CAN NOT use on Press actions for the buttons. Use on Release instead.

And that's it! Viola! All your links out to external sites etc will no longer be blocked by a popup blocker! :) Enjoy! Oh and Let me know if you find any issues with this.

Currently tested:
FireFox 2.0.0.14, Safari 3.1.1 and IE7

Update:
I have heard yes and nos about the wmode needing to be set. You can play with it and see what works best for you!

Compile Flash 10 (Astro) Files

Go Astro!Looks like the Flash 10 player news is spreading like wild fire! Go Astro Go!. If you want to follow the news and compile some examples for yourself I suggest following some links my friend Josh Spoon has posted on where to start your flash 10 experiments! It looks like a ton of people have already posted some great videos and sample code for you to start playing with Astro! I suggest getting started now! No time to waste. Thanks for the links Josh!

Kirupa and Senocular - AS3 Tip of the Day

Hey guys I had heard about this a while back but hadn't been reading it much. But today I was taking some time to get some AS3 work under my belt and decided to spend sometime with it. Although its not super deep information it gives you some great high level tips on AS3 and its changes. So If you are still new to AS3 and looking for a few more little tips jump over to Kirupa's site and get started reading the AS3 Tips of the Day!

No Crossdomain?

I just ran across nocrossdomain.com for the first time! This is super interesting. Anyone else trying this? Seems almost to good to be true. Anyone have any good stories about it?

Google Analytics + Flash = Easy Peasy…

You're clients will love it! And in the end you will know more about the sites you build and how to better drive traffic to certain areas! Win! Win!

googleanalytics.jpg

Ok so I have been using Google Analytics for quite sometime now and I must say i love it! So if you don't know by now Google provides FREE website statistics that go above and beyond any stat tracking systems I have seen to date. Well that is for something that is FREE. Anyway I want encourage all of you to get out there and start using Google Analytics for all your flash site going forward. Its really very simple to implement into your flash sites and even track individual events that occur in each of your sites. Please see analytics.google.com for more information on setting up your personal analytics with google and to get the Javascript needed for the code below to work. With that said let's get on to some actionscript!

googleAnalytics.as (right click - save as)

 
/// GOOGLE ANALYTICS SIMPLE TRACKING
/// Script by: corban baxter
 
import flash.external.ExternalInterface;
 
function gaTracking(page) {
	ExternalInterface.call("pageTracker._trackPageview", page);
}
 
//end

Code for simple call

 
gaTracking("/flash/home"); //sends event to google's analytics system

Now what you can understand from this is... You can call this function during ANY event function etc that you so desire. And any string combination that you want to pass to it is fair game. Use best practices when passing in the strings though so its easier for you and your clients to read when you all are reviewing the numbers. Ok so thats that! Cheers!

Air 1.0 and Flex 3 Launch!

Today is a big day for the guys at Adobe. AIR 1.0 and Flex 3 have hit the streets and will set them in position to own the RIA marketplace for a long time coming. With the rich history behind Flex and now AIR, Adobe's latest product on_adobe_air_logo.jpgthat allows developers from all types of backgrounds to develop RIA's. Its a sure win for Adobe and for anyone using the internet today.

AIR gives developers from Flash, AJAX and Flex backgrounds the ability to develop desktop applications that are immediately usable and cross platform compatible. Something no one can argue is a wonderful step forward for the next generation of the web (3.0?). And what's neat about the cross platform is that it works not only on Windows and Apple machines but also on Linux boxes (Coming soon!). This means developing apps for the One Laptop Per Child project is now easy for us all. This also means your product can now stretch across the world like never before.

Flex Builder 3 is pretty cheap and will only run you$249. Which is a steal for anyone wanting to start learning and building RIA's especially for students. But for those of us that already own Flash CS3 the upgrade to AIR is $0! So if you already coding MXML or AS3 you are already to go and begin coding your own desktop applications! During the AIR beta 3 I put together a super simple FLV and H.264 player that now anyone can download and use on any system they choose! I will update it later today so its compliant with the latest release of AIR 1.0! Very exciting!

I am anxiously waiting to see what AIR and all the developers world wide will be developing this year and the years to come! Great work Adobe! We can't wait to see where this product takes us in the years to come!

Update: I just found a rockin' poster done by eboy for the AIR and Flex3 product launch! Download and print it on some 11x17 paper to spice up your office, its pretty sweet! Great work eboy!

ado_airposter_45t_cut2.jpg

flvPlayer - keeping it simple

Yesterday when I was looking at the new panels Lee Brimelow released it got me thinking about his tutorials on AIR and video. So I was like, hey, it would be cool to have a super simple AIR app that played my FLV's I've been compressing. It seemed like every player I tried was just a bit much. Soooo... here is my first AIR app. Its really nothing so don't expect anything. Currently, as it is, it has no controls or REAL features for that matter. I just put it together so I could play some FLV's I've been compressing. Really just to view them quickly and see how they looked in a player. Anyway its really just for quick testing tool for developers like me. So don't hold your breath for your new end all FLV player! It does the trick and has some scaling feature when you drag the video onto it, it will resize to the size the video has in its META data. Oh and enjoy my amazing graphics I made for it!

px4 flvPlayer 0.6.3

(0.6.3 cause I always wanted to have some weird beta number on something.)
Features - if that's what you want to call them
- drag FLV's onto it to start playing
- scales to the movies correct dimensions

Download :
1. Get Adobe Air
2. Download the flvPlayer
3. Play FLV's and H.264

To be added later:
- full play/pause/seek/volume controls
- ability to check META data
- screen shot video and save to PNG
- custom chrome

I will most likely open source the entire project so you guys can see my AS3 mess and help out or maybe learn a little. Either way it will be worth it to someone!

Update: I added H.264 support. And it was incredibly easy. Really as easy as a simple 'if' statement. Thanks for the idea Freddy! If you do place an MOV on it that isn't H.264 format it just won't play or will stop the video that was playing and wait for a new video to be loaded. I will do some error handling to this at a later date. Enjoy for now!

Panels for the people!

Snippets kick ace! and events don't hurt either!

So... have any of you guys downloaded the two panels Lee Brimelow released recently? If not I would suggest doing so. They are killer time savers!

The snippets panel lets you store your code or get code from others that you reuse often and you don't want to have to constantly setup. Almost like knowing OOP but "not" and its reusable. ;) Really it could be any code you want! Its easy to add your own through an XML doc that Lee gives you access to edit and add to the panel. If you want to add some code to the panel just navigate to the XML doc and start pasting. Below is one I made really quick for setting up a simple Fuse function:

 
<snippet label="Setup Simple Fuse Animation" ascript="import com.mosesSupposes.fuse.*;\nZigoEngine.register(Fuse, PennerEasing, FuseItem, FuseFMP);\n\nfunction animation():Void\n{\n\tvar f:Fuse = new Fuse();\n\tf.push({ target: me, _alpha: 100, _x: 0, _y: 0, ease: 'easeOutQuad', time: .5, trigger: .25 });\n\tf.start();\n}\n\nanimation();" />

I would love to see some of us share our favorite snippets to use in our own panels! I'm trying to get a little list together of mine and I will be sure to share it with all of you guys. But anyway Lee gives you all a nice list to start with. Some good AS3 code snippets for Tweener, some AIR stuff and more! I already started a little project just from the AS3 things these two little guys taught me. Its a pretty simple AIR app I plan to share very soon! But don't stress you don't have to use AS3 for your snippets AS2 code snippets will work fine too!

Also the Event panel is great to. Its like a snippets panel but it creates events for your AS3 project. Its really worth looking at since events are the basis of any project or site you are creating. Just make a movieclip choose a few events its going to have and viola, its auto creates the actionscript for you!

Well don't just sit there go download the Code Snippet and Event panels now!

Gaia 2.0 - AS2 + AS3

This afternoon Steven Sacks announced the Gaia 2.0 Panel for Flash CS3. So for those of you guys interested jump over a read his official release post. I am hoping to review it myself this week and see what I can find. But I'd love to hear what you guys think when you try it out!

gaia2.jpg

Gaia - AS3 beta2 now on shelves

Ok not really on shelves per say put on a web site near you! I know some of you guys are really excited about this release and can't wait for Steven to release the final version. But for those of you already creating AS3 sites why not help out in testing! This way you can be sure its the product it can be! For you, and for everyone else out here on the inner webs. ;) Well thats, that. Its a quick post, I know, but I wanted to make sure you all knew in case you hadn't been reading Steven's blog also! Enjoy! And please comment and lets us all know what you think about it and let Steven know too!




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