« December 2003 | Inicio | February 2004 »

January 31, 2004

I need some advice about a PocketPC

During the last months I've been thinking about buying myself a PocketPC.

The fact is that I'm not really sure if it's really worth the money. I mean, what can I do with it exactly?. I know I can use it to read some e-books while I'm on the train to work, that I can use it to maintain my task list, and so on, but I'm not sure if it's really worth the 500€ it costs.

If any of you can think of a cool use of a PocketPC, please let me now!

So, how was my first week?

The four of you that follow this blog, will remember that last monday I started working for a new employer.

Well, a week has passed, and it's time to see what has happened in these days.

I've entered a new and unknown world. The world of "software engineering". Design patterns (state, singleton), interfaces, complex data structures (hash maps, linked lists), all of them written in "that scripting language" that works with that "animation tool".

I don't know if I'll be able to learn all the things I have to learn in the following weeks, but I'm sure it'll be worth the effort.

January 26, 2004

I have a new job too

Well, as my brother César, I have a new job too. I start my new job next monday. I´m very excited, about this. New city ( Vitoria, north of Spain ), new job making flash communication server and making flash educational games, and making cartoon movies. I think i'll learn a lot and i'll enjoy it. :D

January 25, 2004

My first day!

Tomorrow it's my first day at my new job. I've been working for an e-learning company for the last two years and a half, building a flash CMS, and many educational games.

Now I'm entering the game development world. Of course, I'm really excited, and a bit frightened. But I'm sure that I'm facing the opportunity to learn a lot from a lot of different people with different backgrounds (Java, C and .Net developers).

So tonight it will not be easy to sleep. But I hope tomorrow will be a great day.

January 20, 2004

We are not spammers!

To all the community: We are not spammers!

I've seen our domain name listed in some of the MT-Blacklist configuration files of some members of the community.

Well, maybe our blog is not the best one in the world, but, please, check it, and please, remove us from your blacklists.

Thanks in advance!

January 19, 2004

A mySQL Flash panel

This is just something I'm using in my daily work.

This is a panel to browse the structure of a mySQL database. It's been tested only in a local environment, with both the webserver and the database server running at localhost.

This panel is not an administration interface. You cannot browse the tables records, and you cannot add, delete or modify those records.

Anyway, some kind of interactivity will be provided in the next release (maybe a "run query" funcionality).

Installation instructions
----------------------
1.- Unzip the content of the php folder and copy it to any folder of your webserver

Example: In a windows box, the destination folder could be

c:\apache\htdocs\databases\

2.- Using the Macromedia Extension manager, install the mxp file

3.- Start Flash. Open the panel form the menu Window->Other panels->databasesList_en

4.- Configuration:

4.1.-script: URL of the folder where the php files where copied:

http://localhost/databases/

Don't forget the final slash.

4.2.- host: mySQL server. Should be localhost

4.3.- User: mySQL user

4.4.- Password: mySQl password

If you have any suggestion, comment, bug report, please drop me a line.

Download the panel

January 16, 2004

Player or virtual machine?

I've just read a post by Darron Schall where he talks about the "virtual machine", instead of the "flash player".

The first difference between the flash player and the java virtual machine is size. Of course, that difference comes from the different funcionality provided. When programing in flash, we cannot acces the file system, the sytem configuration,....

But does it really make sense to try to do in flash the things that can be done in Java?. I'm not sure.

Maybe I'm wrong, but it seems that macromedia is trying to provide a new development platform. So we'll have Java (Sun), .Net (Microsoft) and Flash (Macromedia).

That sounds good, but I'm afraid we are really close to forget what flash has meant for all these years. I am very excited about our future as flash developers, but I don't want to forget about our past.

Any thoughts?

January 11, 2004

AS2 and prototypes

How could we make a method available to all movieclip instances?. It's easy, adding it to the movieclip prototype. But is it that easy when we code in AS2?

Now, we can't modify the movieclip class, we are only suppossed to extend it, addingh methods to its subclasses. ¿Sure?.

