Newbie over his head

I didn’t experience any errors, but it might just be my methods of playing with the button. Tell me what errors you are getting and I will see if they happen to me.

I have seriously tried 6 other methods, but all of them were unsuccessful. The last method I tried was the most successful out of all of them. So it is safe to say I have exhausted my current coding “skill”, but I don’t like to give up on things, which is why I am pressing this so much.

OK this is what i’m doing, and what error are occuring.

  1. If the user moves the mouse fast from the top of the page to the bottom, via the slider it will play the “closing” animation, that is the slider going from open and sliding left to hide the text

  2. put the mouse over the gray slider, and wait until it slides half way, then move the mouse to the right, when the gray box touches the mouse it will jolt back and forth very fast, it moves even faster when you move the mouse slightly.

  • Thats it, hope you can re-create these 2 errors and find out whats causing them, the first one I can live with, but the second one occurs quite reguarly and has a major effect on the animation.

oh, I got them to work. Now I will try and fix them:)

Excellent thx! OK well im off to bed so I wont reply again tonight, im in Central timezone if you where wondering.

thx for the on-going work!!! I’ll talk to you tomorrow… until then g’night.

  • John

Ok, maybe I did it wrong again, but I think I fixed problem #2.

What I need you to do is have the rectangle in Frame 10 overlap the far Right side of the invisible button clip with the far Left side of the slide clip by a couple pixels (about 5 maybe, just click on the clip and hit the left arrow on your keyboard 5 times or so). The next step is to right click on Frame 12 of the slide animation and hit “Insert Keyframe”, you don’t have to edit the tween, it will automatically add it in the middle there. Add these actions to that frame.

this.enabled = false;

This fixed the whole problem #2 for me

As for problem #1, I don’t think I can fix that one. I would have to tween the button using AS instead of motion tweens and frankly, I am not up for figuring that out right now. Sorry:(

Don’t worry about error #1, its not much to be bothered about, I’ll just be glad to get #2 out the way… I’ll try the new code now and see what happens… (yea I know I lied about going to bed)

  • John

OK you know what, this time I did lie, I’ll make the changes tomorrow when I have a clear head! g’night

  • John

Haha, goodnight man:)

It is always best to work with a clear head.

alright it almost works, but it only plays once, after that nothing happens when the mouse goes over the button, now dont panic! I think I know why, I couldn’t figure our how to “disable the ability to select the text” - this may be my problem, if ya can tell me how to do that it’ll prob work perfectly

  • John

To disable the selection of dyanmic text, select your text box and hit CTRL+F3 to bring up the “Properties” window. In the “Properties” window you will see a little button that has an uppercase “A” and a lowercase “b”, but the “b” has a black background. Click that and your text selection will be disabled.

As for only playing once. Just make the actions in Frame 1 of the slide animation look like this.

this.enabled = true;
stop();

This should work. Of course, the button will be disabled until it fully closes, but hey, it is better than it jumping because the viewer put its mouse over it before it was done.

AND WE’RE DONE!!! lmao that was one hell of a trip… Just gimmie till tonight to get the rest of the buttons drawn up and I’ll post the fla, see what ya think. another huge thx for helping me with all this, I really appreciate the time you took!

  • John

Haha, it was no problem. It wouldn’t have taken so long if was thinkin straight in the first place. I dunno what I was trying to do with that first attempt. I am glad I got this one to work. Ok, counting back, I have tried 8 different methods over here of this type of button(the first one we tried, 6 other that I tried, and now this one). This one was the most successful.

I can’t wait to see the finished product:)

Thanks guys. I’ve just completed skimming through your posts, and have managed to pull this off myself.

I’m fairly new to Flash (understand how to make movies, but not how to do it efficiently and cleanly, and am fairly lost on ActionScript), and through the posts and the .fla files that I downloaded from lostinbeta, I was able to make my own.

I doubt I’ll pick this all up in 2 months like you, lostinbeta, but many thanks for sharing your knowledge!
:slight_smile:

No problem durandel. Actionscript isn’t as difficult as it looks. A lot of it is pretty self explanitory. You will find yourself learning it quicker when you become more used to what does what.

NEVER STOP FLASHING!=)

Havent had any time to work on it so far, but im on it now… I want some other graphix on my menu, just colored shapes, nothin special, should I make it another layer? if so where should I place it? and if not which layer should I add it to?

  • John

I usually add each seperate graphic to a new layer. It gets to be a lot of layers sometimes, but thats where grouping layers comes in handy.

To group layers as in say…you want to group all the layers that “Graphics” of your interface right click on a layer and click “Insert Folder” Then you can drag the layers you want into this folder, which is minimizable to save space. Then you can create another folder that has all your button layers. 2 folders, each minimizable, easy for if you are working on either the buttons or the interface.

HEEEEEEEEELP ahhhhh im having a **** bad day, and my menu is going downhill also… I managed to get your new script to work perfectly in a test, but when it comes to actually making my menu nothing works right, I have made several edits to your tutorial based on the changes you have made in these posts, I will post this file here, if you could pls look through it and see if I’ve made any mistakes, or if I’ve left anything out… I would really appreciate a bit of sunshine on my evening!!!

PS. had to make it a TXT file…

  • John

Hmm, can you resend me your .fla file (with the updated code) so I can see what is up?

PS: The tutorial edit looked fine to me, I will clean it up and post it later tonight.

sorry I just deleted every fla file I have made so far (all 28 of them) - it was getting so hard to tell what was a failed attempt and what was the one I was working on, so I thought i’d start fresh with the one I was going to do in a bit… if you found any errors…

Well good luck starting fresh. You shouldn’t have a problem if you create all 9 buttons with the same animation inside, just with a different image.

The only part you will have to apply to the movieclip/button is

onClipEvent (load) {
this.slideMe();
}

That will be repeated on each button

Then there will only be one frame called “Actions” and the only thing is will contain is ONE copy of this…

MovieClip.prototype.slideMe = function() {
this.onRollOver = function() {
this.gotoAndPlay(2);
};
this.onRollOut = function() {
this.gotoAndPlay(12);
};
};