Pages: [1]
  Print  
Author Topic: Simple link to a pdf  (Read 222 times)
wrkwrk
Gaia Novice
*
Posts: 6


« on: September 04, 2011, 01:21:00 PM »

I tried this but it comes up with errors

my_btn.addEventListener(MouseEvent.CLICK, onClick);
function onClick(e:MouseEvent):void{
navigateToURL(new URLRequest("http://www.test.com/pd.pdf"), "_blank");
}

This is probably an easy one for you experts Smiley
Logged
codeKnow
Gaia Expert
****
Posts: 319


codeknow
WWW
« Reply #1 on: September 04, 2011, 05:03:42 PM »

what is the error? post the trace out and it would better help give you some direction.....
Logged
wrkwrk
Gaia Novice
*
Posts: 6


« Reply #2 on: September 05, 2011, 12:54:00 AM »

Im putting my code in override public function transitionIn():void
 

1180: Call to a possibly undefined method navigateToURL.       navigateToURL(new URLRequest("http://www.test.com/pd.pdf"), "_blank");
1180: Call to a possibly undefined method URLRequest.        navigateToURL(new URLRequest("http://www.test.com/pd.pdf"), "_blank");
Logged
Nemo
Moderator
Gaia Addict
*****
Posts: 594


Freelancer for hire


WWW
« Reply #3 on: September 05, 2011, 02:15:34 AM »

You have to import that methods.
import flash.net.URLRequest;
import flash.net.navigateToURL;
Logged

!
wrkwrk
Gaia Novice
*
Posts: 6


« Reply #4 on: September 05, 2011, 06:11:28 AM »

hah fantastic it works now, the only issue is it doesnt change pointer to hand like this

It just stays like this
Logged
Nemo
Moderator
Gaia Addict
*****
Posts: 594


Freelancer for hire


WWW
« Reply #5 on: September 05, 2011, 06:17:02 AM »

my_btn.buttonMode  =true;
Logged

!
Pages: [1]
  Print  
 
Jump to:  

TinyPortal v1.0 beta 4 © Bloc