OOP theory says that, to add a method to the movieclip class, we should write something like this:

class net.designnation.exp.TestClass extends MovieClip{ function TestClass(){ trace("constructor"); } //This one is the new method we want to add private function methodAS1(){ trace("I'm the new method!"); } }

So this class inherits all the movieclip methods, and has a new method called methodAS1. But that method belongs only to TestClass. So, if we write a new class that inherits movieclip, we should define it's methodAS1 method.

Some of you, maybe have thought yet: we need many different classes implementing the same method, hmmmm, what about defining an interface?

interface net.designnation.exp.MCInterface{ public function methodAS1():Void; }

So, our class looks like this now:

import net.designnation.exp.*; class net.designnation.exp.TestClass extends MovieClip implements MCInterface{ function TestClass(){ trace("TestClass constructor"); } //Here we must implement method //that belongs to the interface private function methodAS1(){ trace("defined in the interface"); } }

Well, is our problem solved? Not completely. Now we are forced to implement a given method in all the classes that implement the interface. Just to remind you (and me): we want to implement a method only once, and make it accesible to all our classes.

Maybe the most elegant solutions will be to implement a class that inherits from movieclip, and implement our methodAS1 in that class. Then, we'll make all our classes inherit from that new class. But, you know, this is flash, let´s have some fun!.

So, in the first frame of our fla, we could write:

MovieClip.prototype.methodAS1 = function(){ trace("Done!. I'm the right method!"); };

And our class will look like this:

class net.designnation.exp.TestClass extends MovieClip{ function TestClass(){ trace("constructor"); } private function methodAS2(){ trace("I'm the class method"); }; public function onRollOver(){ //Runs the superclass method super.metodoAS1(); methodAS2(); }; }

To see this example in action, I've created a MovieClip drawing a circle inside it, that I'll use as a button. It's linkage name is ”MyClip” and the actionscript 2.0 class is “net.designnation.TestClass”.

So, back to the fla's first frame:

MovieClip.prototype.methodAS1 = function(){ trace("Done!. I'm the right method!"); }; //Attachs the movie, and instanciates TestClass this.attachMovie("MiClip", "instancia", 1);

So, what happens when moving the mouse over the clip?. Right!. We got it!. Well, not at all. We are running one of the superclass (MovieClip) methods, so what happens if we want to run another method of TestClass from its superclass?

If we change TestClass:

class net.designnation.exp.TestClass extends MovieClip{ function TestClass(){ trace("constructor"); } private function metodoAS2(arg){ trace("I'm the class method " + arg); }; public function onRollOver(){ //Runs the superclass method super.methodAS1(this); //methodAS2(); }; }

And if we change the method definition:

MovieClip.prototype.methodAS1 = function(ref){ trace("Done!. I'm the right method!"); ref.methodAS2("_width " + this._width); };

So, we've called a method of the superclass, passing it a reference to the class that called it. So, now, the superclass knows who's called it.

Congratulations if you didn't felt asleep.

Flare AS decompiler

Via swftools, i have found this tool. Take a look, this is an AS decompiler.

January 07, 2004

Resizable button

The problem: to make a button that could be resized without transforming the text.

The solution: building the button at runtime.

First, let's take a look at the final product:

There are three clips: the left and right borders, and the background.

So, here's the code attached to the first frame:

Stage.scaleMode = "noScale"; Stage.align="TL"; import net.designnation.botones.*; //Callback, it will be fired when the button is clicked function CallBack(){ getURL("javascript:alert('Hey, you clicked me!')"); } /* ** * * parameters: text (it's passed through flashvars) * left border linkage name * right border linkage name * background linkage name * callback's name * the timeline where the button is built ** */ var miBoton:Boton = new Boton(textButton, "left", "right", "background", "CallBack", this); //Textformat miBoton.setFormat("verdana", 20, 0xFFFFFF); //build the button miBoton.init(); stop();

So, here is the main class:

class net.designnation.botones.Boton{ private var left; private var right; private var fondo; private var tempLeft; private var tempRight; private var tempFondo; private var texto:String; private var callback:String; private var timeline; private var ancho:Number; private var alto:Number; private var anchoUtil:Number; private var nDepth = 0; private var innerDepth = 0; private var innerClip; private var innerText; private var formato:TextFormat; function Boton(){ trace("constructor"); texto = arguments[0];//text left = arguments[1];//left border right = arguments[2];//right border fondo = arguments[3];//Background callback = arguments[4];//callback function timeline = arguments[5];//reference to _level0 //init(); }; public function setFormat(){ formato = new TextFormat(); formato.font = arguments[0]; formato.size = arguments[1]; formato.color = arguments[2]; formato.bold = true; }; public function onOver(){ /* tempLeft.gotoAndStop(2); tempRight.gotoAndStop(2); tempFondo.gotoAndStop(2); */ }; public function onOut(){ /* tempLeft.gotoAndStop(1); tempRight.gotoAndStop(1); tempFondo.gotoAndStop(1); */ }; public function onClick(){ timeline[callback](); }; public function init(){ ancho = Stage.width; alto = Stage.height; //trace("ancho " + ancho + " alto " + alto); tempLeft = timeline.attachMovie(left,"tLeft", nDepth++, {_x:0, _y:0, _height:alto}); tempRight = timeline.attachMovie(right, "tRight", nDepth++, {_y:0, _height:alto}); tempRight._x = ancho - tempRight._width; anchoUtil = ancho-(tempLeft._width*2); tempFondo = timeline.attachMovie(fondo, "tFondo", nDepth++, {_x:tempLeft._width, _width:anchoUtil, _height:alto}); innerClip = timeline.createEmptyMovieClip("tempInner", nDepth++); innerClip.ref = this; innerClip.onRollOver = function(){ this.ref.onOver(); }; innerClip.onRollOut = function(){ this.ref.onOut(); }; innerClip.onRelease = function(){ this.ref.onClick(); }; innerClip.createTextField("tempText", innerDepth++,0,(alto/4),anchoUtil, alto); innerText = innerClip.tempText; innerText.text = texto; innerText._x = tempLeft._width; innerText.setTextFormat(formato); }; }

Defend your castle!

The Governor is trying to recover the castle!. Load your weapons!












We'll take a closer look at the source code in the following days.

Anyway, the graphics have been made by Celia Carracedo. Thanks, Celia!

January 05, 2004

security problem with flashcom

Yesterday, it was an interesting thread in chayttyfig flashcom list about people who stole flashcom app. You can see the first msg here ( from Peldi ).
After that, Fernando publish on funciton a couple of tips. Intersting to read. Finally , Peldi has publish something too, take a look here

Great surprise, flashcomguru

Well, today on Chattyfig flashcom mailing list, i have a surprise. A message anounce the born of flashcomguru. I'll see you in his flashcom forums ( remember, i sign as desmond_dekker )

Did you know??->Director MX 2004

Yes, macromedia presents, macromedia Director MX 2004 today, but, this is an old news, as you can see, others have posted that before

ash
ash
waldosmeets
Computer world New Zealand,
flashmagazine

and so on, even the spanish version of this blog has a post about it design-nation/es and, sure there will be more posts on more blogs.

This means, that everyone is really alert :D

As always, sorry for my horrible english.

January 03, 2004

We are proud to be Actionscript Super Heroes!

We've been selected to join the Hall of Justhese, the aggregator hosted and maintained by aSH.

We are extremely proud!.

It's nice to be a hero...

Hello, fullasagoog!

Today I've received a kind e-mail from Geoff Bowers, telling me that he was going to add this blog to fullasagoog, and, well, I must say I'm really happy!.

We just pretend to share our daily experience working with the Macromedia tools (mostly Flash and FlashComm). We hope you find this blog useful. And we wait for your corrections and comments.

So, here we come!

January 02, 2004

Unity 2.0.1

This updater include bug fixes,...You can read it here, at MoockBlog

Interesting links

Via FlashLA, I have found this interesting links collection. Usefull.
University of de Minnesota-> Web design references