ActionScript 2.0 has support for the onReleaseOutside event in the following manner… This directly applied event handler will trigger when the mouse is released over myMovieClip or when that clip is clicked upon then the mouse is subsequently released elsewhere. ActionScript 3.0, however, does not define an onReleaseOutside event type, though there are plenty of other…[Read on]
Detecting onReleaseOutside in AS3
Manually triggering event listener functions
ActionScript 3.0 was designed to provide much better error handling than its precessor, with both run-time and compile-time checks being made. Yet although the language is stricter in some senses, it also provides new, considerable, flexibility. For example, the rest... parameter, which enables a function to receive any number of comma-delimited arguments. The ability…[Read on]
ADDED_TO_STAGE event fires twice
Display objects often need to perform set-up tasks which depend on the stage. They might wish to access stage.stageWidth or stage.stageHeight, for example. The trouble is, the stage property will return null until that object is on the Display List. The standard way around this is to put such set-up tasks in an init method, which you then trigger separately, so the init…[Read on]
ReferenceError: Error #1056: Cannot create property on…
When you’re exporting an SWF associated with a document class file, you might have a few instances of MovieClips on the stage as well. These are acceptable as instance properties of your class even if they are not declared within it, by virtue of this checkbox. Like us, you might prefer to declare any such visual instances in the document class file, so you untick this checkbox and enter code such…[Read on]
Latest blog comments