ActionScript 2.0 :: Page Counter Into Flash?
May 27, 2007Can I have a counter in flash? I don't know if it's possible in ActionScript. What about a Javascript version?
View 1 RepliesCan I have a counter in flash? I don't know if it's possible in ActionScript. What about a Javascript version?
View 1 RepliesI have followed the tutorial on creating a live page counter in flash and somehow run into a problem to which i don't seem to be finding the solution. Perhaps someone here might be able to offer his/her generous help in solving this issue. Problem: The page counter works just fine the first time i load the page. After doing a refresh using the Ctrl & F5 key or just by clicking on the refresh button in my browser the count keeps going up (which as far as i understood from the tutorial is not supposed to happen).
When i do the same kind of refresh on the tutorial page the count stays unchanged though! I also downloaded the finished fla file but for some reason or other flash MX doesn't let me open it, giving me the error: "unexpected file format". Here is my code of the php file that i wrote for the counter.
[Code]...
I've a little static portal, with guides, no server side support. All of it is local content (shared hdd). I'd like to make a page hit counter to know which one is the most useful, and wich isn't used at all. I've browsed the net for a long time today, but everything contains php. Though it's rare, that the swf is not on a webserver. I think there's an easy way to do, just don't know how. So I'd like make a flash that can count how many times the page (or itself) has been loaded.
View 5 RepliesI downloaded a free fla file open source for pageflip. It uses a global function which is this:
_global.mcnt = 0; //counter (used on a page where is an animation).
So now I want to put an animation in a page and i assume that i have to call or use this function. the problem is that i don't know how.
I have a master page and a child page and have placed the javascript code inside the child page for flash movie.
The problem is the movie seems working when there is a alert on, without at least one alert msg, the code does not work, I am sure you people can solve, I can see that the following code works well in both Mozilla and IE, but only if the alert is ON, if I put it off, then the code does not work. Can anybody tell me what is the workaround :
[Code]...
I've got a PHP counter for my website that I'd like to somehow incorporate onto my flash gallery so that it counts hits from that as well.
View 3 RepliesIs there a way to put a hit counter into a flash video? Or is that something that would need to go into the HTML file? Also I need it to be invisible, but be able to check it somehow.
View 1 RepliesI want a counter in flash so I can know how my website is visited.
View 4 Repliesi'm trying to build a flash site and ran into a problem... i have a gallery page with a bunch of page numbers at the top. when you click on one, a movieclip loads of some images coming in.so the problem i'm having is that i made a little animation for when you roll the mouse over the page number (they scale up when the mouse is over, scale back when the cursor moves away)... what it's doing is when you roll over, it goes to a certain frame in the timeline and plays that animation.that's all working cool, but i need it to not do that once it's clicked on. so basically when you actually click on a page number, the over script should stop until you go to another page... here's the code i've written,
function over(event:MouseEvent):void {
this.gotoAndPlay(30);}
function out(event:MouseEvent):void {[code].....
How do I use the counter to trigger sprites? Need an example or idea to work from. I want the number values to load sprites. The value of the counter goes to a text field. I want each number value to have an "if" condition to play a sprite of a corresponding number.
[Code]...
My scrolling counter is not displaying 1-9...only zeros every ten intervals. It plays, but the code is unfinished at line 37 in NumbersView.as. Notice Tweener is used to display the sprites. How do I finish this?
[Code]...
I have been trying to do a scroll counter for the past 2 hours and i had no luck. Im new to actionscript 3 flash .. anyways. I am trying to create a text field that is incremented according to time elapsed, any ideas how to do this? Also does flash actionscript 3 update? is there a function that i need to put code under? (im experienced with c# -xna).
View 2 RepliesHow can you make a counter that can be used inside a flash site? (yes a counter that counts number of visitors!)
View 9 RepliesI am using flash 8 and actionscript 2.0 to build this application. I am trying to compile a page hit counter that is only activated when the timeline hits a certain position. I thought I had it with the following script. But the count would randomly get reset back to zero.
Here is the PHP script:
PHP Code:
<?php
//Reading the file
$count = file_get_contents("main_counter.txt");
//Increasing the count
$count = explode("=", $count);
Code] .....
With this attempt I used the "loadVaribales" method to communicate with the PHP and TEXT files. Here is the code in the first frame of the timeline:
Code:
this.loadVariables("counters/main_counter.txt?num="+random(999999));
Here is the code in the second frame:
Code:
this.loadVariables("counters/main_counter.php?num="+random(999999));
It works awesome for a few weeks then the count gets reset to zero. Why the contents of the text file are randomly getting deleted.
i'm trying to create a flash counter.each time the movie clip is loaded, it loads an external variable (number of seconds).so lets say the variable is:
secondsToEnd = 260;
the timer will be working until it gets to zero, then the movie clip will go to frame number 2.after a refresh of the page, the "banner" will check again for a new xml variable. creating the counter (after receiving the variable secondsToEnd) till it gets to zero.
How do I make my counter stop at zero?
I used dynamic text boxes named "day","health", ect.
the first frame's code is
Code:
function run(){
if(!ran){
health = 100;
[Code].....
I have a flash ad on my site that cycles through about about 8-10 products each with their own buy button that adds the item to the shopping cart and takes them to the shopping cart page. What I want to do is create some kind of counter or tracker that keeps track of how many times each product was clicked on. I would prefer an external file to be generated and updated per new click. Is this possible?
View 1 RepliesI am working on a project that need to countdown what is in stock.
Right Now I have the banner counting down but how do I get it to count in different intervals?
Right now I have an interval setIt = setInterval(this, "counter", 8000);
But I want it to go form 8 sec. to 1 sec. to 8 sec.
Iam trying to make a flash counter for a shooting game where each time you shoot a enemy you get 10 points. Does anyone know the code for score counting. I have made a dynamic text box with the word "Score" in it.
View 7 RepliesIt's not that noticeable at first, but my counter skips over to zero and ignores the nines. How can I get my counter to not skipping the nines?
Display Object.It's a column descending from 0-9. 'The object and the values appear correct except the skip'
my FLA
import flash.display.Sprite;
import flash.events.Event;
import flash.utils.Timer;
[Code]...
I've looked all over the web and everyone can teach you how to make a timer for your game or a countdown, but I can't seem to find out how to add time to an already counting timer. So here is my counter class:
package {
import flash.display.MovieClip;
import flash.display.Stage;
import flash.text.TextField;
import flash.events.Event;
import flash.utils.Timer;
[Code] .....
That works without any issues or problems and just keeps counting upwards at a speed of 100ms, what I want to know is how to add say 30 seconds if something happens in my game, say you kill an enemy for example.
I'd like to build a simple flash menu that tracks the clicks and counts them up (counter) to a database using asp... I've googled quite a bit but I'm unable to find anything.
View 1 RepliesIs there a way to make a hit counter in flash without anyscripting apart from ActionScript?
View 10 RepliesI am wondering how to create a basic flash counter.
As in, when something happens, I want a variable to equal 1, and then, if something else happens, I want that same variable to then be 2.
Etc .etc.
I think there is something to do with ++ , but I'm unclear about the syntax.
fix a counter on one of the flash applets he hired someone to make for him. It's AS2 and done in Flash 8.
http:[url]....
It pulls from the current time on the system clock.Essentially it's counting 4 times too slow. I am awful with even reading AS let alone trying to find the equation running this. what I need to edit in the AS to speed this up?
i've seen it before but can't find it. HOw do I make a hit counter inside of flash?
View 1 RepliesI have created a customized media player in flash:And now I want a view counter, much like youtube. The problem is, I don't want it to count only the visitors to my homepage, but also those how view the movie when it's embedded on somebody elses homepage.Is there a way to do this?I have tried searching the forum, but It's a bit problematic becasue I don't now what to search for.
View 1 RepliesI need to make a counter that will increase with 9 every second
starting point at = 1440836946
Another thing is that I need it to save the the result to view when next time.
I need the counter to count up to a set date and end on a set number. The date would be 12/31/07 and the number would be 1,000,000. Just like the current counter I would like it to reference to the users cmoputer clock.
View 5 Replieshow to make if my counter counts to 3, to go on selected frame?!
Code:
if (badScoreText.text == String("3")) {
gotoAndPlay(1);
[code].....