Flash Cache Question
Flash Cache Question
Out of context: Reply #9
- Started
- Last post
- 9 Responses
- loahn0
This code may need tweaking but its the general idea.
[first] frame action:
// create the SharedObject 'cookie'
var playCheck:SharedObject = SharedObject.getLocal("hasPlayed...
// check for any previous data stored from a previous visit
if (playCheck.data.hasPlayed != undefined && playCheck.data.hasPlayed != true) {
// this code block runs if it is the 'first-play'
// as hasPlayed cannot be found or is FALSE, the
// following line of code creates it and assignes a
// boolean of TRUE to it.
playCheck.data.hasPlayed = true;
// then write your code here for the default 'first-play' actions
} else {
// write the code that omits the default 'first-play' actions
}