Forums
This topic is locked
Flash Pro 8 - external (local) data
27 Mar 2009 20:44:05 Jay Lane posted:
Greetings,This is my first post on this forum.
BACKGROUND INFO
I'm fairly new to flash action script but have a reasonable working knowledge of the flash environment .
Presently I'm building an interactive CD-ROM based presentation for stand alone individual machines. I'm using AutoPlay Media Studio 7 to package a flash movie along with a licensed adobe reader and adobe flash player. One of the buttons on the autoplay package will install and create folders and files on a local machine.
END BACKGROUND INFO
Here is a link to a file I've knocked together in 10 minutes just as an example for any of you Flash gurus to look at. www.nottingham-dj.co.uk/flash/btn_logic2-3.fla
What I'd like to do, is to be able to use a file (perhaps XML?) that the flash movie can reference and make changes to. If this is possible then such file would be included in the AutoPlay package (see background info above) and installed on the local machine.
Security is an extremely low key issue here and the username password is simply a means for flash to lookup and recognise an existing user (if there is one) and set the states of some variables.
Why? - The project is like an interactive training manual with questions and animated examples split into 8 modules. I would like to be able to provide users a means with the of not having to review previous modules by logging in at the login frame.
This is my humble attempt at some pseudo logic.
Assigned to 'signInUser' button on (release) { if (user_name == storedUserName) { if (pass_word == storedPassword) { module1 = storedXmlFileMod1value; // true or false module2 = storedXmlFileMod2value; // true or false module3 = storedXmlFileMod3value; // true or false module4 = storedXmlFileMod1value; // true or false module5 = storedXmlFileMod2value; // true or false module6 = storedXmlFileMod3value; // true or false module7 = storedXmlFileMod1value; // true or false module8 = storedModXmlFile2value; // true or false } gotoAndStop ("content"); } else { gotoAndStop ("content"); } } // At the end of each module there is an 'end' button. // When this is clicked is it possible to write an update // to the XML file changing the value of the corresponding // module variable? assigned to 'end' button - pseudo code on (release) { mod1 = true; storedXmlFileMod1value = mod1; gotoAndStop ("content"); }
I'm sure this must be snap to many of you, but to me its a little beyond my current knowledge.
Help and advice would be fantastic,
many thanks