Flash 横幅中的下拉列表

发布于 2024-10-02 12:46:35 字数 445 浏览 1 评论 0原文

我正在制作一个 Flash 横幅广告,其中包含美国各州的下拉列表。单击列表后,我想将状态代码传递到广告网址的末尾。

我以前对 ActionScript 没问题,但那是几年前的事了,我想知道是否可以让广告从父 获取 URL,然后只添加状态代码到它上面。我认为这就是 clickTags 的工作原理?

on (release) {
  if (clickTAG.substr(0,5) == "http:") {
    getURL(clickTAG, "_top");
  }
} 

任何人都可以提供有关如何最好地做到这一点的任何提示吗?我可以很好地构建实际的广告,只是我不确定是否需要将 50 个网址硬编码到我的下拉列表中?这似乎是一种糟糕的做事方式,我确信有更好的方法吗?

非常感谢。

I am building a flash banner ad that contains a dropdown list of US states. Once the list is clicked I want to pass the state code onto the end of the url for the ad.

I used to be ok with actionscript but it was several years ago, and I'm wondering if its possible to have the ad grab the URL from the parent <a href> and just tack the state code onto it. I assume this is how clickTags work?

on (release) {
  if (clickTAG.substr(0,5) == "http:") {
    getURL(clickTAG, "_top");
  }
} 

Can anyone offer any tips on how best to do this? I'm fine with building the actual ad, its just I'm not sure if I need to hard code 50 urls into my dropdown? It seems a bad way of doing things, and I'm sure theres a better way?

Many thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

假扮的天使 2024-10-09 12:46:35

clickTAG 是一个字符串,它是作为参数放入嵌入代码中的 URL,也是要点击的 URL。

因为它只是一个字符串,所以您可以通过编程方式向其中添加所需的任何内容。

我会这样做:

假设您想在 URL 末尾添加参数,如 ?state=NY

on (release) {
  if (clickTAG.substr(0,5) == "http:") {
     var url:String;
     url = clickTAG + dropDownMenu.getCurrentStateCode() // I'm not sure how your drop down works, so this last part is just pseudocode.

  getURL(url, "_top");
  }
} 

clickTAG is a string which is the URL that has been put as a parameter in the embed code, and is the URL to click through to.

Since, it's just a string, you can add whatever you need to it programmatically.

I would do it this way:

Say you want to add argument to the end of the URL like ?state=NY

on (release) {
  if (clickTAG.substr(0,5) == "http:") {
     var url:String;
     url = clickTAG + dropDownMenu.getCurrentStateCode() // I'm not sure how your drop down works, so this last part is just pseudocode.

  getURL(url, "_top");
  }
} 
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文