actionscript 3 - AS3 Saving a sharedObject timeline -


i hoping offer simple solution. trying save 'labeled' frame on timeline storing sharedobject.

the user can flip between various different backgrounds on stage clicking button - button 1 corresponds background one, background 2 corresponds btn 2 , on... reference these backgrounds stored in sub timeline. tips on how store..?

//// ---------------- window swapper -------------------  this.but_one.btn_one.addeventlistener(mouseevent.click, swapperslide);  function swapperslide(event:mouseevent):void {      this.caseswapper.gotoandstop("frametwo"); }  this.but_one.btn_two.addeventlistener(mouseevent.click, swapperslidetwo);  function swapperslidetwo(event:mouseevent):void {      this.caseswapper.gotoandstop("framethree"); }  save_btn.addeventlistener (mouseevent.click, clickersave);   // ---- saves -----------------------  function clickersave (e:mouseevent):void { myso.data.myframe = timelineframe; ////myso.data.my_y = bones_mc.y; myso.flush (); }  

thanks

p.s frames on movie clip contain as3 stop();

edit updates code -----------------------------

//save functions --------------------------------------- //--------------------------------------------------- //---------------------------------------------------  var myso:sharedobject = sharedobject.getlocal("idesign");  bones_mc.x = myso.data.my_x; bones_mc.y = myso.data.my_y;  if (!myso.data.my_y) { bones_mc.x = 424; bones_mc.y = 119; }  //---- save_btn.addeventlistener (mouseevent.click, clickersave);  function clickersave (e:mouseevent):void { myso.data.my_x = bones_mc.x; myso.data.my_y = bones_mc.y; myso.data.mybut_x = btrfly_mc.x; myso.data.mybut_y = btrfly_mc.y; myso.data.mytig_x = tiger_mc.x; myso.data.mytig_y = tiger_mc.y;  myso.data.mybow_x = pink_bow_mc.x; myso.data.mybow_y = pink_bow_mc.y; myso.data.myblkbow_y = pink_bow_mc.y; myso.data.myblkbow_x = pink_bow_mc.x;     // tears saved - - - - -  - - myso.data.mytear_drop_mc_three_x = tear_drop_mc_three.x; myso.data.mytear_drop_mc_three_y = tear_drop_mc_three.y; myso.data.mytear_drop_mc_one_x = tear_drop_mc_one.x; myso.data.mytear_drop_mc_one_y = tear_drop_mc_one.y; myso.data.mytear_drop_mc_two_x = tear_drop_mc.x; myso.data.mytear_drop_mc_two_y = tear_drop_mc.y; myso.data.mytear_drop_mc_four_x = tear_drop_mc_four.x; myso.data.mytear_drop_mc_four_y = tear_drop_mc_four.y;     myso.data.myframe = caseswapper.currentframe;        trace(caseswapper.currentframe) myso.flush (); }  //caseswapper.currentframe = myso.data.myframe;  tear_drop_mc_three.x = myso.data.mytear_drop_mc_three_x; tear_drop_mc_three.y = myso.data.mytear_drop_mc_three_y; 

in order store current frame, need use currentframe property.

myso.data.myframe = caseswapper.currentframe; 

Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -