Simple Counter If Flash?
hi
i need to make a counter for a flash page i don't want/need to show the counter, i just want to be able to know how many hits the page has.
I suppose i can write a php script that when called (from flash when it loads) it will write +1 in a txt file. the problem is that i don't know how to call it from flash.
can i just call loadVariablesNum("counter.php",0); and the php will not return anything to the movie, it will just write +1 in a file. Or do i have to return a garbage var?
thanks
FlashKit > Flash Help > Flash MX
Posted on: 06-20-2003, 09:47 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Simple Flash Counter?
Hi. I'm wondering how to make a simple flash counter, I've done it like 2 years ago but I've forgotten the scripts now and I haven't got the old files.
What I want is that when you press something so it dies in a movie clip, when the animation reach a certain frame I want it to tell a dynamic in the root movie to + 1 point. I think it was something with the set variable script and the text was a variable. Can someone help me?
Not So Simple Flash Php Counter
Hi all,
I've got a problem I've been trying to find an answer to for several days now. What I've got is a presentation that has numerous frames in it. Actually several presentations, all with a different number of frames. What's being asked is a way to track the number of time each individual frame, or page, is visited. The closest thing I can come up with is a simple hit counter which calls a php script and writes to a txt file. What I can't find is a way for Flash to tell a php script to update the txt file, update a specific page and close it. For example, a movie has 100 frames. So the text file would show page1=0, page2=0 and so on and so forth. When the user advances to the next frame, I need to have that text file updated each time.
Any help or suggestions would be greatly appreciated.
Jason
[MX04] Simple Counter In Flash
Hello
I am trying to set up a simple text counter on my Flash site (MX 2004).
In my FLA file I have a dynamic text box which has an instance name of dyn_txt and a variable of currentHitCount.
This is my AS (2) in full:
var currentHitCount
loadVariablesNum("counter.asp", 0, "POST");
dyn_txt.text = currentHitCount;
I do not get an AS error message, but when I click on Ctrl + Enter, I can see the word 'undefined' in my dynamic text box.
The following is my ASP file which works:
<%@ LANGUAGE="VBScript" %>
<%Option Explicit%>
<!-- #include file="./hitCounter.INC" -->
<html>
<title>Hit Counter Sample</title>
<body>
<div align="center">
<%=GetCurrentHitCount("counter", true)%> visitors
</div>
</body>
</html>
Please advise what I am doing wrong, as the dynamic text box should show a number (amount of 'hits'), but doesn't.
Thanks.
Steve
How Do I Create A Simple Flash Counter?
I 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.
??? help please?
How Do I Create A Simple Flash Counter With Code?
I 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.
??? help please?
How Do I Create A Simple Flash Counter In Code?
I 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.
??? help please?
How Do I Create A Simple Flash Counter In Code?
I 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.
??? help please?
Simple Hit Counter - To Txt?
Is there any quick and easy way to make a hit counter - maybe one that puts the results in a txt file? I don't own the server so I have no idea what is installed on it - I don't think anything like PHP.
PS. I want to thank again all the people who have helped me with so many questions I've asked already.
Simple Hit Counter?
Can you make a simple hit counter in Flash 5 without having to use databases. Can i get one in Dreamweaver?
A Simple Counter? Plz Help
Yeah, counter... A simple hit counter, to see how many poeple have visited site. I'm looking for tutorials, but cant understand them, cause there is need for the actionscripting knowledge, i dont have... Could someone plz help me a bit, maybe some advices, maybe fla, what i would really appriciate.
thank you
Does Anyone Have A Simple Counter?
I need to write a simple counter that can count the contents of a folder and give me a total so I can use an "if" to send the animation to a new frame. Im new to this stuff, but I know that I need to count eveything in the folder and the contents will always be changing.
any suggestions??
Simple Counter
Hi,
Somebody know how to creat a simple counter to know how many person come in our web site?
Thanks
Simple Hit Counter
I want to duplicate a simple hit counter in flash. I'm not concerned about the visitors being unique. I just want the number to increase by one each time the page is loaded. Anyone got an fla laying around handy for that? I'd really appreciate it.
Simple Counter--Help
Obviously I'm not a actionscript guru. I'm trying to make a simple counter script. The script should count for 10sec or so and then active a flash movie, and do so in a loop format. It's more of a loop with a 10sec delay. Does anybody have the courage to take on this task? LOL Thanks
Ryan
Simple Counter?
Hello
Somebody know how to creat a very simple counter in flash? I have ever tryed
and it don't works! Need help, thanks!
Simple Hit Counter?
Is it possible to do a hit counter in flash to display the amount of visitors that hav been to the site?
If so, any ideas how?
cheers
Simple Hit Counter
How do you make a simple counter to see how many viewers have visited your site in Flash MX??
[F8] Help With Simple Counter
Help with this simple counter i cannot get it to work!!!
I just need it to start at $0 and increase by $0.31
So it would look like this $0 - $0.31 - $0.62 - $0.93 - $1.24 and so on
and also it would do keep going when it hits $100.31 - $100.62 so forth!
I been trying for hours! Anyone can help me really fast my brain is fried!
Simple Counter
Hi,
This one again is probably simple to someone who knows what they're doing, but I can't find any tutorials or forum entries that explains the answer.
Basically I have a button on the main stage that I want to use to manipulate a numerical variable.
On the main stage I have a movieclip, and in that movieclip I have a dynamic text field that uses numbers only. It starts off with "0" in it, and I want to be able to press the button on the mainstage, and each time I press it I want it to add one to the number, so if I press it 5 times the number in the movieclip will count up through the numbers to 5, and so on.
But I can't work out how to do it. I can get it to count to one easily enough but all that does is set it to 1. I'm assuming that the "++" operator will need to be used, but am not sure how.
Below is something along the lines of what I've been playing around with (and obviously doesn't work), but I'm probably way off the mark:
button1.onRelease=function(){
clip1.text1 = ++;
}
"button1" is the name of the button and "clip1" is the name of the clip that contains the dynamic text. And "text1" is the name of the variable for that text.
Obviously this code is way off the mark, but I don't know how it goes.
Any help would be appreciated.
Simple Counter
Hi Scripters
I need some help making a counter which would act as "cosmetic" counter.
Basically I am making a waiting page which needs to look as if it is searching through search criteria. It contains an amusing swf on the left and HTML table on the right. I have set this up with my swf and a HTML table which holds a Javascript counter, but this makes my swf play really slowly. So I want to have the whole thing as an swf but cannot find an appropriate counter (and my variable and scripting skills are pretty poor).
If anyone can supply a good counter which counts upwards really quickly and continuously until the search criteria is matched I would be very grateful.
I hope this makes sense.
Any help would be great.
Thanks
Paul
Simple Counter Help
Hi everyone! I am trying to imitate the text streaming effect that www.group94.com has on their website.
I want to load the text into the dynamic text field "txtLoader" one item of the array "i" at a time, starting with the last item (.) and ending with the first item (S) so it would steam like this:
.
t.
xt.
ext.
text.
This is what I have, and it works, only backwards:
var textBlock = "text.";
i = textBlock.split("");
var countLetters = i.length;
_root.countBox.htmlText="Total letters= "+countLetters;
counter = -1;
countIt = function(){
if (counter == (countLetters-1)){
clearInterval(myCounter);
} else {
counter++;
trace(counter);
_root.txtLoader.htmlText += i[counter];
}
}
myCounter = setInterval(countIt,40);
stop();
Can someone help me out here? I am SO CLOSE but I am stuck at this point!
Simple Counter Help
Hi everyone! I am trying to imitate the text streaming effect that www.group94.com has on their website.
I want to load the text into the dynamic text field "txtLoader" one item of the array "i" at a time, starting with the last item (.) and ending with the first item (S) so it would steam like this:
.
t.
xt.
ext.
text.
This is what I have, and it works, only backwards:
var textBlock = "text.";
i = textBlock.split("");
var countLetters = i.length;
_root.countBox.htmlText="Total letters= "+countLetters;
counter = -1;
countIt = function(){
if (counter == (countLetters-1)){
clearInterval(myCounter);
} else {
counter++;
trace(counter);
_root.txtLoader.htmlText += i[counter];
}
}
myCounter = setInterval(countIt,40);
stop();
Can someone help me out here? I am SO CLOSE but I am stuck at this point!
Simple Counter
I'm trying to create a simple counter. I want it to stop on a certain frame count up to 20 seconds then continue. How is this done? I'm not sure where to start? Any help will be appreciated.
Ryan
New To ActionScript - Simple Counter
Hi everyone!
I thought I would take a stab in actionscripting and hope that someone can help.
I am creating a simple counter in which my flash movie counts from 1 to 5. Here are the details:
I have 5 layers on my Main Stage named "Number 1",
"Number 2", "Number 3", "Number 4" and "Number 5"
Each layer has a simple animation in which the number fades in and then fades out. In the first frame of each animation, I created labels named: 1, 2, 3, 4 and 5. I also have a stop action on the last frame of each animation.
I also have another layer named "Actions" (This is where I was hoping my code would work. Below is the code for my actions layer:
[ comments ] are just comments in this post. They are not in the source code of my Flash file.
Code:
myCount = 0; [This is a setVariable action with expression 0 set]
[Note: I also used var myCount = 0 and this gave me the same results]
for (myCount = 1; myCount >= 5; myCount++) { [My Loop]
if (myCount == 1) { [Checks to see if myCount is equal to 1]
gotoAndPlay ("1"); [This plays Label 1]
} else if (myCount == 2) { [Checks to see if myCount is equal to 2]
gotoAndPlay ("2"); [This plays Label 2]
} else if (myCount == 3) { [Checks to see if myCount is equal to 3]
gotoAndPlay ("3"); [This plays Label 3]
} else if (myCount == 4) { [Checks to see if myCount is equal to 4]
gotoAndPlay ("4"); [This plays Label 4]
} else if (myCount == 5) { [Checks to see if myCount is equal to 5]
gotoAndPlay ("5"); [This plays Label 5]
} else {
stop ();
}
}
When I test this, it plays the number 1 animation and then stops as it should. However, it doesn't do anything else. It is almost like the code is never being executed.
If someone could please provide a solution to this, I would be grateful.
Thank you in advance,
- Alex
Creating Simple Hit Counter
Hi Everyone. I have designed a website using Flash 5 and would like to create my own hit counter to keep track of people visiting my site. I have searched all over the web and am not able to find any tutorials on the subject. Is there any hope? Please help.
Thanks
Just A Simple Question Here About HIT COUNTER
can someone please help me to build a very simple hit counter? It does not neccessary Flash or FLash MX but just a [b]HIT COUNTER[b] that can count how many visitors viewed my page. Thanks.
CK
Simple Text Counter
I need a function/var that will allow me to (as I hold press KEYUP and KEYDOWN) increase starting with "000"..."001"..."002"
Any takers for a simple problem?
Simple Counter / Score
I am making a VERY simple quiz application that will just be movie clips with right/wrong answers. What I want to do is keep score at the root level. If the "right" button is clicked I just want to change the score from "0" to "1" and then add one to that with every "right" button click. I am having problems finding out how to do this.
Need A Simple Numeric Counter
I need to make a counter that flashes numbers sequentially, say for example "1" through "10". This won't be associated with any buttons-I just want an animation of the numbers flashing using a dynamic text box. Not having a lot of luck seeing how to do this using AS3. Any help out there?
Simple Dynamic Counter
I'm new to this, i'm wondering how to make a counter that adds by one every time you press a button.
Need To Make A Simple Counter (please Help)
I need to construct a program that will allow the
input of numbers onscreen.
The number is then stored into a chronological sequence
in a separate output box onscreen.
Box 1 will be a dynamic text box? (linked to a variable?)
Box 2 will contain the historical sequence of what
was originally inputted into box 1.
I have never attempted a project using variables and don't
understand how i link these elements together.
I appeal to any sympathetic souls for some much needed
help. my manuals are just confusing me.
thanks
Simple Page Counter?
Hi, I'm kind of new to actionscripting, and am looking for a few pointers.
I need to do two things:I need to insert a text page counter on each page of a movie (ex: Page 1 of 20) and code it so that if pages are added or removed it will update itself based on total pages in the movie.
I have movie clips that load on top of active buttons. As a result, the button below the loaded clip shows the hand cursor when you move the cursor in that space. How can I eliminate the active button state while the clip is loaded, and re-activate it when the clip is gone?
All of this is targeted at flash player 6 if that matters. Thank you for all and any help.
Simple Page Counter?
Hi, I'm kind of new to actionscripting, and am looking for a few pointers.
I need to do two things:I need to insert a text page counter on each page of a movie (ex: Page 1 of 20) and code it so that if pages are added or removed it will update itself based on total pages in the movie.
I have movie clips that load on top of active buttons. As a result, the button below the loaded clip shows the hand cursor when you move the cursor in that space. How can I eliminate the active button state while the clip is loaded, and re-activate it when the clip is gone?
All of this is targeted at flash player 6 if that matters. Thank you for all and any help.
Need Dirt Simple Hit Counter.
I know this is a topic that is beat to death but I can’t seem to find anything that is basic enough that I can understand how it works (so I can make the necessary changes or adjustments.) I need to make a quick and dirty hit counter. All I want to do is write to a txt file every time the page is loaded. In other words I would have a txt file on the server named “visitors.txt” with one line of text on the page “&visit=1” and I would have a dynamic text box in the flash page (swf) named “visit”. When ever anyone loads the page I need the “swf” page to write to the file “visitors.txt”. Specifically I need it to take the value of “visit” and add “1” to it and return the results to the text box on the flash (swf) page, and I need the value of “visit” to be changed to the new value so that every time the page is loaded the value displayed in the dynamic text box “visit” is 1 greater than the last time the page was loaded.
The problem I am having is that everything I can find on this has so many extra bells and whistles that I lack the expertise to edit it. What I need is something that does just this one thing in as few lines of code as possible.
I have been looking at the fopen approach and it looks promising but again everything I can find so far goes a lot further than I need and at present I lack the expertise to work with it.
I am just learning the php side of this and my approach is to start with the simplest possible code I can get and then from there I can expand on it as needed.
NOTE; I am using Flash MX and really am not familiar with version 4 or 3 actionscript. In other words it may as well be Greek ( I only point this out because I have found a lot of actionscript that is from earlier versions and I don’t understand it because it uses forms / methods / etc. that are not found in any of the material on Flash MX
Looking For A Pretty Simple Counter (count Up)
Hi everyone,
I'm working on a Flash animated graph that will be showing 3 bars raising gradually, but I want to show a number counting up for each bar, and that's where I need your help.
The first bar needs to show a pretty quick number count-up going from 0 to 3 (0.01 increments)
The second bar is a number that quickly goes from 0 to 450 (increments of 1)
The 3rd bar is a number that quickly goes from 0 to 200 (increments of 1)
Each of those 3 statistics have to reach their highest value almost at the same time as much as possible...
Oh and I would need to be able to choose the font and color for those, not just plain text.
I looked it up and couldn't find what I needed.
Any suggestions, tutorials, actionscripts would be very appreciated
Thanks
Getting A Simple Counter To Work In Flasf
Hello
I have an hit counter script:
<div align="center">
<%=GetCurrentHitCount("counter", true)%> visitors
</div>
which works in the browser: it shows: x visitors
I am hoping to use this same script in a Flash (MX 2004) movie. I imagine I need to show the numberof hits in a dymanic text field in my movie, but if I give my dynamic text field an instance name of, say, counter_txt, how to I pass the numeral processed in my ASP script to counter_txt and what would I need to show in my AS (2) panel?
Thanks for any help.
Steve
Simple Counter Function With Interval...Help Plz
Hello Everyone,
How can I write this counter function so the text field is updated onto the stage every second with the counter value:
PHP Code:
function counter()
{
var counter:Number = 0;
while(counter < 50)
{
_root.counter_txt.text = counter;
counter++;
clearInterval(this);
}
}
myInterval = setInterval(counter, 1000);
Currently, it only shows 49 whereas I would like to show the counter value going up from 1 to 50.
Appreciate all the help.
Thanks.
Simple Counter Freezes (doesn't Use Loops)
I have a counter that continuously runs, updating how much CO2 emissions my clients product saves throughout the year (in real time). I'm using an onClipEvent (enterFrame){ and a this.onEnterFrame = function(){ within my code, but no loops like "for" or "while". So I don't think it could be a memory leak.
The client is complaining that it stops running randomly, but I was only able to get it to stop by running in the browser for 5 hours straight.
Is there something within the browser that could cause flash to stop running without that prompt of "code is causing machine to run slowly ..do you want to continue running"?
If the browser isn't within Windows focus ..can the browser just randomly stop any plugins that are running?
ppgideascapes.com (it starts at the beginning of the year and speeds up to the current time)
Anyone Know Of A Stupid Simple Hit Counter To Just Plug Into An HTML Page?
Just running short of time and client wants a simple hit counter on the site. Mostly html with Flash inserts coming in the future. Was thinking of using a flash hit counter but I guess I could look into an html (I know...taboo) counter as well. To the point...does anyone have a simple hit counter I could use for a bit till I figure out what the customer wants? I'm not much on the PHP or any other database type stuff, so I need something that an idiot (like me) can insert and make work.
Thanks in advance for any help
[Edited by Freaky Flash Fiend on 09-13-2002 at 03:16 PM]
Hit Counter In Flash 5
Is it possible to make a flash 5 hit counter for a website? I could really use a fla to see how to do it. Also is it possible to use with just CGI?
Flash Counter?
Anyone know of a good Flash Counter and hit statistics service. I would like to get some user information on my site. I think they are available but I wanted some advice........
Thanks,
Dave B.
Hit Counter In Flash
hi there,
i am trying to make hit counter in flash.
i know its easy to make in frontpage2001 but how in flash5 or in mx. r there any tutorials avialable on this topic.
thanx
Flash Hit Counter?
Where can I get a Flash hit counter to put on my site???? I saw a couple in the movies section but I do not know anything about cgi.
Or does anyone know where to grab a free hit counter of any kind???
Any help would be great.
Ssi Counter In Flash...
hello, need some help in getting an ssi call to display in a flash movie. it uses the call
"<!--#echo var="REMOTE_ADDR"-->" to display the ip addr...can someone tell me what actionscript i need to use ?
thanks...
|