Here is a little sample that comes in handy when you need a pop-up window that is anchored to another object.


What this does is draw a triangle to our popUp symbol and redraw it when the pop is dragged around.

anchorTest – AS2.fla
anchorTest – AS2.swf

Facebook has this new online chat deal where you can chat with all your friends. Yet another techy wat to communicate. So, I thought I’d give this new Facebook chat feature a test with someone. But, who?
One of my Facebook friends is Kurt Bestor. Now, I’m not actually a “friend” of Kurt Bestor’s…I am a fan of his work and think he is a musical genius.

Dan: Kurt, love your music…Forgotten Carols is my fav

Kurt: Thanks. I’ll pass along that message to Mike McLean who wrote “Forgotten Carols.” LOL
People confuse us all the time

Dan: LOL – I know…just checking to see if you were listening ;)

Kurt: Ah – got me!Funny thing is….Mike has a disclaimer on his brochure that says “I did not write Prayer of the Children.” ;)

Dan: LOL

Dan: I missed the Secret Garden…hope to make it next time…any plans for more performances?

Kurt: We’re hoping to make it an annual event – like the Nutcracker of the Summer

Dan: cool! thanks for the chat…keep up the awesome work!

Kurt: cya

Kurt then went offline. Probably a smart move so that seemingly innocent folks, such as myself, won’t harass him with stupid remarks. Thanks Kurt. :)

Just came across this Flash site by Kiddi called “Eye-Project”. The Eye Project is insanely amazing. They’ve taken users’ photos and made a cool thingy: http://eye.kddi.com/content.html

Great give and go as D-Will dunks. Deron Williams dunks

There is a slight change in AS3 (actionScript 3) with the AS2 method of hitTest().

In AS3 it is now hitTestObject(). What hitTestObject does is it evaluates the display object (or MovieClip) to see if it overlaps or intersects with the obj display object. So you would use something like:

myMC1.hitTestObject(myMC2);

In this hitTestObject() simple example below, I have two movieclips on the stage named sq1 and sq2. When you drag sq2 to sq1 it traces true. The actionscript is as follows:

import flash.display.Sprite;
import flash.events.MouseEvent;

sq2.addEventListener(MouseEvent.MOUSE_DOWN, mouseDown)

function mouseDown(event:MouseEvent):void {
sq2.startDrag();

}
sq2.addEventListener(MouseEvent.MOUSE_UP, mouseReleased);

function mouseReleased(event:MouseEvent):void {
sq2.stopDrag();
trace(sq2.hitTestObject(sq1));
//trace true or false if sq2 is on sq1
}

Sample Files:
hitTestDrag.fla
hitTestDrag.swf

Carmelo Anthony apologized for his DUI with AI ( Allen Iverson ) chillin’ at his side. This is a great pic by THE DENVER POST | ANDY CROSS.

Carmelo ANthony DUI apology

Mug shot:

Carmelo Anthony Mug-shot


In the spirit of the season, this week’s song of the week is Election Man by Eerie.

Check it out.

You need Flash to listen to this

Artist: Eerie
Song: Election Man
Label: Komakino
Genre: Pop, Rock,

So I’m watching some of the 2008 Masters and Tiger Woods shirts are really cool.  I jump on his site (tigerwoods.com) and there they are.  You can buy the self same Tiger Woods shirts starting at a mere $54 on sale!

Tiger Woods Shirts

Or one of these for $75:

Golf Shirts of Tiger Woods

Or how about a Tiger Woods hat / cap for $27.50?

Tiger Woods Golf hat

Or you can go with the Tiger Woods Mouse Pad and Business card holder for like a million dollars…err $29.99

Tiger Woods Merchandise

So Flash player won’t install in Internet Explorer 7 huh? Well you’re not the only one that is having an issue with Internet Explorer 7 (IE 7) and the Flash Player plug-in.

Jesse Harding has a fix for you here.

I’ve been working on a project where text is coming from a dynamic source.  We needed to convert text like www.adobe.com to a hyperlink.  I came up with a little script and does this all quite nicely.  It works in actionScript 2 or actionScript 3.  This script uses similar methods I’ve shared before: searching an array and searching a string.

The actionScript is as follows:

// enter some text with a link URL in the string
var myOriginalString = "Check out this link to cool stuff: www.adobe.com it really rocks!";

//first we need to split out by each word so we can identify a url link
var myArray:Array = myOriginalString.split(" ");

