• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Link to URL losing me.

New Here ,
Feb 04, 2009 Feb 04, 2009

Copy link to clipboard

Copied

Good morning. I am in a pickle. I've only piddled in Flash and am a complete noob to Actionscripting.

Basically, we no longer have a Flash designer on-site and it's not in the budget to freelance the banner we need.

I've created a simple banner. When you roll over the banner a layer appears that details the banner further. When you click on the banner we want to open a web page (URL) in the same window. Sounds simple or so I thought. sigh.

I've basically made the roll-over layer a symbol and have applied the action script to that layer. However when I click on the SWF in the browser it will not load that new page. Flash application shows no errors in the script. (see script below.)

quote:

button1.addEventListener(MouseEvent.CLICK, onMouseClick); function onMouseClick(e:MouseEvent):void { var request:URLRequest = new URLRequest("xxxxx"); }


(obviously I have the proper URL in my actionscript, not just xxxx)
I'm sure it's pathetically simple. However this is escaping me how to make this work.

Thanks.
TOPICS
ActionScript

Views

277

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 04, 2009 Feb 04, 2009

Copy link to clipboard

Copied

LATEST
Doing this:

button1.addEventListener(MouseEvent.CLICK, onMouseClick); function onMouseClick(e:MouseEvent):void { var request:URLRequest = new URLRequest("xxxxx"); }

only sets up the request variable with what it needs to know. To actually go there, do this instead:

button1.addEventListener(MouseEvent.CLICK, onMouseClick); function onMouseClick(e:MouseEvent):void { var request:URLRequest = new URLRequest("xxxxx"); navigateToURL(request,"_self")}

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines