-
How to create & code a function which is used ONLY once - EVER! … at first Start Up
Hi there,
I'm looking for some code where 'How to create & code a function which is used ONLY once - EVER! .... at first Start Up of AIR App.??? this I need to download the first set v1.0 of Xml base data files in an AIR Application and after that this particular function should never EVER be addressed again!
Any help would be appreciated regards aktell
-
Designer, Programmer, Musician
Well, you can use a Shared Object, to store a boolean in the users computer and each time the air app runs, it check if the variable exists and doesn't execut the function. But if you need it to be 100% ONLY ONCE run forever, then you have to use XML, FileStream or SQLITE to save the variable Server-Side.
Already mastering AS3. It was so fun. Now into Javascript and PHP and all its libraries
-
is not as simple as never calling function again!!!
-
Designer, Programmer, Musician
I came up with another idea, but i have not tested it to be sure it works.
It consists in having a text file and a .bat file (windows batch), with a long text numeric or text variable, or a combination of both, then flash will check if the textfile with that variable exists, then it will execute the function. After that, it will run the .bat file, and the .bat file will remove/delete the textfile, so when the air aplication is run again, as it will not find the textfile or the variable, the function won't be faired again.
Already mastering AS3. It was so fun. Now into Javascript and PHP and all its libraries
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|