//we use this variable a little later
var myV ="";
//we are searching for words that contain 'www.'
var searchValue = "www.";
//this is the function that searches through our array
//by each word for our searchValue, when it finds the value
//it returns it as a link in html formated text.
var searchForJimmy = function (searchValue) {
for (var i=0; i<myArray.length; i++) {

var str = myArray[i].toString()
var startIndex:Number = 0;
var oldIndex:Number = 0;
var newString:String = "";

while ((startIndex=str.indexOf(searchValue, startIndex)) != -1) {
newString += str.substring(oldIndex, startIndex)+"<font color='#0000FF'><a href='http://"+str+"'>"+str+"</a></font>";
oldIndex = startIndex += searchValue.length;
//set the value of our text field with what we find
myText.htmlText += replaceString(myOriginalString,str,newString)
}
}
};

searchForJimmy(searchValue);

/***********/
//this function is called in our loop above.

function replaceString(str:String, find:String, replace:String):String {
var startIndex:Number = 0;
var oldIndex:Number = 0;
var newString:String = "";
while ((startIndex=str.indexOf(find, startIndex)) != -1) {
newString += str.substring(oldIndex, startIndex)+replace;
oldIndex = startIndex += find.length;
for(var i=oldIndex;i<str.length;i++){
myText.htmlText += (str.charAt(i));
myV += (str.charAt(i));

}
}

return ((newString == "") ? str : newString + myV);
}

Sample Files:

searchReturnURL.fla
searchReturnURL.swf

Despite the refs making some terrible calls and Greg Popovich folding after 3 quarters, the Jazz played some great b-ball on Friday when they beat the San Antonio Spurs 90 to a mere 64.  That is the lowest the Spurs have ever scored in a game in their history…in your face Popovich.

Here are some snapshots of the game and more:

Jazz Engery Solutions

Two rows from the top at the Energy Solutions Arena.

Jass beat Spurs

This is a shot of the KJZZ sports guys.

KJZZ at the Jazz game

The KJZZ set at the Energy Solutions Arena.

Karl Malone Statue

Karl Malone statue outside the Energy Solutions Arena.

I’ve been messing around with some 3D functionality using Papervision3d. There is some really amazing stuff you can do.

Here is a little Papervision 3D Test:

3dTest01.swf 

In Flash AS3 if you want to load (loadMovie) a swf or image into an existing clip that is already on the stage, like you did in AS2 with loadMovie:

//the clip on the stage has an instance name of myMC

var i =new Loader();
i.load(new URLRequest(“http://news.google.com/images/news.gif”));
myMC.addChild(i)

This is the substitue for the ever popular AS2 code of:

myMC.loadMovie(“something.swf”)

more on load movie in as3 here 

Many a folk have questioned “what is this void I see all over the place in As3?’

Well folks, I’ll tell you what this void means and why you should use it.

First, you must understand Functions in AS3 and the parameters and references and so on.

In ActionScript 3.0, all arguments are passed by reference, because all values are stored as objects. However, objects that belong to the primitive data types, which includes Boolean, Number, int, uint, and String, have special operators that make them behave as if they were passed by value.

The void operator evaluates an expression and then discards its value, returning undefined. The void operator is often used in comparisons that use the == operator to test for undefined values.

The void data type contains only one value, undefined. In previous versions of ActionScript, undefined was the default value for instances of the Object class. In ActionScript 3.0, the default value for Object instances is null. If you attempt to assign the value undefined to an instance of the Object class, Flash Player will convert the value to null. You can only assign a value of undefined to variables that are untyped. Untyped variables are variables that either lack any type annotation, or use the asterisk (*) symbol for type annotation. You can use void only as a return type annotation.
If a function does not return a value, then its return type should be void. When a function typed as void is executed, or simply fails to return a value with the return statement, its return value becomes undefined.

So, for example:

If you don’t want your function to return an actual value then the return type should be set to void. A function that has a type set as void or simply fails to return a value with the return statement, its return value becomes undefined.

function nothingHere():void {
	// nothing here
}
trace(nothingHere()); // traces undefined

The function nothingHere above returns nothing and also accepts no values since it doesn’t have any parameters. If you try to pass values into the function when it has no parameter list defined for it in ActionScript 3 you will get an error…like this:

nothingHere(3); // This will return an error folks

In AS2, the Void type was used as the parameter list in a function definition to indicate no parameters. In AS3, you just leave the list empty. Using Void in the parameter list in ActionScript 3 will actually make Flash think that a variable named Void is defined for the parameter list of that function.

More sources: http://www.senocular.com/flash/tutorials/as3withflashcs3/