Hey guys. well i made a topic about this a week or so ago but no reponce with that one so i thought id try again and this time make my self more clear as to what im wanting my code to do.
Ok well i created an array as show below on frame one in the main timeline.
var dialedsymbols:Array = new Array();
and i have a movie clip called jj_mc with the following on clip event code.
onClipEvent (keyDown) {
if ( Key.getAscii() == 47 && this._alpha == 100 && _global.Isjj == 0 ){
this.gotoAndPlay("_engaging")
}
}
and amoung that i have this code below which i have been trying to intergrate it into the onclipevent code so when they press the key on the keyboard it adds jj_mc to the dialedsymbols array only once.
below is the code ive tried arranging different ways with the onclip event
_root.dialedsymbols.push(“jj_mc”)
but nothing i try works.
here are some examples ive tried.
onClipEvent (keyDown) {
if ( Key.getAscii() == 47 && this._alpha == 100 && _global.Isjj == 0 ){
this.gotoAndPlay("_engaging") && _root.dialedsymbols.push(“jj_mc”)
}
}
theres also this one ive tried.
onClipEvent (keyDown) {
if ( Key.getAscii() == 47 && this._alpha == 100 && _global.Isjj == 0 ){
this.gotoAndPlay("_engaging")
_root.dialedsymbols.push(“jj_mc”)
}
}
and also to see if that worked i tried adding a trace action in like this
onClipEvent (keyDown) {
if ( Key.getAscii() == 47 && this._alpha == 100 && _global.Isjj == 0 ){
this.gotoAndPlay("_engaging")
_root.dialedsymbols.push(“jj_mc”)
trace (dialedsymbols)
}
}
but the trace in the code does work but in the output box it says undefined.
so does ne one know how i can get this to work.
now remember i only want it to add the element jj_mc once to the dialedsymbols array when the user press the key assigned to it in the on clip event.
thanks in advanced hope someone outthere can help.