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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

script timing while playing in reverse? 1

Status
Not open for further replies.

esromneb

Programmer
Mar 30, 2002
76
US
Hi, I'm making a menu with sub options that pop out and pull in when you mouse on/off. I have a movie for the options comming out, but I'm just playing them in reverse when they pull in. each sub options gets it's name from a loop that is always playing. The problem is, when I play in reverse:

if(_parent.reverse==1) {
_parent.prevFrame ();
}

it works fine in the middle of the tween, but because the start of the tween is technically a new movie, the text will flash back to it's orginal value for 1 frame, and then it gets changed by the loop. Is there some way to update the text on the suboptions for that one frame? If this is too confusing I'll make a mock movie to demonstrate my problem. Thanks.
-ben

 
How about adapting this one if all possible?


Regards,

cubalibre2.gif
 
Thanks, yes that did help. I didn't know about the hitTest function. My menu is a bit more complicated than that. But thank you very much for that fla. I'll post it when I'm done (not that you care) and hey...here's a vote ^_^
 
Ok, here is my new problem. Ok, so all the buttons in my menu are all the same instance, and I've named them according to their instance name. I want it so that if you mouse over any of them the menu will play (fold out) and if it's off all of them it will pull in. My problem is that the top button is the one that executes last so it precidence ... anyway here is a simplified version of my problem.

 
I gather you're saying, rollover any "button" should show a "1" in the textfield, right?
Why is the code nested so deep?

Regards,

cubalibre2.gif
 
This works...

idtext = this+"";
// trace(idtext);
idtext = idtext.charAt(12);
// trace(idtext);
if (idtext == 1) {
if (hitTest(_root._xmouse, _root._ymouse, flase)) {
// _root.TextField1 = _root.TextField1+1;
_root.TextField1 = "1";
} else {
//_root.TextField1 = "0";
}
}
if (idtext == 2) {
if (hitTest(_root._xmouse, _root._ymouse, flase)) {
// _root.TextField2 = _root.TextField2+1;
_root.TextField1 = "1";
} else {
_root.TextField1 = "0";
}
}

As for a second holder, you would have to duplicate the above hittest clip, in which you would target TextField2. Otherwise editing the script in one instance of hittest, will edit all instances of hittest in the same manner.


Regards,

cubalibre2.gif
 
Ok, I got that to work. I actually just set a flag, and then checked if any of the flags were set and then played the menu. Now my problem is that I want frames. I can't get the flash to be above all the frames. Like, I want it based in one frame, but I want the sub menu's to extend over the boundries of another frame. Will I need some tricky dhtml or something else? If you want to see what you've helped me make go to
It's still 'under construction' but it should be viewable in maybe 1 day. Ok, thanks so much
-ben
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top