Archive for July, 2008

24Jul

Custom Pop Up Windows with URLRequest and navigateToURL Method

1 comment so far

I was in need of a way to create a button that when clicked would open up a new browser window utilizing the window.open method. I chose to use this method as it seemed to be more browser capable - note, make sure your browser will allow pop up windows - just click the black [...]

Categories: Actionscript 3
23Jul

Calling a Javascript Pop Up within Flash

No comments

Here is a method to implement a Javascript function within your Actionscript (I believe this is ok for AS2 as well as AS3) - note: not supported in all browsers, hence the conditional statement check:

if (ExternalInterface.available) { ExternalInterface.call(”window.open”, “http://www.manewc.com”, “mywindow”, “height=400,width=400″); }

a2a_linkname=”Calling a Javascript Pop Up within [...]

Categories: Actionscript 3
22Jul

Tweener Animation to a Point

No comments

So I recently had an inquiry on how to use Tweener to animate an object on an angle, fortunately there is a simple method in which you just animate the x and y parameters of an object simultaneously. I created this little demo to animate a box that will tween from the top left corner [...]

Categories: Actionscript 3, Tweener
21Jul

Label Component

No comments

The Label Component is described as: A Label component displays one or more lines of plain or HTML-formatted text that can be formatted for alignment and size.

package
{
import flash.display.MovieClip;
import flash.text.TextFieldAutoSize;
import fl.controls.Label;

public class LabelComponent extends MovieClip
{

public function LabelComponent()
{
var myStr:String = “This is a test of the Label Component - This is a test [...]

18Jul

Associative Arrays with the Object Class

No comments

To create an associative in Actionscript 3 you will need to use the object class because of the named elements (vs. the numbered elements).

var assocArr:Object = {fName:”Morgan”, lName:”Newcomb”};
trace(assocArr.fName); // Output: Morgan
trace(assocArr["lName"]); // Output: Newcomb

To add an element, you can add this to your code

assocArr.mi = “A”;
trace(assocArr.mi); // Output: [...]

Categories: Actionscript 3, Arrays