actionscript 3 - Target event Issue -


the goal trying achieve code is, if clip targeted after displayed should play. if monday choice targeted should play monday clip. code not working. error this:

scene 1, layer 'layer 1', frame 2, line 75  1120: access of undefined property play_event. scene 1, layer 'layer 1', frame 2, line 74  1120: access of undefined property play_event.   var week_pick:weekday_choice = new weekday_choice (); var weekdayarray: array = new array (); var monday:mon_d_but = new mon_d_but (); var tuesday:tues_d_but = new tues_d_but (); var wednesday:wed_d_but = new wed_d_but (); var thursday:thurs_d_but = new thurs_d_but (); var friday:fri_d_but = new fri_d_but (); var choice_play: array = new array ();  choice_play.push(monday, tuesday, wednesday, thursday, friday);  addchild(week_pick);  choice_play[0].x = 73.1; choice_play[0].y = 316.75;  choice_play[1].x = 251.9; choice_play[1].y = 278.35;  choice_play[2].x = 399.95; choice_play[2].y = 375.85;  choice_play[3].x = 345.2; choice_play[3].y = 602.4;  choice_play[4].x = 80.15; choice_play[4].y = 603.05;  week_pick.addeventlistener(event.enter_frame, moveon);  function moveon(event:event) {     if (week_pick.currentframe == 103)     {          week_pick.stop();         (var = 0; < choice_play.length; a++)         {             addchild(choice_play [a]);             choice_play[a].alpha = 0;             choice_play[a].stop();         }          this.addeventlistener(mouseevent.click,choice_play_ev);       } }  function choice_play_ev(play_event: mouseevent) {      if (play_event.target != week_pick)     {          play_event.target.alpha = 1;          play_event.target.addeventlistener(event.enter_frame, play_target,false,0,true);      }  } function play_target(e:event) {      play_event.target.play();     if (play_event.target.currentframe == 15)     {         destroyall_2();     }  } 

i not entirely sure if doing correctly. there 2 list of things on screen, initial movie clip @ start doesn't need interaction, , clips needs playing if clicked. can please me out it?

in play_target, trying access play_event undefined. event in case e.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -