Fire Dragon Posted February 4, 2006 Share Posted February 4, 2006 I tried make character,what speaks when you bring cursor over it.I got it worked before,but now it won't work.And with all this,I have another problem.When you bring mouse over character,message appears,but as long that mouse is over character,message pops again and again.I tired handle this problem with break; ,but it won't work,or it ruined whole character's speak.What is wrong?Here is my character's code: <img src="http://i43.photobucket.com/albums/e366/kyogre_atlas/Zelda%20spritet/npc_wizard.gif"onmouseover="wizard()" style="position:absolute;top:200px;left:0px"> And here is my character's text box: <script type="text/javascript">function wizard(){alert("Blaa,blaa, blaa,blaa,blaa,blaa,blaa,blaa,blaa," + '\n' + "blaa,blaa,blaa,blaa,blaa,blaa,blaa,blaa,blaa,blaa,blaa,blaa,blaa,blaa," + '\n' + "blaa,blaa,blaa,blaa,blaa,blaa,blaa,blaa, " + '\n' + "blaa,blaa,blaa,blaa,blaa,blaa,blaa,blaa,blaa,blaa,blaa,blaa,blaa,blaa,blaa,blaa,")}</script> Link to comment Share on other sites More sharing options...
Chocolate570 Posted February 4, 2006 Share Posted February 4, 2006 It worked perfectly for me when I shortened the code to this: <head><script type="text/javascript">function wizard(){alert("Blaa,blaa, blaa,blaa,blaa,blaa,blaa,blaa,blaa,")}</script></head><img src="http://i43.photobucket.com/albums/e366/kyogre_atlas/Zelda%20spritet/npc_wizard.gif" onmouseover="wizard()"> By the way, I only removed the extra style attributes for aesthetic purposes. Link to comment Share on other sites More sharing options...
Fire Dragon Posted February 5, 2006 Author Share Posted February 5, 2006 Yes,it worked now with me too,but how prevent it to pop same message many times?Because,as long when cursor is over picture it creates new and new and new message.And when you press OK,you got same message again.What I should to do? Link to comment Share on other sites More sharing options...
Chocolate570 Posted February 6, 2006 Share Posted February 6, 2006 It didn't happen to me. I'm sorry I can't help, but the problem just isn't occuring on my computer. :S Link to comment Share on other sites More sharing options...
scott100 Posted February 6, 2006 Share Posted February 6, 2006 Chocolate570's example worked fine for me An alternative to an alert box could be a floating divcreate a floating div that appears when the mouse is over the character (onmousemove) and disappears when you move off the character (onmouseout), the message can go inside the div. Link to comment Share on other sites More sharing options...
Fire Dragon Posted February 6, 2006 Author Share Posted February 6, 2006 I noticed,that it happens only when used Fire Fox.With Opera,it works fine. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now