Jump to content

onmouseover question


DarkHavn

Recommended Posts

I'm just wondering, is it possible with javascript to write a function, call the function

flashexec() 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?
Link to comment
Share on other sites

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]
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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. :)
Link to comment
Share on other sites

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?
Link to comment
Share on other sites

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).
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.