ActionScript 2.0 :: PHP Hit Counter - Adding If Statement

Jun 8, 2005

I'm working with the php hit counter here on the Kirupa site and wondered if there was a way to test the data in the txt file during the loop to determine playback of a movieclip.... in other words, when the loop starts, a variable is created storing the number in the textfile... the next time the loop repeats, the textfile is checked and matched against the variable... if the variable differs from the textfile, the variable value is changed to match the textfile, and a movieclip plays to signal that this change in the textfile has occurred.

View 8 Replies


Similar Posts:


ActionScript 3.0 :: Conditional Statement And A Counter?

Sep 1, 2009

I'm trying to make a button that if you hit it 4 times it plays a movie clip. On the 5th hit- I want it to play a different movie clip. After the 5th hit- it resets itself and the process would start all over again. The script is all in one keyframe and the movie clips are being played with functions.

playButton_btn.addEventListener(MouseEvent.CLICK, goButton1);
function goButton1(evt:MouseEvent):void{  runningMan_mc.gotoAndPlay(2);}

View 6 Replies

ActionScript 2.0 :: Adding Image Counter To Preloader

Oct 20, 2010

I have a preloader on the first frame. It works great, with no problems and it's loading images from a directory. I would like to add to it an image counter, not only the bytes that are loading.

