Hello-
I am working on a Flash project that involves an intro movie, which - when
done - leads to a "decision" screen where the user chooses what kind of
"visitor" they are. In other words, an intro movie will play and then lead to a
screen with three choices: "I am this", "I am this", or "I am this".
No matter what they choose, the area and graphics they are taken to is the
same (a flash map with rollover content pop-ups). But, based on what kind of
user they selected in the previous screen, the content will vary slightly on
this map. I could just have three scenes for the three different users using
the same graphics and map (but with different content in each), but that seems
to be a waste. Is there a way to have the Flash map appear with the correct
content based on the user decision from the previous screen?
An example would be this:
User A watches the intro movie and decides they are "Visitor A". They click on
that button and are taken to the Flash map with their customized content
(hopefully loaded via XML). User B watches the same intro movie, but this time
chooses "User B". They are taken to the same map and area (within the same
scene or clip), but contains slightly different content.
Any help would be much appreciated. Thanks!
kglad - 27 Mar 2008 20:14 GMT
you can use an if-else statement to determine which xml file to load and design 3 xml files for the 3 user types.
72dolphins - 27 Mar 2008 20:36 GMT
This sounds perfect... But, I simply don't know how to code such a thing. Could anyone offer help with the script or point me to a tutorial?
Thanks again.
kglad - 29 Mar 2008 09:39 GMT
if(userType=="a"){
parseXML("userA.xml");
} else if(userType=="b"){
parseXML("userB.xml");
} else {
parseXML("userC.xml");
}
function parseXML(URL) {
pXML = new XML();
pXML.ignoreWhite = true;
pXML.onLoad = function(success) {
if (success) {
// parse it
}
};
pXML.load(URL);
}
72dolphins - 29 Mar 2008 10:59 GMT
Works perfectly... Thanks so much!
kglad - 31 Mar 2008 23:33 GMT