| name | ActionScript 3.0 Coding |
| description | This skill should be used when the user or agent asks to "edit .as files", "generate ActionScript code", "write AS3 code", "create ActionScript class", "fix AS3 syntax", "implement Flash code", "develop AIR application", or works with ActionScript 3.0 (.as) files. Also triggers on questions about AS3 syntax, ActionScript patterns, Flash/AIR development, or Adobe runtime APIs. |
| version | 1.0.0 |
ActionScript 3.0 Coding Guide
This skill provides guidance for writing, editing, and generating ActionScript 3.0 code (.as files) using the comprehensive documentation available in this repository.
Documentation Reference
This repository contains complete AS3 and Adobe AIR documentation in /docs/. Consult references/docs-index.md for a categorized index mapping topics to specific documentation files.
AS3 File Structure
Package and Class Declaration
package com.example.project {
import flash.display.Sprite;
import flash.events.Event;
/**
* Class description using ASDoc format.
*/
public class MyClass extends Sprite {
// Constants (UPPER_SNAKE_CASE)
private static const MAX_COUNT:int = 100;
// Instance variables (camelCase, prefixed with underscore for private)
private var _name:String;
protected var isActive:Boolean = false;
public var data:Object;
/**
* Constructor
*/
public function MyClass() {
super();
init();
}
private function init():void {
addEventListener(Event.ADDED_TO_STAGE, onAddedToStage);
}
// Getters/Setters
public function get name():String { return _name; }
public function set name(value:String):void { _name = value; }
// Event handlers (prefixed with "on")
private function onAddedToStage(e:Event):void {
removeEventListener(Event.ADDED_TO_STAGE, onAddedToStage);
}
}
}