Skip navigation
Currently Being Moderated

embedding link in banner ad

Nov 26, 2007 3:01 PM

I'm new to Flash and I can't believe that I can't find this issue anywhere. I have a banner ad and I'd like to make the whole ad link to a URL. How do I do this? Thanks for your help!
 
Replies
  • Currently Being Moderated
    Nov 26, 2007 6:05 PM   in reply to DebK404
    You'll need to make an invisible button and set it to go to your URL. To do this, create a new button and in the HIT frame place a keyframe and put a rectangle in it that is the same size as your banner. Leave the other states of the button blank. Then place it on the stage over your entire banner. It will look like a translucent teal rectangle. That will not show up when your banner is published. It's there as a guide.

    Give your button an instance name. For the purpose of demonstration, let's say you name it "inv_btn".

    Then create a layer called actions or as or actionscript... whatever makes sense to you.. and lock it. This is where your actionscript will go and locking it will prevent you from inadvertantly placing anything on it. Select that layer and open your actions panel. If you are using actionscript 2.0, type:

    inv_btn.onRelease = function(){
    getURL(" http://www.yourdomain.com", "_blank");
    };

    If you are using AS 3.0, let me know.
     
    |
    Mark as:
  • Currently Being Moderated
    Nov 27, 2007 5:31 PM   in reply to DebK404
    Hi there. I just copied and pasted your code and it worked for me. Is your hand cursor showing up when you mouse-over the banner? If not, make sure your button does, in fact, have an instance name.

    BTW, using CS3 does not necessarily mean that you have to use AS3. In fact, most host sites will not allow banners that have been published for anything higher than Flash Player 7... which means no AS3. If you are in control of the site that is hosting the banner, you should have nothing to worry about, however.
     
    |
    Mark as:
  • Currently Being Moderated
    Nov 28, 2007 9:52 AM   in reply to DebK404
    You're welcome! Glad it worked out. :)
     
    |
    Mark as:
  • Currently Being Moderated
    Dec 11, 2007 4:29 PM   in reply to aniebel
    Hello,

    If I have an ad served by advertisers from CJ.com, would I use this same process for adding the html/javascript that is assigned to the ad I want to display on my stage area?

    Thanks,
    iCareCommunity
     
    |
    Mark as:
  • Currently Being Moderated
    Dec 12, 2007 3:34 AM   in reply to icarecommunity
    icarecommunity, yes, you would assuming their site is set up that way. You'll need to ask them what their specs are and if they prefer you to hard-code the landing URL into the button event-handler or do they want you to use a click tag. They may ask you to use a click tag if they are returning statistics to you or your client on click-throughs.
     
    |
    Mark as:
  • Currently Being Moderated
    Dec 12, 2007 9:47 AM   in reply to aniebel
    Aniebel,

    Thank you for replying back. We recently purchased the entire CS3 suite. The learning curve is going to take awhile but that's the fun part:)

    They are sending stats back to us so we have merged this in the ActionScript 3.0 example but we are getting errors wanting the ) and the semi-colon:

    fusion_url:URLRequest = new URLRequest(""<a href=" http://www.addomain.com/jl65ar-dfdfjdlskfjsdlfjdfovdf" target="_blank" onmouseover="window.status=' http://www.addomain.com';return true;" onmouseout="window.status=' ';return true;">
    <img src=" http://www.addomain.com/jdfoasidfjksdnerjn;fkjs" alt="addomain.com border="0"/></a>"");

    function fusion(event:MouseEvent):void
    {
    navigateToURL(fusion_url, "_blank");
    }

    btn1.addEventListener(MouseEvent.CLICK, fusion);
     
    |
    Mark as:
  • Currently Being Moderated
    Dec 12, 2007 10:12 AM   in reply to icarecommunity
    Are you sure the site will accept Flash Player version 9 SWFs? Most will not accept anything higher than version 7 which means you will have to use Actionscript 2.0, not 3.0.
     
    |
    Mark as:
  • Currently Being Moderated
    Dec 12, 2007 2:18 PM   in reply to aniebel
    Thank you for that information. I will try to merge the ActionScript 2.0 with the code I have from the advertiser.

    Thanks,
    iCareCommunity
     
    |
    Mark as:
  • Currently Being Moderated
    May 26, 2009 10:29 PM   in reply to aniebel

    May i ask you a question regard " embedding link in banner ad" or do I have to open new discussion????

    thank you for helping other .

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 2, 2009 10:00 PM   in reply to DebK404

    For Actionscript 3, use NavigateToURL. If you look it up in the Flash help, you will find a example to follow.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points