Archive for July, 2007

Helpful Tips for Using the Pixelfumes Reflect Class

Tuesday, July 31st, 2007

Sometimes working with a new class can be confusing. I thought I would start a post to help solve some of the problems that people have been running into using the Reflect class. My hope is to keep this updated for those of you having trouble. Keep in mind though… The class is open source – modify it to fit your needs! Share with us all! :) So here goes:

  • MovieClips that you are going to apply the class to should have a registration point of 0x and 0y.
  • MovieClips that you are going to apply the class to should not be scaled. If you need to scale the items in the clip do so within the clip vs. scaling the parent clip being reflected.
  • Don’t try to reflect cross domain images or video without a cross-domain policy file. This isn’t a limitation in the class but part of the security sandbox in the Flash player. This has accounted for errors that more than one of you has had.

ActionScript Bridge and SWFBridge – AS2 to AS3 Communication

Tuesday, July 31st, 2007

ActionScriptBridgeThe guys over at jumpeye contacted me this morning and gave me the scoop on an amazing piece of work they just released. They call it the ActionScriptBridge (ASB). This is for the “drag-and-drop” developer who wants to enable AS2->AS3 function communication in AS3 files.Here is how jumpeye describes the ASB:

With the launch of the new Flash CS3 and ActionScript 3.0, Adobe created a gap, in terms of compatibility, between applications created using ActionScript 2.0 and ActionScript 3.0. This means that a Flash clip created using ActionScript 3.0 can load and play a clip created using ActionScript 2.0, but it will not have access to anything (variables, functions, objects) inside the AS2 clip. ActionScriptBridge is a project that aims to fill the gap between AS2 and AS3. It gives the possibility for two Flash movies, one created using AS2 and the other using AS3, to communicate with one another (at least regarding function calls). This means that the AS3 clip will be able to call functions found in the AS2 clip loaded in it, and the AS2 clip will be able to call functions found in its’ parent, the AS3 clip. All this, by using two components: ASBContainer, for Flash CS3 and AS3, and ASBTerminal, for Flash MX 2004 or later and AS2.

Below is a demo of the ActionScriptBridge in action:



SWFBridgeSome of you may have also seen GSkinner’s recent release of SWFBridge allowing those of you a bit more into development to really get into AS2->AS3 communication!I’ve been so busy lately I haven’t had time to play much with either but I knew that news like this would be very interesting to all of you developers out there. If you get a chance to try SWFBridge or the ActionScriptBridge out let me know what you think.

My First Article for Adobe: Creating movie clips with reflections in ActionScript 3.0

Monday, July 23rd, 2007


My first article for the Adobe Flash Developer Center is now live. The article will step you through the creation of reflections using ActionScript 3. The article is based off of the ActionScript 2 version of the Reflect class that I posted awhile back. If you get a chance, go check out the new AS3 Reflect Class.

Creating movie clips with reflections in ActionScript 3.0
(http://www.adobe.com/devnet/flash/articles/reflect_class_as3.html)

The following graphic may be helpful for those of you confused about the package library path:

Having trouble using the class? Check out the helpful tips.

IE6 AS3 Preloader Events Failing Part II

Tuesday, July 17th, 2007

Previously in my post, IE6 AS3 Preloader Events Failing I talked about the fact that the loaderInfo ProgressEvent.PROGRESS and loaderInfo Event.COMPLETE events were not working for me or others in Internet Explorer. My research has not provided much in the way of explainations. I thought I would post a work-around that is cheap and much like the old AS2 version that I used (Non-Event based). Below is the non-working in IE AS3 code for preloading on the main timeline. In the examples below I also have a progressBar component on the stage with an instance name of progressbar.

IE Problematic Code
stop();
import flash.display.MovieClip;
import flash.events.Event;
import flash.events.ProgressEvent;

root.loaderInfo.addEventListener( ProgressEvent.PROGRESS, onProgress );
root.loaderInfo.addEventListener( Event.COMPLETE, onComplete );

function onProgress(event:ProgressEvent):void{
progressbar.setProgress((event.bytesLoaded/event.bytesTotal)*100,100);
}

function onComplete(e:Event):void{
gotoAndStop(2);
}

Work Around Code Not Using Events

stop();
import flash.display.MovieClip;
import flash.events.Event;

this.addEventListener(“enterFrame”,onEnterFrame);
function onEnterFrame(e:Event){
progressbar.setProgress((this.loaderInfo.bytesLoaded/this.loaderInfo.bytesTotal)*100,100);
if(this.loaderInfo.bytesLoaded == this.loaderInfo.bytesTotal){
gotoAndStop(2);
this.removeEventListener(“enterFrame”,onEnterFrame);
}
}

IE6 AS3 Preloader Events Failing

Saturday, July 14th, 2007

I recently ran upon an interesting problem with the Flash 9 player/AS3. It seems that when attempting to preload the main timeline of an swf that the ProgressEvent.PROGRESS and loaderInfo.addEventListener(Event.COMPLETE… events do not fire in IE6. I have not been able to duplicate this issue in IE7 or Firefox. I have attempted this using a Document Class and straight code on the timeline with the same results.

My research has lead me to several people experiencing similar problems here: http://www.actionscript.org/forums/showthread.php….
This can provide you with the basic idea of the issues being experienced.

Again, this is preloading a swf’s main timeline and not loading an external swf into a loader swf file. Any light that anyone can shed on this issue would be much appreciated. Thanks!

Adobe Kuler Swatch Cards

Thursday, July 5th, 2007

A secret source at Adobe helped me get a hold of some sweet Kuler Swatch Cards. The cards are from moo.com and display the swatch colors, author, numeric values of each color, the scheme rating and accompanying quote. I took some snap shots of the cards to share with you all. I have a sealed set – I’m still thinking of a good way to decide on whom to gift them to.