|
-
[F8] Please help I am baffled by actionscript
Hi all,
You may have read my other post in the Flash 8 section about the menu system with 3 bubbles - this is linked with that same bit of work i'm working on at the mo. I will explain - and i appreciate any help I can get right now as I am officially out of ideas other than to do my work a totally different way!
I have 3 bubbles - menu items. Each one enlarges in size when you roll over it, and when you do so, the other two reduce in size and their alpha changes to 50%. When you roll out, the bubbles all return to normal size. This is fine, but because of the way it is scripted, if you move through the bubbles in sequence (top one, then the next one, then the next) it doesnt look right because it is doing what i have scripted it to do - resize to normal when you roll out and reduce to smaller size when you roll over the next bubble. I hope that makes sense! So basically it's doing what it is being told to do - when you dont mouse over in sequence! In other words there is a flaw in the code in this situation.
Example: (i hope this makes things clearer)
When you mouse over bubble 1, it increases in size, bubbles 2 and 3 become smaller. You then mouse over directly to bubble 2, which increases to a bigger size (not normal size), bubble 1 reduces, bubble 3 gets bigger and smaller again!
I have tried to find a way of setting conditions so that the bubbles understand when they should resize and when they should stay small, but I have had no luck, I am so confused.
Here is my entire code, which is on an actions layer in the movie clip called bubbles_movie, which contains the 3 bubbles and their invisible buttons (ends with _inv). The commented IF statements are what i tried to use as a solution. The bubbles are movie clips which are all animated individually to start normal, get bigger, resize, get smaller and resize to normal again, and there are stop actions on these frames (these are the frame numbers i refer to in the script).
Code:
stop();
download_inv.onRollOver = function() {
_root.bubbles_movie.download_btn.gotoAndPlay(2);
_root.bubbles_movie.register_btn.gotoAndPlay(16);
_root.bubbles_movie.login_btn.gotoAndPlay(16);
download_btn.swapDepths(1);
register_btn.swapDepths(0);
login_btn.swapDepths(0);
trace("download rollover")
}
download_inv.onRollOut = function() {
_root.bubbles_movie.download_btn.gotoAndPlay(9);
_root.bubbles_movie.register_btn.gotoAndPlay(23);
_root.bubbles_movie.login_btn.gotoAndPlay(23);
download_btn.swapDepths(0);
trace("download rollout")
/*if (_root.bubbles_movie.register_btn._currentFrame==22) {
_root.bubbles_movie.login_btn.stop();
trace("login is still small")
}*/
}
register_inv.onRollOver = function() {
_root.bubbles_movie.register_btn.gotoAndPlay(2);
_root.bubbles_movie.download_btn.gotoAndPlay(16);
_root.bubbles_movie.login_btn.gotoAndPlay(16);
register_btn.swapDepths(1);
login_btn.swapDepths(0);
download_btn.swapDepths(0);
trace("register rollover")
}
register_inv.onRollOut = function() {
_root.bubbles_movie.register_btn.gotoAndPlay(9);
_root.bubbles_movie.download_btn.gotoAndPlay(23);
_root.bubbles_movie.login_btn.gotoAndPlay(23);
trace("register rollout")
}
login_inv.onRollOver = function() {
_root.bubbles_movie.login_btn.gotoAndPlay(2);
_root.bubbles_movie.download_btn.gotoAndPlay(16);
_root.bubbles_movie.register_btn.gotoAndPlay(16);
login_btn.swapDepths(1);
register_btn.swapDepths(0);
trace("login rollover")
}
login_inv.onRollOut = function() {
_root.bubbles_movie.login_btn.gotoAndPlay(9);
_root.bubbles_movie.download_btn.gotoAndPlay(23);
_root.bubbles_movie.register_btn.gotoAndPlay(23);
trace("login rollout")
}
I'm sorry that I cant upload any example files etc so i understand if this is all a bit confusing. I think I am on the right lines but I cant quite work it out. I hope there is a solution for it. I know that the bubbles need to do the following (using one case as an example):
if (moving mouse from download button to register button) {
login button must not change size
}
I hope someone can help as I am so stuck!
Thanks in advance
Theo
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|