Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Adobe AIR Development

Reply
Contributor
Posts: 33
Registered: ‎01-15-2011
My Device: Not Specified

Re: Hyperlink in AlertDialog

Really?!

 

I have an event handler for the button. When it's clicked, this is what is run:

 

 

var file : File = File.applicationDirectory.resolvePath( "info.html" );
			if(file.exists)
				trace("exists");
			navigateToURL( new URLRequest("file://" + file.nativePath ));

 

 

It tells me that the the file does indeed exist. But when the button is clicked, the browser doesn't open up...nothing happens! I cannot figure this out for the life of me!!

Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: Hyperlink in AlertDialog

For testing purposes, try:

var file : File = File.applicationDirectory.resolvePath( "info.html" );
if(file.exists)
trace("exists");
navigateToURL( new URLRequest("http://www.google.com"), "_blank" );

 

Dont forget about the window id (_blank).

Contributor
Posts: 33
Registered: ‎01-15-2011
My Device: Not Specified

Re: Hyperlink in AlertDialog

 

var file : File = File.applicationDirectory.resolvePath( 'info.html' );
			if(file.exists)
				trace("exists");
			navigateToURL( new URLRequest('http://www.google.com' ));

 

works like a charm, with and without "_blank". However, as soon as I put the file in there...nothing happens...

 

Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: Hyperlink in AlertDialog

Wish I had something I could test on the simulator.  Try:

 

"file://./info.html"
"file://app/index.html"
"./info.html"
"app/info.html"

 

 

If this does not work, then either it is a bug or someone wiser (and sample app in the simulator), can figure this one out.  It is probably "Oh, **beep***.  Yeah that makes sense".  But after 14 hours of coding, my brain is cooked.

Contributor
Posts: 33
Registered: ‎01-15-2011
My Device: Not Specified

Re: Hyperlink in AlertDialog

No luck Smiley Sad