Archive for the ‘flash’ Category



Box2D + Glen Beck = Awesomeness

Thursday, July 22nd, 2010

This is a silly little test swf that I created while working on a project for the Intelligent Information Laboratory. It’s not perfect… but it sure is fun.

Go on… Get out some aggression. It might be the healthiest thing you’ve done all day.

Posted in actionscript, flash, funny | No Comments »

AS3: gotoAndPlay when an FLV file is finished playing

Tuesday, December 8th, 2009



THE PROBLEM:
So, I recently created a showcase reel that involves several flvs with transitions between. For various reasons, I had to make this a timeline based animation. I was running into a problem with latency because of download times and the flvplayback component. The flvs would play and the transitions between the flvs would occur really late.

THE SOLUTION:
Add an event listener to the flv instance and listen for COMPLETE.

Step 1: Import your FLV files and place on stage with the correct # of frames between them. (Take the length of your FLV file, multiply by the FPS of your FLA file: that is how many keyframes that particular FLV should have on the timeline.)


Select File > Import to Stage > Your FLV file name
(There are lots of options when importing FLV files. Select what is appropriate for your project.)


Step 2: Give your flvs instance names ( for the first FLV, I chose the very creative instance name flv1)

Step 3: Create a new layer, name it labels

Step 4: Set a keyframe on for the first frame of each flv file and give a label name on the properties tab

Step 5: Create an actions layer, create a keyframe for the first frame of each flv file (just like you did for the label names)

Step 6: Import the VideoEvent.
On the first frame of the Actions layer place this code:

import fl.video.VideoEvent;

Step 7: Add this code to each key frame, changing the instance name, function name and gotoAndPlay() label name.

flv1.addEventListener(VideoEvent.COMPLETE,videoOver1);

function videoOver1(e:VideoEvent)
{
gotoAndPlay(“part2″);
}



quicktime

VIEW THE TUTORIAL : On FLV Complete gotoAndPlay()





READ MORE ABOUT the FLVPlayBack component

Posted in flash, tutorial | No Comments »

5005: Unknown Error optimizing byte code

Monday, November 30th, 2009

THE PROBLEM:

I encountered a super annoying error message in flash today:
5005: Unknown Error optimizing byte code

I received it when trying to publish a flash file that incorporates several FLV files.

Apparently, Adobe says this error can occur when publishing really large files (http://kb.adobe.com/selfservice/viewContent.do?externalId=kb405257), but my FLA is only 1.6 mb and the published SWF is only 345 k. I’m guessing it has to do with the FLVs that are being loaded in.

THE SOLUTION:

Thankfully, I found a concise and easy to use solution here (THANK YOU, Stefig Design! You’re the bestest.):

http://stefig.blogspot.com/2009/04/5005-unknown-error-optimizing-byte-code.html

Posted in flash, web design, web development | No Comments »

Flash and Andriod

Wednesday, June 24th, 2009

Android


Hurray~! A smart phone that supports flash! Thank you, Android. Again, you are leading the pack.


Personally, I’m thrilled by this. It’s one step closer to being able to extend interactivity to new input devices. Can you imagine playing a game on a touch screen? Or experiencing an interactive art piece with your hands? The possibilities are endless and exciting. One small step, one giant leap.

You can see a demo of flash on Android here:

http://www.adobe.com/devnet/devices/articles/htchero.html

If you are a web developer, you can learn more about making flash work on Android here:
http://www.adobe.com/mobile

Tags: , , ,
Posted in flash, technology, web development | No Comments »

Shadowbox.js: Flash and Javascript doing a jig

Friday, May 29th, 2009

Websites these days are simply layers of technologies stacked on top of one another. Every member of the digital sandwich doing what they do best. HTML structuring, CSS styling, Flash flashing, etc, etc…
Sometimes they all play well together and sometimes it’s an alley way knife fight.

I recently completed a project that involved creating little flash widgets that would call a pop up using some sort of js lightbox library. Turns out this is not as simple as I thought it would be. After auditioning 10 (that’s right 10) lightboxes I finally emerged with a winner: Shadowbox.

The issue:
Most lightboxes use the rel attribute to call the popup function. As far as I can tell, there is no way to insert a rel attribute inside of a getURL() in Actionscript. To be honest, i had lots of other issues with the lightboxes I tried: browser capability, conflict with other js libraries I was using (jquery), inconsistent behavior, inability to load html pages (vs just images), etc.. etc..

The solution:
Shadowbox allows you to set up a custom function for opening an instance of the popup. You simply feed that function name, proceeded by javascript: into the getURL() and voila!

Step 1:
Download Shadowbox and buy a license! if you intend to use it for commercial purposes. Come on, y’all. It’s 20 bucks. Let’s support our awesome open source developers.

Step 2:
Embed the scripts properly in your header:

<link rel=”stylesheet” type=”text/css” href=”scripts/shadowbox/shadowbox.css”>
<script type=”text/javascript” src=”scripts/shadowbox/shadowbox.js”></script>

Step 3:
Initialize Shadowbox (with the required players – read more here) and then create a custom function in javascript in your html document. :

<script type=”text/javascript”>
Shadowbox.init({
players:    ["html","iframe"]
});
function abrirSB(url)
{
Shadowbox.open({player: “iframe”, content: url, height: 570 , width: 850});
};
</script>

Step 4:
Create a flash piece with a getURL function applied to a button.

Step 5:
Feed the properly formatted URL with the custom function name into the getURL:

button_btn.onRelease = function ()
{
getURL(“javascript:popUpFunction( ‘hello_world.html’);”)
}

Step 6:
Embed your flash object. I generally use SWFObject.

Step 7:
Jump up and down and do a little dance when it works.

I’ve even created a working sample for you, just to make it that much easier.

DOWNLOAD A COMPLETE TUTORIAL

FYI: If you run it locally, Flash will try to verify that you have security clearance for that file. It’s not an error. It’s a security measure.

Tags: , , , , , ,
Posted in flash, javascript | No Comments »

I LOVE ILLUSTRATION

Friday, February 20th, 2009

So being a full time freelancer, I’m looking at ways of diversifying my income – especially supplementing my large project based paychecks with smaller more frequent paychecks – the trickling stream method, if you will.

So, one of my strategies to create passive income is through the sale of stock illustrations and flash files. There are number of sites that specialize in this sort of submission / payment method. They get paid. You get paid. Clients get high quality work for affordable prices. Everybody wins. Two excellent examples that I plan to participate on are:
www.flashden.net
www.istockphotos.com

Here is my first submission. It only took me a few hours and was so much fun to work on.


I LOVE ILLUSTRATION.

I love it so much, I’m going to actively seek out more illustration jobs. It’s such a lovable combination of arty, imaginative and potentially lucrative.
Watch out illustration world, here I come.

Tags: , , , , ,
Posted in art, business, flash, freelancing, graphic art, illustration | No Comments »

Flash and the iPhone- lovers at last???

Monday, February 9th, 2009

Okay, so that’s a bit of an exaggeration. They are nowhere near lovers… but, at least, it seems they are beginning to flirt a bit.

As a flash designer and animator, I have been pulling for adobe and apple to put aside their differences and learn how to play well together for A LONG, LONG TIME. It seems as though the peace process has finally begun…

Read more about it here:
http://www.flashmagazine.com/news/detail/flash_on_the_iphone_is_in_progress/

Tags: , , , ,
Posted in flash, technology | No Comments »