Results 1 to 6 of 6

Thread: Tooltip with .SWF inside?

  1. #1
    Join Date
    Feb 2008
    Posts
    3
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default Tooltip with .SWF inside?

    1) Script Title: Image w/ description tooltip

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...agetooltip.htm

    3) Describe problem:

    I am wondering if it is possible to have a small .swf (Flash animation) inside a tooltip? Ideally it would start playing when a hotspot is rolled over and the tooltip appears, but it would also be fine if it actually started 'playing' when page loaded then it only became visible when the tooltip is active. Just a small, probably looping .swf.

    Anyone know if this is possible, and if so, how I'd go about it? Thank you in advance, I am very grateful for any help.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    You can probably do that. I just tried this:

    Code:
    messages[0] = new Array('images/dot-com-btn.gif','<object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/bnsF5lIqw1s"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/bnsF5lIqw1s" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object>',"#FFFFFF");
    And it showed the swf onmouseover of the link for that message item (after it loaded, and I couldn't play it because it disappeared when I moved my mouse over the tip). This is a byte heavy video swf from YouTube, if you have a small lightweight one that requires no user interaction, it could work out. Sound (if included in your swf) would be the biggest problem, because some, if not all browsers would continue to play the sound even when the swf disappears.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. The Following User Says Thank You to jscheuer1 For This Useful Post:

    Xeophex (02-22-2008)

  4. #3
    Join Date
    Feb 2008
    Posts
    3
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    Ah, yeah I didn't consider sound would be an issue. Ideally I do want the small .SWF to have a little bit of audio loop.

    I had another idea: I was thinking maybe using a tooltip that drew content from an external file, then have the .SWF on its own in another page. would that still be an issue with the sound do you think?

    I tried a tooltip that does this, but my hosting doesn't support PHP and although it seemed to be just Ajax/javascript/DHTML, it wouldn't work until uploaded(which to me suggest something server-side?), and when uploaded "the requested method POST is not allowed for the URL".. I guess thats something to do with php.

    Please excuse me, my knowledge of all this is very weak. Any thoughts about this idea though? Thank you John.

  5. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    That would depend upon the browser and the code. Many AJAX routines will not work locally in IE 7. This has to do with browser security and how the code is written. If POST is not allowed, for something that requires no user input, GET may be used. Which AJAX routine are you using?

    But iframe is really the best way to deal with multimedia objects like Flash when sound is involved, as the iframe can be unloaded, just like a page, which will always stop the sound.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  6. The Following User Says Thank You to jscheuer1 For This Useful Post:

    Xeophex (02-22-2008)

  7. #5
    Join Date
    Feb 2008
    Posts
    3
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    'GET' worked, but still, I know next to nothing of AJAX.

    I think I'll try the ifame idea for the DHTML I question; "Image w/ description tooltip". I'd just put it for a new Array right? I'll try. Just curious though as to what this "'images/dot-com-btn.gif'" is?...

    Thanks again.

    EDIT: I tried it with the iframe, works fine only the audio still carrys on, just as it did when it was the .SWF on it's own. Should this be the case if it's in an iframe?
    Last edited by Xeophex; 02-22-2008 at 06:41 PM.

  8. #6
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by Xeophex View Post
    'GET' worked, but still, I know next to nothing of AJAX.

    I think I'll try the ifame idea for the DHTML I question; "Image w/ description tooltip". I'd just put it for a new Array right? I'll try. Just curious though as to what this "'images/dot-com-btn.gif'" is?...

    Thanks again.
    I'm having just a little trouble keeping up with you. From what I think you are asking, the iframe could go in the messages array yes, but if you want to unload it when the tip disappears, you will have to add some code to do that, to change its src attribute to - say, "about:blank".

    The images/dot-com-btn.gif is just an image I had in that line as the image to show with that tip (remember, this script is deigned to show an image with the tip). You should probably use a small transparent .gif instead, as otherwise some browsers may show their broken image icon when that tip comes up.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  9. The Following User Says Thank You to jscheuer1 For This Useful Post:

    Xeophex (02-23-2008)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •