Newbie over his head

OK the final error - as you know when the user rolls onto, and then off the animation too fast, the slider will not move back over the text, is there any way that you could script it so the slider is always over the text when the mouse is not present over the button, that way if the user goes over the button fast, and the slider moves off the text but does not move back over, the computer will realise the mouse is no longer on the button, and will override the first animation and move the slider back over the text?? Its kinda hard to explain, but im sure theres a simple answer somewhere in there lol…

I know there must be a way to beat this one…

hope you have some ideas!

  • John

Hmm, I would love to see it working with all the buttons. If you could send me that .fla that would be great, then I can figure out how to have it work completely. And I will also see how I can optimize your AS for faster load times.

Sorry for midleading you in my script:(

Hey ya never know, maybe one day you will be answering peoples questions. I have been coding Since around June 16th 2002, and I already know as much as I do.

I am just a mod on this forum:) . I basically just answer questions and occasionally post some of my own. I am not associated with Kirupa, in fact, I have never even met him:(

just one more thing lol!!!

OK I have just one final question (woohoo)

  • the sliding buttons (ie. the Aston Martin logo) are bitmaps I simply copied and pasted from MSPaint, now the version of my menu I sent you had the logo background in black, but I have since changed it to the same blue color as the menu, however when I view my work the quality of the blue color in my slider is very poor, you can see areas of dark blue and black, is this because of my method of pasting it from MSPaint, is there anyway to perhaps import it as a JPG or something? or any way to make the surrounding area transparent, and then fill it in with blue in Flash so the quality is highest? I mainly use Micrografx Picture Publisher for my artwork… anything in there you know of that might help - thx

  • John

Yes, this problem is because you edited it in MS Paint. You can import the .jpg image by going to File/Import. The only way for a transparent surrounding would be to save it as a .gif file (or .png file, both file types support this) with a transparent background.

I use photoshop, so this I never really had a problem with this. I don’t know what Micrographix Picture Publisher is capable of doing, so I don’t know quite how to fix your problem. I have never used that program.

Excellent it worked great, but it also made my image alot bigger? I dont know why but it doesnt matter, I can easily deal with that one lol… so all thats left is to try and figure out this mouse over problem and then she’ll be ready or the open market lol…

  • John

I am working on that last one right now as we speak:) Hopefully I can figure something out.

Ok, here is a quick fix for right now, I am going to try and improve some more, and this quick fix is still sometimes buggy if the mouse is at the farthest left side of the button, or if the you roll out when your movie is actually past frame 3, it will still keep going.

Ok, this is what I want you to do…change your “Actions” layer actions to say this…


_root.slideMc.onRollOut = function() {
	if (_root.slideMc._currentframe<=3) {
		this.gotoAndPlay(11);
	}
};

also, change the actions in Frame 2 of slideMC to say


_root.slideMc.enabled = true;

What this does is say…If the button animation isn’t past frame 3 and your mouse goes off of it, then it should go to and play the closing animation.

This is just a quick patch until I figure out a better solution.

more bad news im afraid… i updated my code and now when the user puts the mouse over the button, nothing happens, but when you take the mouse off the button it plays the rolloff part of the MC…

  • John

I AM BACK!!! My brain is functional in AS. I hope none of the other mods read this thread, because I must look like a jackarse and a half:)

I created a new method to do this, it is flawless from what I can find. I am going to write a tutorial on it. The only bad thing about it is that you will have to create a seperate button for each thing. Well, you will see when I write the tutorial.

Flawless I tell you…Flawless! Ok, so maybe there is the flaw of it “jumping” when you pass over it quick, but I think thats dealable for now. If I can find a way, you better believe I will tell you:)

woohoo!!! sounds excellent lol, I have to admit I gave up on the other one last night, but I managed to get a fair bit of HTML written up, so now I actually have a web site to test my menu on. I’ll await your tutorial and then get to business, look forward to it, thx m8!

  • John

Ok, the tutorial is finished. It isn’t very organized and my explanations might be off, but I was being severly rushed. If you have any questions you can post them and I will be glad to answer them.

I hope this tutorial helps you out though.

Yet another tutorial

Hey thx for the tutorial… and I think it worked, only one problem tho, it doesnt do the right thing (/me hides in a corner).

I think what you are making is a button that moves, to reveal text correct? this moving button can be clicked to take you to a webpage… however the effect I have been after is the opposite, I want the text to be the button, and the slider to just slide… I have a feeling we’ve been on the wrong track for quite some time here, and the solution may in fact be very simple… if thats the case im very sorry for wasting so much of your time… if you post a reply we canf ind out if we’re thinking on the same wavelength here…

  • John

I think we are on the same wavelength.

The part in there apart the invisible button, that goes behind your text to make your text a button. You apply your getURL action on that button so it works for all your different buttons.

The Invisible button behind it actually serves 2 purposes. 1) to make things easier and 2) to make this button thing work when the mouse rolls off of the button.

If you made the text a button, the mouse gets jumpy on it, so you would only have to make an invisible button behind the text anyways, that just a pain.

I forgot to write in the tutorial to open the properties window on your text an make your text type be “Dyanmic” instead of “Static”. Also to disable the ability to select the text.

I will add a link to my example when I redo it.

Ok, I did this earlier and it worked flawless. I do it again, and it doesn’t work. I am confused on that one. I did it the same exact way, and now it doesn’t work?

It seems that when I use the prototype it screws up everything. Hmmm.

I promise you I will figure this out. I am the one wasting your time, and I am sorry about that.

I’m just glad someone is helping me do all this, seeing now how complex it is there’s no way I would have been able to do this before. Your certainly not wasting my time, as without you it would have taken weeks of research…

I will also try the codeing again, perhaps I’ll get lucky with it, and once is good enough for me lol, I’ll report back with my results…

  • John

I can’t believe I am so stumped over such a basic effect. I can get it to work if the WHOLE thing is a button, but not if just the text is a button. Although I had it working earlier, I regret that I didn’t save that file because I have NO CLUE what I did different. I don’t remember doing anything different.

I am also going to keep working at this. Hopefully to come out with the perfect result, but I doubt that.

<B>EDIT: It actually works perfectly if the whole thing is a button, GRRRRRRRRRRRRRRRRRRRRRRRR. Here is a link to my example of the whole thing as a button (it opens up my site in a new window since I don’t have frames on the page)

</B>POS

Well if the worst comes to the worst it really isnt a problem if the whole thing is a button, it makes perfact sence to have both the text and the slider link to the page, although as you say, if a perfect result is possible, that would be ideal.

thx for your continued efforts on this!!!

  • John

OK im not sure how you’ve configured the script to deal with the user rolling the mouse on and off too fast, but if youve done it the way I suggested earlier I have another suggestion… it seems that if the mouse is not present (or whatever equivelant you have scripted) the computer will play from the first frame of the “rolloff” animation, I think if you made it so that it played from the second from last frame of the “rolloff” animation it wont jump about so much… this is just a suggestion and as im not sure if this is how you’ve configured it I dont know if its even relevant, but I think it could solve the final problem here…

  • John

I attached a .zip file with everything for the example that I just showed you.

well we’re nearly there with this, you said it works flawlessly on your comp? there are still a few errors as far as I can see, could it be software compatability? I dont think that makes any diff in Flash does it?

Tell me if you want a detailed description of the errors i’m seeing, the website i’m making is for a portfolo so everything has to work perfectly, however if we cant figure this out now, I’ll do some research and maybe in a few weeks we’ll have found a solution? I’m sure you’ve exhaused all your coding ideas… this last bug just seems to be a killer :frowning:

  • John