i want to be able to pass a parameter from my webpage into flash and i couldnt get it to work so i decided to put the parameter inside flash to start with to see if was a problem on my end and it still didn’t work. can somebody please tell me what i am doing wrong and where this code should go.
By the way, the correct sintax would be:
[AS]set(“hello”, 1);
// you don’t need the set action though
// hello = 1; would do
if (hello == 1) {
gotoAndPlay(104);
}[/AS]
yeah ive put it in a white movieclip hidden in the bottom right of my movie. what i want to do is have it so that once a person has already been to my site they can automatically skip the intro without having to click skip intro again.
using a shared object would be good except i cant even get the frame to skip to frame 104 in the first place. i got rid of the parameter and it still doesn’t work, what am i doing wrong???
sorry Yeldarb but your advice didn’t help either, what do i put where you have said whateveryouwanttogoto104. do i write scene1 or something else there?
[AS]var visitRecord_so = SharedObject.getLocal(“visitRecord”);
if (visitRecord_so.data.visited) {
this.gotoAndPlay(104);
} else {
visitRecord_so.data.visited = true;
visitRecord_so.flush();
}[/AS]
Just put that code on the Frame actions… :sigh:
Hmmm technically i dont think my code is wrong… since i didnt use the flush method, Flash will only write the shared object to a file when the browser is closed.
And i think that will work for him, since he wants the code for detecting previous visits.
Am i right?
:-\
kax and claudio, both of your scripts work when i do preview in the macromedia MX flash player, however when i preview it in my browser the scripts do not work, do u know if there is anyway in which i can fix this.
Hi,
I’m smiddy’s supervisor.
Smiddy would like to know how to execute code at the beginning of loading the flash movieclip.
We’ve tried putting the code:
this.gotoAndPlay(104);
in the Actions for Frame 1 of Layer Name skip intro area.
However this doesn’t seem to run.
We are not concerned with the cookie, or anything else as we will pass this in via a querystring eg ?gotopage=104 or similar, we just want the code to execute as soon as it loads.
Any ideas?
Thanks,
Smiddy2
I dont get it… if you want to check if the user has visit your site before, use the previous code me and kax provided.
Both works fine on browser.
:sigh: