SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast
    Join Date
    Oct 2004
    Location
    IL
    Posts
    39
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Make a flash banner clickable externally (not inside the flash)

    Hi,

    I have flash banners (just graphic with no url hard-coded).

    I wanted to make it work with openX ads system but it seems to be able to replace a URL only if there's already some URL hard-coded in there (and not if it's only graphic)

    At the moment i can't edit the flash (my flasher is away for 2 weeks and i have only the .swf) and i must make it work somehow meanwhile...

    How can i make it work (maybe html code banner with a param something that make the whole banner clickable with a URL - is it possible) ?

    Or some JS or other HTML code that make it possible to set a URL i want the banner will link to without editing the flash itself.

    Thanks

  2. #2
    Community Advisor silver trophy

    Join Date
    Nov 2006
    Location
    UK
    Posts
    2,547
    Mentioned
    40 Post(s)
    Tagged
    1 Thread(s)
    Create a holder swf that has 2 things - an empty movieclip e.g called my_mc, and above that an invisible button that covers the entire stage area e.g called my_button.

    The have some actionscript in the root

    Code:
    my_mc.loadMovie("my_banner_ad.swf");
    my_button.onRelease=function()
    {
      getURL(my_url,"_self");
    }
    Then pass a flashvar called my_url to the holder swf in its html embedding code.

  3. #3
    SitePoint Enthusiast
    Join Date
    Oct 2004
    Location
    IL
    Posts
    39
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks, but unfortunately I don't know flash nor have the program.

    My question was if it's possible to do it using external code or script with no flash editing..

  4. #4
    Community Advisor silver trophy

    Join Date
    Nov 2006
    Location
    UK
    Posts
    2,547
    Mentioned
    40 Post(s)
    Tagged
    1 Thread(s)
    You can't alter the swf behaviour directly by any html/javascript you could add in the page.

    If you want a purely html/javascript solution you could however overlay a tranparent png over the top of the swf and add the link to that. Read this post which contains information on how to ensure the swf plays below the png.


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
  •