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. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Adobe AIR Development

Reply
Contributor
shevbg
Posts: 33
Registered: ‎01-15-2011

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!!

Please use plain text.
Developer
jtegen
Posts: 6,145
Registered: ‎10-27-2010
My Carrier: AT&T

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).

Please use plain text.
Contributor
shevbg
Posts: 33
Registered: ‎01-15-2011

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...

 

Please use plain text.
Developer
jtegen
Posts: 6,145
Registered: ‎10-27-2010
My Carrier: AT&T

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.

Please use plain text.
Contributor
shevbg
Posts: 33
Registered: ‎01-15-2011

Re: Hyperlink in AlertDialog

No luck :smileysad:

Please use plain text.