Archive for May, 2008

Understanding the use of designer objects in separate as-file(class)

There are many ways to go when you want to start creating a flash application with your own fresh idea, but there are problems understanding the interaction between the objects you create in the designer and how to access these from separate actionscript classes. This post will help you understand the basics on doing this.

There are different approaches with this type of interaction:

  1. Having a static object visually in the movie with “instance name”
  2. Linking the object to “Export for Actionscript”

Having a static object visually in the movie with “instance name”
folder rubyrails

If you have an icon placed on the stage you can access this object directly just by using the “instance name”. The interaction that flash does behind the scene makes you able to use these objects as already created and added objects in the OOP language. Since these objects are created you can use them directly. This is the same procedure as you would use the actionscript panel in the designer to access the drawn objects on stage. Below you can see how to access the object Read more »

Google Maps AS3 API has been released

Google finally released a Maps API for Flash/AS3 and I must say it looks great. My opinion is that Google, one of the leading edge technology organization in the world, should have released this earlier, but they have released it the Apple way. A bit slow, but stunning! It’s good to see that they finally answered to Yahoo’s Maps API witch have been out there for a while now. Maybe you can create an application that combines the two in one application? Don’t bother, because it’s already there. ModestMaps is the name, and three map providers are already combined. Google Maps, Yahoo Maps and Microsoft Live Maps but you also gets tile based maps from OpenStreetMap and NASA Blue Marble

As always, they want feedback and on their flash maps API blog but if you don’t have feedback you can go there to find solutions on problems.

Google maps

Yahoo has launched Actionscript 3 Maps API

A while back I stumbled upon that yahoo had released an API for flash developers. This is a huge step in the right direction. The Yahoo Maps API is filled with functionality and is not only for flash, but also for Flex. You can also find Javascript API if that suites you better.

You should check out the components that they have created, cause they can come in great use. Sign up for a free API key and start creating you custom map application.

Yahoo map

Learning flash and actionscript 3(AS3)

Many flash developers that produce applications in as2 see only trouble when trying to convert to as3. The problem is the change from designer thinking to object oriented programming. The gap is huge. Lets look at some samples in creating flash in actionscript 3.

Car exampleIf we visualize a car, the car has many nuts and bolts creating the the whole car witch is the term we use. When looking at the content of the car we can just imagine how many items there are, but lets look at a few. Some of the items in a car can be an engine, number of wheels, steering wheel, doors and headlights. We can recreate this car in programming as well. We can create an object called “Car” that contains the items as variables. This object can be used one time or many times, depending what you want to create. Lets create a simple car object using the standard Object variable:


// first creating an object called car
var car:Object = new Object();
// giving the car properties to define the car
car.name = "My custom Porche";
car.engine = 6.3;
car.numberWheels = 4;
car.stearingWheel = "Recaro";
car.doors = "Elevating doors";

Read more »