Hi all.
Quick question. I have the following code on frame one of my flash lite 2.0 (as 2.0) movie:
On frame 1:
import test;
t = new test()
testtb.text = t.returnPageTitle(“Page 1”)
and this is my external as file:
test.as (external)
class test
{
function test()
{
//force full screen
fscommand2(“fullscreen”, true);
}
//populate page title of any page
public function returnPageTitle(pagetitle:String):String
{
return(pagetitle);
}
}
When i run it in Device Central, it works fine. The textbox ‘testtb’ gets populated with “Page 1”. However, if i just double click the .swf on my desktop the contents of ‘testtb’ is ‘undefined’.
Now, if i remove the fscommand2 line from my constructor, it works fine in device central AND when i run the .swf from my desktop.
I’m using the constructor to set a few fscommand2’s. I ideally want to create apps that can run from a web browser and on a mobile device. So other than removing the fscommand2 lines and including them in each .swf separately, is there any way around this? Is the constructor the right place to put these commands anyhow?
Thanks.