|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Help with ClipEvents or something
Here's what I need to do:
I have 4 items (they might be text or graphics, haven't decided). I want to reveal items 1, 2, and 3 in any order which the user mousesOver them. Once the user has mousedOver all 3 items, I would like to reveal the 4th item. Is this an if/else situation and does anyone have the code for this? Rush Job, so very appreciative to anyone who can help. |
|
#2
|
||||
|
||||
|
The code below will work. You can use buttons or clips, just be sure to give them the instance names below. Every time the user rolls over the button, it adds 1 to the dynamic text field and then disables the button to prevent future rollovers. onEnterFrame will check to see when the dynamic text field equals 3 and when it does, your 4th item will be executed. Be sure to fill it in.
Code:
_root.createTextField("variables", 1, 0, 0, 0, 0);
variables._visible = 0;
// ===============================================
this.onEnterFrame = function() {
if (variables.text == 3) {
// Put your 4th item here.
}
};
button1.onRollOver = function() {
_root.variables.text = _root.variables.text+1;
button1.enabled = false;
};
button2.onRollOver = function() {
_root.variables.text = _root.variables.text+1;
button2.enabled = false;
};
button3.onRollOver = function() {
_root.variables.text = _root.variables.text+1;
button3.enabled = false;
};
Last edited by jmichels : February 16th, 2004 at 05:21 PM. |
|
#3
|
|||
|
|||
|
Thanks so much. What about the rest of this. I just don't have the time to search and I'm not much of a programmer, but I totally understand your code. Thanks so much...here's the rest of what I need:QUESTION #2:
I have a simple skills check with 3 items in column A and 3 items in column B. I want the user to drag the appropriate items in A to the proper item in B. Now here comes the stuff that I trip over and need HELP.... There are also 4 buttons, exit, start over, back, and next that go to different parts of the movie before and after the skills check. If the user mousesOver any of these buttons, I want a message to say something BUT ... if the user has already started to drag an element from column A, then I want the message to say something different such as "If you start over now, your score will not register complete.)... How do I tell Flash to know if the user has started the drag yet? HOW DO I DO THIS????? OK, I have a third QUESTION #3: If the user decides to leave the page, I want the order of the items in the column to change so if they come back to re-take the test, the items are in a different order. QUESTION #4: After the user has dragged the cursor 1 times for each statement, how do I tally up the score and record it and but not display it until they click to the next page. I want a popup message to say "You have completed the skills check, turn to the next page to see your score." after the user has dragged the curser 1 time for each statement. BUT...if the user has exited this page, come back again ,and begin dragging the cursor from the statements to the stage, then I want to rest their score and have the new score replace the old one. If they do not complete the skills check, but proceed to the next page, I don't want to record a score. If they have completed a score, I'll put a Congratulations text up and add their score. If they have not completed the score, I'll have text that says "Sorry, please complete the Skills Check on the previous page." |
![]() |
| Viewing: Dev Shed Forums > Web Design > Flash Help > Help with ClipEvents or something |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|