Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MC inside Button

Status
Not open for further replies.

tomhughes

Vendor
Aug 8, 2001
233
US
I can get the Movie Clip to work properly if it is on the main timeline, but I can't get it to work inside a button.
Here is the code for the MC inside the button, and on the main timeline.Also why won't it show up in the debugger?



onClipEvent (load) {
if (_Level0.strVar0 == "") {
_Level0.strVar0 = 6;
}
x = _Level0.strVar0;
for (i=1; i<=x; i++) {
trace (_Level0[&quot;strVar&quot;+i]);
if (_Level0[&quot;strVar&quot;+i] == &quot;Facilities Design1&quot;) {
x = 1;
}
}
if (x == 1) {
this._alpha = 50;
trace (&quot;ALPHA = 50&quot;);
} else {
trace (&quot;ALPHA = 0&quot;);
this._alpha = 0;
}
}
 
Sounds back to front to me Tom. Unsure why you have a movie clip inside a button. Surely it should be button inside a movieclip.
 
Bill - I couldn't get the buttons properties to work in a movie clip, but they will work when the MC is in the button.
 
The movie clip has to be on the top layer to get it to do what I want.
 
if the movie clip only does what you want on main timeline then its just a path problem.
why not post the fla then i would have a much clearer idea of what you have been trying to do. or mail it to me hp_sauce46@yahoo.com
 
Hi tom have the fla and now i am more confused than ever. I now suspect that what you want is to control the alpha of a button depending on the value of a variable. Is this correct?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top