DarkHavn Posted September 25, 2006 Share Posted September 25, 2006 I'm just wondering, is it possible with javascript to write a function, call the functionflashexec() or whatnot, so when someone 'onmouseover' over an image, a flash movie is called, and the position of the flash movie is depended on the x & y value of the mouse?Just curious about this, any help? Quote Link to comment Share on other sites More sharing options...
FrOzeN Posted September 25, 2006 Share Posted September 25, 2006 Yes.Example:[quote][size=9pt][font=Courier New]<html><head> <title>page title</title> <sc[b][/b]ript type="text/javascript"> function example($number) { alert("The number is " + $number + "."); } </script></head><body><img src="some_image.jpg" alt="Some Image" onMouseOver="javascript:example('10');" /></body></html>[/font][/size][/quote] Quote Link to comment Share on other sites More sharing options...
DarkHavn Posted September 25, 2006 Author Share Posted September 25, 2006 So it is possible,I've been searching for hours with no results,so when someone 'onmouseover' (mouseovers) the image, a flash movie can be called to the current browser without window.open?Do you have any links to tutorials? Ive been trying to find some information about this for about three hours :S Quote Link to comment Share on other sites More sharing options...
FrOzeN Posted September 25, 2006 Share Posted September 25, 2006 Yeah,There's a few different ways you can call the flash movie depending on where you want it to show (page, frame, new [popup] window):document.window.location.href = "flash_move_location.swf";-or-frames['name_of_frame'].location.href = "flash_move_location.swf";-or-document.window.open ("flash_move_location.swf", "mywindow", width="500", height="500");([url=http://www.devguru.com/Technologies/ecmaScript/quickref/win_open.html]Reference how to use the window.open() function.[/url])I've only just started JavaScript recently, and basing my knowledge off what I've seen done before, and googling for certain functions. The best place to start is at [url=http://www.w3schools.com/js/default.asp]w3schools[/url], then I find searching for something in [url=http://en.wikipedia.org/wiki/JavaScript]wiki[/url] to get a basic knowledge of what it is, and at the bottom of the page (in wiki) it contains external links with some tutorials which are generally very good. :) Quote Link to comment Share on other sites More sharing options...
DarkHavn Posted September 25, 2006 Author Share Posted September 25, 2006 hrmm ok, i don't think frames would work with my idea, as my idea is based around a search that results in images.Apon mouseover of each image a small flash movie should pop up near the image it's self (the flash movie localtion would be set depending on the x and y axis of the cursor of the user)this would give a small description, on mouseout would stop the flash movie and take it away from the page.Apon clicking either the flash movie will apparent or the image you would go into further page with a more detailed description.Have everything down pack, but by the sounds of things my idea of this with javascript may come to an end? Quote Link to comment Share on other sites More sharing options...
FrOzeN Posted September 25, 2006 Share Posted September 25, 2006 No, your idea of this is perfectly feasible with javascript. Though, personally, depending on the size of your flash movies, and what they are, it may not be the best idea to have them running on a mouseover, maybe just a small screenshot and then they'll play when viewed (clicked on).This would be done with a combination of HTML/CSS/JavaScript (thus, DHTML). Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.