Actionscript Code:
stop();
// array of your movieclips$
mcs = ["page_1.jpg", "page_2.jpg", "page_3.jpg", "page_4.jpg", "page_5.jpg", "page_6.jpg", "page_7.jpg", "page_8.jpg", "page_9.jpg", "page_10.jpg", "page_11.jpg", "page_12.jpg", "page_13.jpg", "page_14.jpg", "page_15.jpg", "page_16.jpg", "page_17.jpg", "page_18.jpg",  "page_19.jpg", "page_20.jpg",
[Code] .....

So, basically I would like to add another dynamic text box in which - as the images are loaded - I would like to have a counter for the images.

View 1 Replies

Flash - Adding Time To Timer / Counter

Nov 28, 2011

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.

View 2 Replies

ActionScript 2.0 :: [CS3] Date Counter - Adding A Space In-between The Numbers

Jan 21, 2009

Is it possible to add kerning (letterspacing) in-between the numbers in a date counter? For example lets say I have a date counter that counts the dates of a month (1,2,3,etc...) and I have two circles sitting side by side not overlapping. How would i go about adding a space in-between the numbers to have the number on the left in the left circle and the number on the right in the right circle? Someone mentioned using strings but how would I go about doing that? Here is the current code that I am using:

[Code]....

View 1 Replies

Professional :: Adding A 'if' Statement?

Mar 1, 2011

i have created a comment box with a scroller but i do not want scroller to scroll unless a user adds more text so therefore i will like to add a if statement on this code.

Action script 3
var dragRect:Rectangle = new Rectangle(drag.x,drag.y,0,bar.height - drag.height);drag.addEventListener(MouseEvent.MOUSE_DOWN, dragMouseDown);[code]....

View 5 Replies

ActionScript 2.0 :: Adding || To An If Statement Stops Function Working?

Dec 10, 2005

I have a movieclip with the instance name information_mc. I am trying to get this movieclip to move up and down, depending on its y co-ord or in what direction it is tweening at the moment it is clicked.I have the following AS:

Code:
information_mc._y = 240;
var curMovement:String = "goingup";

[code]......

View 2 Replies

Adding To Array / Counter / Displaying Array

Mar 28, 2009

I'm new to AS3, but our teacher thinks we're all amazing geniuses and assigned us this project which was due last class. Great, I know, I have to do it even if it's late. Only 5 students out of 28 were able to finish the assignment.[code]Those are all the assignment details he gave us.All I have so far. What I have only adds the array to the list. Nothing much else.[code]Also, when the array prints on a new line, the prior item on the array must not print as show above.

View 6 Replies

ActionScript 2.0 :: First Requirement Of The If Statement When Type In The Proper Input And Go Straight To The Else Statement

May 14, 2009

Having a few problems with what I thought was a simple if statement. Here is the code:

[Code]...

I can't quite figure out the small problem with the code. It seems to just bypass the first requirement of the if statement when I do type in the proper input and go straight to the else statement.

View 7 Replies

ActionScript 1/2 :: Execute Code In Previous If Statement If Second If Statement Is Executed?

Aug 31, 2011

if (variable == 1){
//code
//Execute this code.
} else if (variable == 2) {
//code

[Code]...
 
I dont want to copy the code from the first into the second and the first and second into the third.
 
My mind isn't working and there is probably an extremelly simple way to get this working.
 
I know I could used functions but for some reason it stops the instance referencing working: _root["bullet"+j] doesnt work in a function.

View 7 Replies

ActionScript 2.0 :: Loading Data From XMl File And Uses It To Run An If Statement. If Statement Fails?

Oct 10, 2008

The Flash movie contains 2 Text files, one Component button, and 1 component checkbox.The purpose of the application is to load an XML file(works)Populate 2 text fields with information from the XML file(works)Compare the two text fields, if they contain the same information then the checkbox, via AS is told to be selected. (Heres the problem);

Heres the code:

Code:
runCode_btn.onPress = function() {
data_xml = new XML();
data_xml.ignoreWhite = true;
data_xml.onLoad = function(success) {

[code]....

The idea behind this app is that its an electronic form. The user fills it out, the information is then sent to a newly created XML file, months later the open the XML file in flash, and Flash fills out text fields and check and or unchecks Checkboxes based on the XML data.CheckBoxes are mandatory.But I don't see how I'll be able to use them if i can't create and condition statements based on the loaded Data.

View 1 Replies

ActionScript 2.0 :: If Statement Inside If Statement Won't Work

Mar 30, 2011

why this code won't work

[Code]...

I'm sure you can put if statements inside other if statements, seriously I can't figure it out

View 4 Replies

ActionScript 3.0 :: Another 'if' Statement Inside An 'if' Statement?

Sep 22, 2010

I need to write an if statement inside an if-else statement. But no matter how I write it it keeps giving me a syntax error.The syntax error is "1083: syntax error: else is unexpected".[code]No matter how or where I place the braces, it keeps giving me errors.

View 13 Replies

ActionScript 3.0 :: Use A For Statement To Create An If Statement

Jul 12, 2010

what I'm trying to do is create an else if argument for each object in an array based on a user set number

Code:
for(var i:int=0; i < numberOfElseIfs; i++){
GENERATE AS3 CODE
}

to which I want it to GENERATE THE FOLLOWING CODE:

Code:
}else if(baskets[i].used == false){
baskets[i].used = true;
drawButton(i);
}

the problem is obviously that the compiler reads this code rather than understanding I'm trying to regenerate the code within the for loop...does that make sense :S? So basically I need as3 to read the code between the for statement as if it is going to echo that out later. Is this even possible?

View 4 Replies

ActionScript 3.0 :: Write Another "if Statement" Inside Another If-else Statement?

Sep 22, 2010

I have a script which is giving me a lot of trouble since I have no idea how to write another "if statement" inside another if-else statement. I keep getting errors, I guess I don't know where to put the braces exactly...

example:
if(bla == bla) {
<------------how would I write another if statement here?
}else if (bla == bla){
}

View 3 Replies

ActionScript 2.0 :: CS3 MP3 Play Counter?

Jul 7, 2009

I have a AS2 mp3 player that i need to adapt to count the number of times the track is played over the web.I'm not sure how to do it, or what to research, as i have not done this sort of thing before? I just need to return a count variable from flash to some sort of back end document/file that is not displayed!

View 2 Replies

Score Counter That Follows Player?

Oct 13, 2009

so I've made a working score counter and all that working fine, but I cant find a way to make it follow the camera/player without glitching up.

View 1 Replies

Add PHP Counter To My Flash Gallery?

Oct 18, 2009

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 Replies

Make Counter Count Up?

Feb 16, 2012

I would like to make an .exe file that shows a starting number (that I would designate in the code), and then every 30 seconds, it adds 1 to that number. So for example, the exe begins by showing "11,057" on the screen, and then 30 seconds later, that number changes to "11,058", and so on. Is this possible? How do I do this? I wish I could find an .fla that does this so that I could understand everything from setting up the text box to show the number to assigning the actionscript code to make that number change.

PS - I need this counter to run as an .exe file on a Windows 7 computer that will not be connected to the internet, so code that requires PHP or running on a web server won't work. But an XML file called from the .fla would work, because I could keep the XML file in the same folder as the .exe on the computer.

View 6 Replies

Flash :: Put A Hit Counter Into Video?

Jul 28, 2009

Is 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 Replies

ActionScript 3.0 :: Hit Counter Is Not Working?

May 6, 2010

I have a flash website in AS3 and I added a HIT COUNTER that works with php and a txt database; the problem is that I have everything uploaded to my server and there's no #[hit count] where it supposed to, when i open the activity window [safari] I can notice that the browser.here are the codes:
 
AS3>[code]....

I already change the permissions of this php file and the "txt" database to 777 so I really don't know what else can I do.

View 4 Replies

ActionScript 1/2 :: Way To Make A Counter

Feb 8, 2011

I want to create a counter at the end of my quiz

after each question iclick the next button to go onto the next question

how do i link each next question button to add 1 to the counter

then once I've gotten to the counter page, how do I reset the counter back to 0

View 3 Replies

ActionScript 3.0 :: How To Create A Counter

Mar 1, 2012

I want to create a counter that will take the number I put in a text file and display it......not sure how to do this.

View 3 Replies

Sql :: Counter Variable In SQLite

Jan 5, 2010

I'm working on a simple todo app that has a column for each day of the week. On startup, the app checks to see if there are any incomplete tasks from before the current date. If so, they're moved to the top of the current date's column. The app is cloud-based, but the tasks are backed up for offline mode with an SQLite db. I can easily move the tasks by updating their date property, but I need the order property of each task to increment starting at 0 to place them at the top. I need to be able to define a count variable in SQLite alone and increment it with each update that's performed. I know this code doesn't work, but it's an easy way of explaining what needs to be done:

[Code]....

View 4 Replies

ActionScript 2.0 :: Make A Hit Counter?

Oct 27, 2004

how to make a hit counter so I can tell how many ppl have seen my site, but not have it display? I was thinking of some kind of counter that loads a variable from an xml file, and outputs it back to the same place. I've been working on this, but I cannot get it to work.

View 2 Replies

ActionScript 2.0 :: Counter In Flash?

May 14, 2003

I want a counter in flash so I can know how my website is visited.

View 4 Replies

IDE :: Days Without Accident Counter?

Aug 19, 2009

creating a script for "Days without Accident" counter, that the end user would be able not only reset, but choose the number of days to begin the count down with, without interfering with the script.

View 4 Replies

ActionScript 3.0 :: How To Create A Counter ..?

Nov 10, 2009

looking for a way to create a counter. It needs to count from 0 - 1,000,000,000 at a speed of 45 counts per second. Can someone please give me a code or a webpage I can work with?

View 1 Replies

ActionScript 3.0 :: Create A Counter That Is Always Going?

Dec 5, 2009

I need a counter to tick off 9 times per second....and it continually adds up weather you are on the site or not.

View 1 Replies

ActionScript 3.0 :: Displaying A Counter?

Mar 1, 2010

I'm in the process of trying to work out how a scoring system will work in the game that I'm developing.I've added Code:var counter:int = 0; at the beginning of my code, and when the player mouses over objects to destroy them the killObject function includes the line
Code:counter ++;The bit I'm struggling with is displaying this number in a dynamic text box.I've had a search around but can't seem to find what I'm looking for.All of the gameplay code is written in one frame of the main timeline and it begins after a short introduction animation. When the gameplay is over the AS3 code will instruct the movie to move on to the next frame of the timeline so that an outro animation can be played. The player's final score will be displayed at this point.

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved