evynco
February 15th, 2006, 07:15 PM
I'm on day 2 of trying to get this to work....:crying:
I followed the tutorial here and have:
count.txt (containing count=0, permissions 777)
counter.php containing....
<?php
$count = file_get_contents("count.txt");
$count = explode("=", $count);
$count[1] = $count[1]+1;
$file = fopen("count.txt", "w+");
fwrite($file, "count=".$count[1]);
?>
...in the same directory on my server.
In my Flash swf I have placed a dynamic text field called count, no Instance Name. In frame 2 of my main swf I have this.loadVariables("counter.php?num="+random(99));
When I open the page I get no count, just the error _level0.count
Did I miss something ? Does the dynamic text need to be converted to a Movie Clip ?
Thanks guys.
I followed the tutorial here and have:
count.txt (containing count=0, permissions 777)
counter.php containing....
<?php
$count = file_get_contents("count.txt");
$count = explode("=", $count);
$count[1] = $count[1]+1;
$file = fopen("count.txt", "w+");
fwrite($file, "count=".$count[1]);
?>
...in the same directory on my server.
In my Flash swf I have placed a dynamic text field called count, no Instance Name. In frame 2 of my main swf I have this.loadVariables("counter.php?num="+random(99));
When I open the page I get no count, just the error _level0.count
Did I miss something ? Does the dynamic text need to be converted to a Movie Clip ?
Thanks guys.