Skip to main content
Participant
June 24, 2009
Question

how to read movieClip container variables by attachmovie

  • June 24, 2009
  • 1 reply
  • 372 views
I used a movieClip to store the attach movieclip, but How to get back the variable from that movieClip container,

such as a I set a array in the exiting movieClip

var m_click:Array = new Array();
for (var f=0; f<=this[mc_name+"_qty"]._totalframes-1; f++)
{ m_click = 0; }

I want the attached movieClip "y_qty" with a button inside to get the m_click for changing each m_click[0]..m_click[1]..value, how to do it?

Thanks
This topic has been closed for replies.

1 reply

kglad
Community Expert
Community Expert
June 24, 2009


if your button is a true/simple button use:

var m_click:Array = new Array();
for (var f=0; f<=this[mc_name+"_qty"]._totalframes-1; f++) {
m_click = 0;
}

y_qty.yourbutton.onRelease=function(){
trace(mc_click[this._currentframe]);
}