Archive for the ‘Actionscript’ Category

Adobe MAKE SOME NOISE

Tuesday, March 18th, 2008

Adobe MAKE SOME NOISEAndre Michelle is leading a campaign called Adobe MAKE SOME NOISE that is calling for Adobe to take some action and fix a pretty big problem with the Actionscript Sound API in the latest Flash Player and also to rally together support to show Adobe that alot of people need/want more control over sound with Actionsript in the next version of the Flash Player.

Andre does some really cool stuff with Flash, some of which im sure you have seen in the past. Alot of his commercial work of late seems to be advanced sound manipulation applications, for which he has had to hack his way around the limited sound api that exists today. A recent Flash Player dot release broke most of these applications.

Show your support and blog about it! Spread the word please.

Undocumented Actionscript 3

Wednesday, November 22nd, 2006

A little undocumented feature for you that might come in useful, mainly for people who use the Flash 9 Authoring Tool to create their Flash Movies.

(more…)

BitmapData.loadBitmap gone in AS3

Tuesday, February 21st, 2006

When playing with the BitmapData API in Flash 8, it was often necessary to work with an image embedded in the library. To achieve this you could assign a 'Linkage Identifier' to the image in the library and then use BitmapData.loadBitmap to retrieve a BitmapData instance pre-populated with the specified image from the library:

Actionscript:
  1. import flash.display.BitmapData;
  2. myBmp = BitmapData.loadBitmap('theLinkageId');

Naturally things have changed somewhat in Actionscript 3. There are no longer Linkage Identifiers and there is no longer attachMovie. Everything is created using the new operator.

So, how do you go about embedding an image inside a Flash Movie in Actionscript 3 you might ask? and then how do you get a BitmapData object for that embedded Image? Well im going to show you because these questions seem to be coming up alot of late.

(more...)

Actionscript 3 - New Capabilities

Tuesday, October 18th, 2005

Actionscript 3 opens up a whole new range of possibilities for web based applications which you may miss at first glance of the new Language Reference.

I dont blame you, after all there is a tonne of new stuff to play with, learn and read about. My suggestion would be to think of a cool application and build it using Zorn and Actionscript 3 to get up to speed with the new language and its capabilities (Who knows you might even find some bugs and help the Engineering Team while your at it).

Taking my own advice, i have been busy coding a fully Flash based Email & News Client. Using the new Binary Sockets in Actionscript 3 i have successfully implemented four common internet protocols (SMTP, Pop3, IMAP and NNTP) which i will release the source-code for in the very near future. Not only that, but i have also learn't a tonne about the language and the new capabilities.

(more...)

Flash 8 - setTimeout

Thursday, September 8th, 2005

Yup, you heard it here first. In Flash 8 actionscript you can tell the player to call a function just once after a specified interval. This means that you dont have to use setInterval anymore to call a function just once. For example the following code calls the openWebsite function after 1 second (1000 milli-seconds) and passes it a url. The openWebsite function then opens that url in a new browser window.

Actionscript:
  1. function openWebsite(url:String)
  2. {
  3. getURL(url,'_blank')
  4. }
  5. website='http://www.flashguru.co.uk'
  6. setTimeout(openWebsite,1000,website)

And of course you can use the following syntax aswell:

Actionscript:
  1. function openWebsite(url:String)
  2. {
  3. getURL(url,'_blank')
  4. }
  5. website='http://www.flashguru.co.uk'
  6. setTimeout(this,'openWebsite',1000,website)

Yet another one of those small features that make our lifes as Flash Developers just that little bit easier :)

Note: That to use the setTimeout function in Actionscript 2 classes, you will need to use array notation to avoid compiler errors as this function was left out of the intrinsic class definition files:

Actionscript:
  1. //call the showPopup function once after a second (1000 ms)
  2. _global['setTimeout'](this,'showPopup',1000);

Communicating between Actionscript and JSFL

Tuesday, July 19th, 2005

When creating Commands or Timeline Effects using the extensibility layer, it is sometimes necessary to provide some kind of user interface to allow the user to customise the functionality. JSFL has a little friend who's sole purpose is to provide an easy markup language for describing Dialog Boxes. His name is XML2UI.

(more...)

Movie & Image Preloader Woes

Tuesday, May 28th, 2002

Yes, by now we should all know that Flash MX can load .jpg files dynamically into a flash movie aswell as being able to load external .swf files, but as always, when it comes to loading large files from external sources, it is good practice and almost standard to create a preloader for the file. The new Flash MX Event Model may be causing you problems when it comes to preloading files loaded into your main movie using the Movieclip.loadMovie method or the loadMovie and loadMovieNum functions....

(more...)

Flash MX Event Model

Monday, May 20th, 2002

One of my favourite new features of Flash MX, has to be the new event model, it just makes life so much easier and makes coding so much more fun and so much more organised. If you dont know much about it, then now is the time to find out, you really are missing out, but no doubt you are already using it without even realising. This article will hopefully help everybody that reads it, whether you are a beginner or a flash super user, understand the flash event model, and help you to use it. I think the best way to explain something new to somebody so that they can learn from it is to compare the subject with something that humans can relate to in their everyday lifes; A real world Analogy, so this article uses analogies to convey some of the concepts...

(more...)