Thank you for visiting the BlackBerry Support Community Forums.
BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)
BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.
"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."
- Kevin Michaluk, Founder, CrackBerry.com
Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.
03-11-2011 02:40 PM
What I'm having trouble with is the path.
I have tried
navigateToURL(new URLRequest("file:// " + File.applicationStorageDirectory.nativePath + "rules.html"));
I have tried adding extra slashes, I've also tried File.applicationDirectory.nativePath, but nothing seems to work, even after I went through all the relevant threads.
03-11-2011 03:00 PM
did not work either I have the .html file in the bin-debug folder, src folder, and the main project folder just in case. But it still not working! arggg!
03-11-2011 03:11 PM
I simply have the .html file residing in those directories, just as all my other files (such as images) that I use in the game. Do I have to somehow explicitly add it to the .bar file? Excuse my ignorance, I am fairly new to this.
03-11-2011 03:19 PM - edited 03-11-2011 03:19 PM
The application storage directory is a runtime directory for the app. So either you need to create the file in the application and saved it there, or during initial run, you moved it there. The runtime environment has no knowledge of a /src directory.
Go to the application storage directory and copy the rules.html in there to get the UI to work (getting the URL correct). If that works, then you will need to package the file up as part of the BAR file to the simulator. Then change the code to look for the file in the application directory (instead of the application storage directory). Believe "file://app/rules.html" will work. You can probably use the File native path to the application directory to work as well.
I believe the "app" directory while in FB is the bin-debug directory.
03-11-2011 03:53 PM
Thank you John, that makes sense. How exactly do I accomplish that, however?
This is what I have so far:
var htmlFile:File = new File("/info.html");
Now using that file object, what exactly do I do to get it into the .bar file?
03-11-2011 04:53 PM
03-11-2011 06:40 PM - edited 03-11-2011 06:46 PM
Thank you for your reply. However, I tried this, and a number of variations of this, but it still won't load the html file...frustrating