

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


Data types : String, Number, Boolean, Object, MovieClip, Null, Void, Refer Flash AS pdf file chaper 2, pp. 34 ~ 39
Examples var x: Number = 7 ; var today: Date = new Date() ; var y = 3 ; // Automatic data typing
_global.myVar=5;
myClip.onEnterFrame=function() { if (this._x<300) this._x+=5; else delete this.onEnterFrame; // to erase it, but you can simply empty it // else this.onEnterFrame=null; }
onData onDragOut onDragOver onEnterFrame onKeyDown onKeyUp onKillFocus onLoad onMouseDown onMouseMove onMouseUp onPress onRelease onReleaseOutside onRollOut onRollOver onSetFocus onUnload
function loadXML(loaded) { if (loaded) { _root.titlen = this.firstChild.childNodes[0].childNodes[0].firstChild.nodeValue; _root.story = this.firstChild.childNodes[0].childNodes[1].firstChild.nodeValue; title_txt.text = _root.titlen; story_txt.text = _root.story; } else { trace("file not loaded!");} }
xmlData = new XML(); xmlData.ignoreWhite = true; xmlData.onLoad = loadXML; xmlData.load("movie.xml");