Heroes never panic.

JSAPI reference

Posted: October 24th, 2003 | Author: | Filed under: Actionscript | Comments Off

Tired of waiting for the official MM jsapi reference?
Here’s a nice one: JSAPI Overview

via flashcoders.


Extending AS2 Array

Posted: October 23rd, 2003 | Author: | Filed under: Actionscript | 2 Comments »

According to gSkinner’s post, when you extend an array you must call the superClass constructor in a particular way so that the indefinite amount of arguments get passed along correctly to the parent class:

class ArrayExtended extends Array
{
function ArrayExtended(){
super.constructor.apply(this, arguments);
}
public function someFunc(){
return length;
}

}

Well, that never worked for me… actually that’s very strange because it appears as if it works for some but not for others..

today i came across a post a Tween Pix and the solution that i saw there is working:

class ArrayExtended extends Array
{
function ArrayExtended(){
splice.apply(this, [0, 0].concat(arguments));
}
public function someFunc(){
return length;
}

}

but im still wondering WHY the gskinner’s variant doesn’t work for me??!

UPDATE:
The solution above (the one that works for me) was actually first posted at flashcoders mailing list


central – first try

Posted: October 19th, 2003 | Author: | Filed under: Actionscript | Comments Off

Today i’ve been playing with macromedia central sdk. There is quite some new stuff to learn but it’s quite easy to make some simple “begginer” applications :)
well.. here’s mine:
GoogService

Its a fullasagoog blog readed and it uses flash remoting to connect to goog’s webservice.
It’s still in its early stage and it’s not really good looking, but it gets the job done for now :)
anyway.. now i have to learn how to save downloaded blogs for off line reading!

Many thanks to centralmx for posting it at their site! :)


new Flash Forum

Posted: October 16th, 2003 | Author: | Filed under: Actionscript | 2 Comments »

Through Dave Yang’s blog I heard that a new Flash forum was born: Brajeshwar Flash Forum
Looks really promising.


CSS lists and floats

Posted: October 15th, 2003 | Author: | Filed under: General | Comments Off

While browsing around today i came across this site with some cool css tutorials on lists and floats:
css.maxdesign.com.au


New UI Components for FlashMX2004

Posted: October 9th, 2003 | Author: | Filed under: Actionscript | Comments Off

Joey Lott, the author of Actionscript Cookbook, has posted a set of UI Flash Components at his site:
- Button
- Loader
- ProgressBar
- ScrollBar
- ScrollPane
- Window
- TextArea

The reason, he writes, for making them is because the current MM components are rather heavy.. and some of them do not work properly.
Lott’s components are still in the alpha stage, but if you want to try them you can download them here:
www.person13.com/components


Webservices are easy

Posted: October 5th, 2003 | Author: | Filed under: Actionscript | Comments Off

Just out of curiosity i tried the webserviceConnector component. I really wanted to see if it really is that simple to set up and use (as everybody is saying)…
And, honestly, it took me 15 minutes to make it (5 minutes were spent on deciding which webservice i’m going to use).
Knowing that WebserviceX.Net have recently put a crossdomain policy file up on their server, i tried my luck with their leingth/distance converter:

http://www.webservicex.net/length.asmx?WSDL

Preview the service here

All you have to do is to open web service window (Window/developer Panels/Web Services), click on Define web service icon (that thing that looks like Earth) and type the url of the service in the pop up window. After a while (when flash connects to the service and recieves back the response) all the methods aviable from this service will be listed in that window. Now its’ only a matter of selecting which one you want to use, right click on it and select “Add method call” and flash will automatically place an instance of WebserviceConnector component on the stage.
I also added a couple of comboboxes (for the unit names), a textInput , a textArea (which will display a result from the conversion) and a button on the stage.
The trickiest part now is to bind the webserviceConnector to other components on stage. Ok, it sounds tricky, but it really is not ;)
Select the webserviceConnector and click on the bindings tab in the Component Inspector panel and add your bindings (click on the +)… I added the simplest one first, the result that the service will send me. I selected it (the last one, called results:Number) and then set the “bound to” to point to my textArea component (more preciselly, its text property). I did the same with other parameters:
params.LengthValue – bounded to textInput field:text
params.fromLengthUnit – bounded to fromLengthUnit_combobox:value
params.toLengthUnit – bounded to toLengthUnit_combobox:value

now, what’s left is just few lines of code: we want to trigger the service when we click on the button, so we have to write an event handler for that:

goConvert = function (ev)
{
//ChangeLength_wbs is the instance name of the webservice component
ChangeLength_wbs.trigger();
};

convertButton_pb.addEventListener("click", goConvert);

Attached is a zipped fla for taking a closer look :)

Download zipped file

UPDATE:
Just noticed that Vera Fleischer has written a great in-depth post on how to use webserviceConnector :)


Flash Remoting: The Definitive Guide on Safari

Posted: October 3rd, 2003 | Author: | Filed under: Actionscript | Comments Off

With great pleasure I discovered this morning that Flash Remoting: the Definite Guide has been added to O’Reilly Network Safari Bookshelf.
Uhmm.. I’m not sure how much work will get done in the next couple of days (or how much sleep will i get?).


flash extensibility

Posted: October 2nd, 2003 | Author: | Filed under: Actionscript | Comments Off

FlashMX2004 has been out for almost a month now and still no official documentation from macromedia about jsfl :(
Thank god there are places online where one can find all the information and start experimenting with this new addition.
flashextensibility.com – forums run by authors of the soon-to-be released book “Extending Flash MX 2004: A Guide And Complete Reference” (i must say that i’m really excited about this book and can’t wait for it to come out!)
Flash MX 2004 JSFL Reference – a pretty detailed reference of jsfl (and till now the ONLY reference you can get)
XML to UI Unauthorized version – tutorials that will get you started using jsfl and xml to extend your Commands menu in Flash
ExtendFlash mailing linst – a list run by flashguru.co.uk

so, armed with all this documentation i made my first custom command .. ok, i admit, it is really small and humble but it’s something that i am actually using quite often now :)

No matter how hard i try i always forget color hex numbers.. and i really hate it when writing actionscript code, to have to close the ASpanel and open the color window, find my color, copy the hex and go back to ASpanel to paste it. Maybe there were other, more efficient ways for doing it that i’m unaware of ? .. anyway, when i first read about jsfl i thought: “hey, making a custom command that would paste the chosen hex color number into your AS window doesn’t seem to be such a daunting task! even i can try and make it!”

and guess what? it wasn’t hard! :) .. in a couple of minutes i was inserting the “hexes” into my ASpanel like a mad monkey ;)

if you want to try it, download the zip and unpack it in your
C:\Documents and Settings\[user]\Local Settings\Application Data\Macromedia\Flash MX 2004\en\Configuration\Commands folder.

download insertColor.zip


Free online reading (another dummy entry)

Posted: September 27th, 2003 | Author: | Filed under: General | Comments Off

Didn’t want to copy/paste another lorem ispum entry.. so i’m making this one look.. kinda.. “real” :P
Some interesting free online books can be found here:
FreeTechBooks
Quite a few java, oop and general programming books worth reading…
note to self: python looks like an interesting language, too…