Contents tagged with actionscript

  • ActionScript 3 timeout problems when working with XML

    I was getting the following error while developing my doodle flash application using ActionScript 3.0:

    1502 A script has executed for longer than the default timeout period of 15 seconds.

    I tracked the problem down to a piece of code that looped through a large XML document. At first I thought there was nothing I could do, but after playing about with it and pulling my hair out for a while I found out several things that helped me reduce the runtime by an impressive amount. I wanted to share my findings in case anyone else was having similar problems.

    Finding 1: XML .. operator is very … more

  • Getting the cursor hand to appear over MovieClips containing text in Flash

    I've been making an animated button using a MovieClip in Flash using ActionScript 3. The problem I had was making the hand cursor appear over it, firstly at all and then when my button had text in it.

    To make a MovieClip behave like a button and use the hand cursor set the following properties for the MovieClip.

    clip.buttonMode = true; clip.useHandCursor = true;

    Next, if your MovieClip contains a TextField set the following property for the TextField.

    clip.labelText.mouseEnabled = false;

    This means that the button underneath deals with the mouse, so the cursor will behave in the way … more

  • 1