I'm trying to create a series of 3 invisible boxes. Essentially I want them to act like hotspots. I want the first box, when it the mouse rolls over, to reveal the second box. Then the second box will reveal the third when rolled over.
Is there a way of doing this with if, then statements instead of sending the user to a new frame?
if the boxes were movie clips, and they all had buttons in them, and when you rolled over the button, it would change the alpha of another box? are the boxes that are affected the same ones each time? if so, it should work.
Say if you had three boxes, and their instance names were boxone etc...
code:
on (rollOver){
_root.boxtwo._alpha=100
}
on (rollOut){
_root.boxtwo._alpha=0
}
I'm not sure if that's what you were after... maybe, though.
Yet, I think I was asking the wrong question. Here's an attachment of a school project that I working on. In the file, I used a code that tracks and traces the movement of the mouse. If the user "draws" in the center of the field the title "{{{Commercial Wasteland}}}" becomes visible. Moreover, a hidden button is placed on far right bracket. This button leads to the next scene. While this was a simple solution to get to the next scene, I want to make it more rewarding for the user. What I would prefer is the next scene would load after the user uncovers most of the title. I thought that the most simpliest approach would be using several boxes throughout the field. And if the mouse rolls over and activates all the boxes, then it would lead to the next scene.
So any suggestions? Hopefully this didn't sound to confusing. I tried but I still don't have a handle on script writing. I hope someone can help. Thanks.
i posted the swf for you and others to see: commercial_v2
there are 6 movieclips set to act like buttons on the stage. they are initiated with a variable beenhit==false;
if they haven't been hit, they show a rollover, set their beenhit value to true(to prevent another rollover) and they update a counter variable called buttonhit in the main timeline which keeps track of how many buttons have been activated. you can rollover the buttons in any order. also you can shrink them or make them invisible as you like.
here is the rundown of the code:
onClipEvent (load) {
this.beenhit = false;
}
on (rollOver) {
if (this.beenhit == false) {
trace("you hit me");
gotoAndStop("highlight");
_root.buttonhit++;
this.beenhit=true;
}
}
on (rollOut) {
if (_root.buttonhit == 6) {
// goto next scene or load movie or something
_root.youfoundit._visible = true;
}
}
if you add more buttons you must change the line:
_root.buttonhit == 6
to represent the number of buttons you have. this could be done in one step with a function, but i didn't want to make it confusing.
as a side note: i give you a lot of credit for your creativity. as a small warning it took me awhile to figure out how your movie is supposed to work. you may want to give your users some hints.
good luck with the project.
i'll check back in the morning to see if you need any more help.
thank you thank you thank you thank you thank you thank you thank you thank you thank you thank you thank you thank you thank you thank you thank you thank you thank you thank you thank you thank you thank you