Browsing articles from "February, 2005"

Initialize inline – debug longtime

Feb 21, 2005   //   by Tuomas Artman   //  No Comments

Today I finally solved a memory leak issue in one of our projects after hunting it down line by line. And as in most cases the problem was in a few miserable lines of code. This time however, the problem was not that obvious after I had found it.

When writing classes one may initialize properties inline – give them a default value when the class is instantiated without having to do anything in the constructor:

class InlineTest{
  private var inlineInit:Number = 20;
  …
}

I’ve found this quiet a handy alternative to initializing all properties in the constructor, especially when I have lots of properties. However, as I was painfully tought by a hard late night debugging session you should not us inline initialization for reference data types (objects).

Consider this class:

class InlineTest {
   public var arr:Array = new Array();
   public function InlineTest(init:String) {
      arr.push(init);
   }
}

I would have imagined that the arr-property is initialized as an empty array for each instance of the class. However, Flash initializes inline properties only once (when the class is defined). When the instance is created all properties of the class are copied to the instance’s scope. Primitive data types work without a problem because the actual value of the property is copied. In the given example when the arr-property of the type Array is copied, the instance receives the pointer to the actual array, so that it actually behaves like a static property.

Trying the following:

var a:InlineTest = new InlineTest("Something");
var b:InlineTest = new InlineTest("Something else");
trace(a.arr.length);

Will actually trace "2". Go easy on those inline initializations…

Leave a comment

Nokia hops onto Flash Lite bandwagon

Feb 11, 2005   //   by Tuomas Artman   //  Comments Off

Just a few months after Samsung, Nokia and Macromedia today announced that they’ve signed a license agreement that will integrate Flash into the Series 60 platform.

This is great news and I’ve been waiting for this announcement since early 2002 when Flash Player support was announced for the Nokia 9200 Communicator. The 9200 was far from mainstream and thus was not very appealing to developers, and even Samsung’s license agreement didn’t get me excited, since at least here in Finland there’s really no point in developing anything for mobile phones other than S40 or S60 (with about 80% market share).

I hope Nokia will be quick to pre-install Flash Lite on all devices. It will still take a few years for Flash on the mobile to be so widespread that it will make sense to develop carrier-independent applications with it.

Comments are closed.

Comments Off

Maelstorm

Feb 10, 2005   //   by Tuomas Artman   //  No Comments

Thud…

That was the sound I made when I died of anticipation after looking at the first video of Maelstorm from the Tokyo flascon a few moths ago.

To me the arrival of 8Ball and Maelstorm (I’ve always wondered why two code-names for software that could not exist without each other)

finally ends the wait for the most anticipated feature I’ve been longing for since – well FutureSplash really: High quality anti-aliased

text. Of course, layer modes, pixel control, vector2bitmap caching, alpha-video support are very welcome as well, but nothing compared to

the relieve that I’ll get when designing the next "< 14px" site – and my text will not look like as if you have -5 vision on both eyes.

Leave a comment

Get Flash Player 7 with Yahoo! Toolbar FREE.

Feb 10, 2005   //   by Tuomas Artman   //  6 Comments

WTF? OMG!

Macromedia now tries to bundle Yahoo! Toolbar with the Flash Player.

When I a few months ago upgraded to the latest Shockwave player I was shocked to see that the installer asked to install the Y!TB. Back then I thought that well, it’s understandable that MM tries to make some money via sponsored installations for the Shockwave, since it really is no longer mainstream and has quite a big footprint.

Obviously the Shockwave-Y!TB bundle did generate some short-term income for MM so they try to use the same thing for the Flash Player. Maybe I’m a pessimist (thinking of poor non-flash fellows that want to use the the websites that we’ve built but turn away because they feel afraid to make a choice between FP 7 with Yahoo! and FP 7 without Yahoo!) or maybe I’m just biased (I Goooogle, Yahoo! is for kids that don’t know any better) but I’m quiet afraid that this will slow the adoption rate of Flash.

Hopefully Macromedia has done some extensive market research that proves my fears unjustified.

6 Comments

  • ok i really need flash player 7 for windows. if you no were to get it email it to me!

  • I NEED FLASH7 FOR MY 2005 QUICKBOOKS AND CANT FIND DOWNLOAD FOR IT PLEASE SEND TO ME THE PART WERE THERE IS A DOWNLOAD FOR FLASH7 ONLY THANK YOU LANA

  • Hello,
    I too am in need of flash player 7 for my quick books. Is it possible for you to send me a link where I can download flash player 7? I would greatly appreciate it.

  • You’ll find all archived versions of the Flash Player at http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_14266&sliceId=2

  • please pleasepleaseplease tell me where to get flash playerr 7

  • please tell where to get flash player 7 i need it badly

Leave a comment