Andrew Kendall (http://www.andrewkendall.com)
HomeNewsProfileGalleryWorkLearningDownloadsLinksMiscContact
Learning
 

Code snippets

The code snippets should simplify your Flash MX 2004 coding just copy and paste as needed.

Only text in itaclics needs to be copied.

Main frame code

_root.onEnterFrame = function() {

};

Key press input

if(Key.isDown(Key.RIGHT)){

}

Button input

on (press) {

}

If statement

if (conditiongoeshere) {

}

Collision detection

if (object1.hitTest(object2)) {

}

Duplicate object

objectname.duplicateMovieClip(newname, level)

Stop the timeline

stop();

Tell object to play

objectname.gotoAndPlay(frame);

Copyright © 2023 Andrew Kendall