PDA

View Full Version : Help with magpie action script


hackman238
10-16-2005, 02:07 AM
Im having trouble getting magpies actionscript to work properly. I did find the other post on this forum about it, and the demo I found attached does work; however when I use my own frames it just plays every frame in the expression movie over an over in a constant loop. My questions are listed in my code below.

Thanks everyone.


onClipEvent (enterFrame) {
if (not initialized) {
firstframe = getProperty("_root", _currentframe);
mouths = new Array();
mouths[1] = 0 <<--does this starting number have to be the same as the movies instance beggining frame?
mouths[2] = 0
mouths[3] = 0
mouths[4] = 0
mouths[5] = 0
mouths[6] = 0
mouths[7] = 0
mouths[8] = 0
mouths[9] = 0
mouths[10] = 0
mouths[11] = 0
mouths[12] = 0
mouths[13] = 0
mouths[14] = 0
mouths[15] = 0
mouths[16] = 0
mouths[17] = 0
mouths[18] = 0
mouths[19] = 0
mouths[20] = 0
mouths[21] = 0
mouths[22] = 0
mouths[23] = 0
mouths[24] = 0
mouths[25] = 0
mouths[26] = 0
mouths[27] = 0
mouths[28] = 0
mouths[29] = 0
mouths[30] = 0
mouths[31] = 0
mouths[32] = 0
mouths[33] = 0
mouths[34] = 0
mouths[35] = 0
mouths[36] = 0
mouths[37] = 0
mouths[38] = 0
mouths[39] = 0
mouths[40] = 0
mouths[41] = 0
mouths[42] = 0
mouths[43] = 0
mouths[44] = 0
mouths[45] = 0
initialized = true;
}
if (getProperty("_root", _currentframe) == firstframe)
frame = 1; <<--is this the first frame of the instance or of the mouth array?
if (frame<=mouths.length)
this.gotoAndStop (mouths[frame++]);
}



I do realize this magpie script does nothing, its that way only to shorten it enough for the post.