Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Counter Animation



i am trying to do a flash animation with text. what i want to do is create a counter that goes from 1 to 30,000 is about thirty seconds. the problem is that i don't want it to turn out looking morphed inbetween. is there a way to make it look like the numbers are flipping, from the ground up, while they change?



KirupaForum > Flash > Flash 8 (and earlier) > Flash MX
Posted on: 02-10-2004, 11:02 AM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Counter Animation Help
Hi,
this message goes out to anyone who may be able to help me! i am trying to do a flash animation with text. what i want to do is create a counter that goes from 1 to 30,000 is about thirty seconds. the problem is that i don't want it to turn out looking morphed inbetween. is there a way to make it look like the numbers are flipping, from the ground up, while they change? any help or advice would be appreciated. thank you!
elena

[f8] Flash PHP Counter With Animation
Hi Guys

I'm a total noob when it come to this but i do try, i found a good tutorial on how to make my counter and it works just fine(a bit boring though), i now like to add some CONTROLED animation to it, and having trouble writing the code that will do this for me, to be honest i don't have a clue.

Here is my Counter Link

My flash movie has 25 frames, i like the green bar to move 1 frame for every 4 counts of the counter, so

//my noob code, i know this woun't work, but hopefully it explains what i'm trying to do.

"if myCount=4 gotoandstop frame 2
if myCount=8 gotoandstop frame 3 ...... to frame 25

and if myCount = 100 gotoandstop frame 1
and if myCount = 104 gotoandstop frame 2 ...... to frame 25

till forever"

Here is a link to the tutorial Link

Here is a link to my .fla Download

I suppose all the code i need will be on the first frame in my flash movie, something to go and look at the txt file and them tells the flash where to goandstop.

I really hope someone could help with this, you will make my day. #

THE FLASH NOB

How To Add Visible Frame Counter To Animation?
I am trying to create a invisible rollover button in my flash animation that displays the current frame so when my client and I are discussing the animation we can determine which frame to make changes on.

When I set a variable to _currentframe, it stores only the frame on which the action occurs, which makes sense. Is there any simple (and low-bandwidth) way to have that repeat so a variable is constantly loaded with the frame number of the main timeline? Or is there some other way of doing it?

Any input on this would much appreciated.

Thanks!

Reset Counter - NOT HIT COUNTER
Hi all, I have a counter going to repeat some frames, and then when it reaches the number of times I want it to repeat, I have it go to another frame to play a different movie clip...then at the end of the new movie clip, I want it to start over "fresh"...

Does anyone know the coding for reseting the counter?

Here is my current code:

counter = counter+1;
if (counter == 4) {
play();
} else {
gotoAndPlay("ad");
}


Thanks,

Wendy
Wendy@pixelchix.com

Need Urgent Help How To Combine Transition Class Tween Animation And Keyframe Animation?
Hi! I have a transitional tween class animation assigned to "mc_logo" on frame 1. However on frame 100, I have "mc_logo" animated on the timeline by regular keyframe animation.
I have assigned the tween class animation to "mc_logo" on frame 1 and the regular timeline animation starting on frame 100 does not execute now when I test the movie...why?

Do I need to end/clear the tween class animation so the regular timeline animation will work again?

Here is the code on frame 1 so far:

import mx.transitions.*;
import mx.transitions.easing.*;
import flash.filters.*;
var LogoTweenY:Tween = new Tween(mc_logo, "_y", Bounce.easeOut, -120, 171, 30, false);

Thank you in advance for your help.
Attila

OnMouseOut{freeze Button Animation, Reverse Animation Back To..}
This is my question in an action script "perspective", since i dont wanna spend the time typing this question out in plain english..

How would i implement this effect into a button I made that contains a MovieClip as the over state? ::

onMouseOut{
stop button's Over animation on current showing/playing frame;
then reverse animation back to start
OR
fade out current showing/playing Over animation frame, back to the button's load state (not over)
};

Playing A New Intro Animation On Release During The Previous Outro Animation?
I know about external swfs and having intros and outros, but I want my intros and outros to overlap...

for example, I want a background that's red and rotates when you click button 1, but I want to it rotate and change yellow when I click button 2, or rotate and change green when I click button 3...

I don't want it to rotate than fade to black and finish before the next animation has started, cause otherwise I don't get the smooth colour change from red to yellow, rather it's red to black than yellow...any tutorials that can help me?

thanks...it's hard to explain

Simulating Hieracical Animation Tween Mixed With Timeline Animation..
The theory was that I animate my clip say across the stage using frames in the main timeline. So this animates fine, but when I use the Tween class inside this clip the timeline animation is destroyed! the tween class for the clip was just doing some animation repeating, like as if it was the clips own timeline...this overpowers the parent animation and the slide across the stage doesnt happen...

why? and is there a solution more importantly.

Play/Pause For Animation/Nested Animation And Sound
Hello and Goodmorning, afternoon or evening.

I am relatively new to actionscripting and have come upon a problem I'm sure is probably easy but for some reason I can't make it work.

Basically I have a presentation that plays several voice over sequences that match up with accompanying animations which are mostly movie symbols that house the animation sequences. Well now the client wants to put a pause/play button on the presentation and I haven't been able to make it work... I put in stops but the movie symbols still play out the sequence and the voice over starts over... not sure what to do... HELP!... and thanks ahead of time.

Raul.

Help Linking Hit Detection To Animation In A Game (death Animation)
Hi everyone - I've just been experimenting with creating games in flash MX 04 and I've come across a problem that's had me stuck for a few hours now. I have just about everything working in my practice game, except when my character gets hit with the projectile... it won't go to the death movieClip that's located in the character's main movie clip (on frame 6 of it).

If anyone could check out the project file and let me know what i'm doing wrong it'd be greatly appreciated. The controls for the game are just the arrow keys to move the character, and down ducks - avoiding the projectile.

Thanks

Stopping Animation From Playing Before Another Animation Has Finished (On Keypress)
Hi guys

I've linked to the project I'm current working on; essentially, what it does is play a ripple animation at specific points on the stage when certain keys are pressed. What I'm trying to do at the moment is stop people from hammering one key many times, and creating several instances of a ripple in one location. As well as looking strange, it also slows down Flash considerably ;-)

I'm not really sure where to start, but what I'm thinking of would work as follows: -

Person pushes 'Q', and a ripple is triggered at the coordinates relative to that key. If they press 'Q' again, it is impossible to trigger another ripple at that location until the current ripple animation has finished. The same is true with all of the other keys (Q, E, S, Z, C, Up, Down, Left Right) when pressed.

However, it should still be possible to trigger ripples at the same time with different keys. For example, someone could press three different keys at the same time, and see three different ripples which play at the same time and overlap, etc.

Hope that's clear enough - if anyone could help me out with this, it would be most appreciated.

- Thanks!

http://www.joshbarton.co.uk/flash/Ripple_Project.fla

Trouble Adding Animation To Existing Rollover Animation
Hey all,

I'm using Flash 8. I have a picture of a building which is segmented into floors. Upon rolling over a grouping of floors the user sees either a blue overlay, indicating they can click, or a gray overlay simply describing what the floor is. I already have some actionscript in place and I don't need to alter it, I just added more animation to an existing movieclip rollover, but it's not quite working. On one of the floors that rolls-over gray, I want an additional rollover with some text. So I made a movie clip of the rollover animating out and the type coming in and I just added it to the gray fade in movie clip since there was already onRollover actionscript in place there. However, the rollover kept playing over and over again. So, of course I added a Stop action. Then, the animation didn't work anymore, it just rolled over to the final state of that animation. Does anyone have any ideas of what I can do, or what I can do as an alternative? I'll post the actionscript in case that helps. Like I said, the rollover "rolls-over" but either loops (without a Stop action), or rolls over to the final frame in the animation (with a Stop action).

Thanks!
Mc

[CS3] Create Animation That Runs From Button Click After Another Animation Has Run
Hi,

I am a newbie to flash & actionscript. I have, though, learnt the basics of flash animation, tweens & bits of actionscript and have created an animation movie consisting of sevral layers.
I have the movie stopping at the end and the graphics are all converted to buttons.
Now, from this end point, i want the user to click on one of the images (buttons) and then the flash movie to start a sub-animation.
BUT i don't know how to do this.
Do i need to create a new scene to do this or do i need to extend the layers and add the additional animation to the layers or do i need to add new layers to the same scene?
ALternatively, do i need to this in actionscript?

Please let me know what is the method of doing this in Flash. This seems like a simple thing which i've seen in flash movies before but i can't find any answers or tutorials on how to do this.
Please give me the steps involved in creating a second animation runnable from a click in the 1st animation.

To clarify further, my aim is to make the movie clip interactive using different motions 9or animations so that when an object in the 1st animation is clicked a different animation starts. So how can i achieve this?

Regards, shuja

Making An Animation Fade Into Another Animation When A Button Is Released?
okay, so I have for exmaple a red animated background for 'home' but when someone clicks 'media' for example, I want that red animated background to fade into a green animated background.

I tryed using external swfs, but I don't know how to make the outro animation of the first red swf fade into the intro animation of the second green swf, so it creates the effect of red into green, rather than red to black, than black to green.

any tutorials that could help me?

Converting Programmed Animation To Timeline Animation
hi,

I have made a simple animation using programming in Flash 5. It is all contained within one frame on the timeline. It constantly repeats itself and plays fine as an swf file and as quicktime (6).
The problem is, I want to import it into an application (after effects)that doesn't understand flash programming. It imports it as one frame and nothing happens when I try to play it.

I think the solution may be in converting it to a timeline animation for about a minute which has a definite start and end point but I don't know how to do this.

any ideas?

katy

Converting Tweened Animation To Frame Animation
i have this cartoon see, and i made a tween of a character, but it looks all stiff and whatnot, but i'd like to use the tween as a guide for the stuff i am going to draw in. is there a way to convert this tweened animation to frame by frame animation? can't find anything like this in the help files.

mmm..

thanks

Button Animation That Ends Animation On Rollover
I design a button that glows on over. So the person rolls over the button and it glows other wise the button does nothing.

What I want is the button's glow animation to finish the animation after the person moves the mouse away. So once the mouse touches the button it starts the animation and if the person moves the mouse away the animation completes the time line(glow).

I designed a button with the glow as a separate animation/movie clip.

The animation is on the over state. But it does not play all the way threw the animation unless the person keeps the mouse over the button.

Please help me get this simple problem to work.

Sassycassie

[CS3] Adding A Rollover Animation To An Existing Animation?
Hi there,

Sorry if the question sounds a bit confusing, but I've previously managed to create rollover animations for static movieclips, but I'm really struggling to add a rollover animation to a movieclip that already has an existing looping animation, and also ensure that there is a smooth transition regardless of where the looping animation has reached? Similar to what's in the following sites:

http://unlimited.orange.co.uk/flash/go

http://www.ileduboucanier.com/ileduboucanier.html

Any ideas/tips/links to tutorials would be greatly appreciated!

Storing A Dynamic Animation To A Static Animation?
Hi there.

Is there a way to create a static animation out of a dynamic animation?

Like this;
If I create a random "starfield" effect, and want it to be exactly the same every time - can I somehow store the animation to a swf or create automatic actionscript FROM the randomness I've already created?

Would be nice to know

Samuel

How To Create Static Animation From Dynamic Animation?
Hi there.

If I have created a dynamic animation (placing 100 raindrops on a stage using a for-loop), how can I create a static animation out of this that I can use in a animation?

The reason for asking, is that I want to create a flash-video for TV, and for that I can't use movieclips or dynamic content at all...

So I appreciate any help

Samuel

Timeline Animation Tweening Vs Actionscript Animation
Hi All.

The reason for this title is because I am currently producing flash banners for a company and have been looking all over the internet on such a subject.

My flash skills are somewhat limited. I currently make everything on the timeline and have started to see its limits. I find I am getting choppy movement with some of my animations.

I have tried using jpgs, pngs, gifs and vectors in flash but still get the same problems. I have tried setting the fps to 12, 24, 32 and 90.

I hear that flash 8 is apparently buggy and that you should set it to 31fps. Can anyone verify this?

Also I understand by uping the fps you start to encounter loading problems as you are starting to reload the whole piece your working on faster and faster and so computers with a low cpu will suffer.

I found by looking at using certain colours one can get around possible chopping problems and by spinning the word or image this can take away some of the effect.

I also read by setting publish to 'quality=best' can make a difference.

Next I've started reading about 'onEnterFrame' 'pressHandler' and OnMouseMove handlers in actionscript and how this can help.

Can anyone shed any light about how to get a nice simple smooth animation for a flash banner?

Many thanks

Newsense

Play New Animation And Reverse Previous Animation
Hey everyone. Brand new here. I am hoping someone can help me out with bringing new sections of a website into the display area, and moving the previous section out. Meaning, lets say I have two buttons, and the idea is when you click one, an animation of the content pops up from the bottom of the screen to show the viewer. Simple enough, I use gotoandplay like this:

topLevelButton1.addEventListener(MouseEvent.CLICK, handleClick);

function handleClick(e:MouseEvent):void {
section1.gotoAndPlay(2);
}

So, when someone clicks my topLevelButton1, section 1 moves up on the screen so its visable. This concept is done with 5 different buttons on my site. It works fine. The problem is, when there is already an section displaying on the screen, I need to LOWER that section BACK DOWN before the new section raises up to display when I click a different button.

How is this achieved? I understand that Im supposed to store the current animation as a temp movie clip, so that when I click a new button, Flash takes whatever is currently stored as the temp movie clip, and reverses it or plays that animation from a specific frame. I dont know how to go about this though... Help please?

Changing Keyframed Animation Into Actionscript Animation
Can anybody provide me with any code and technique that will succesfully allow me to convert my menu from a keyframed animation into a dynamically generated actionscript menu? I just realized that i might have to change the buttons more often than not and i would like to future-proof this as much as possible. i also want it to move very smoothly. Any and all help is appreciated


Here is the menu animation

P.S.: some of the buttons are to be drop down menus, so id like that functionality as well. Any and all help is appreciated. Thanks alot

Changing Keyframed Animation Into Actionscript Animation
Can anybody provide me with any code and technique that will succesfully allow me to convert my menu from a keyframed animation into a dynamically generated actionscript menu? I just realized that i might have to change the buttons more often than not and i would like to future-proof this as much as possible. i also want it to move very smoothly. Any and all help is appreciated


Here is the menu animation

P.S.: some of the buttons are to be drop down menus, so id like that functionality as well. Any and all help is appreciated. Thanks alot

Changing Keyframed Animation Into Actionscript Animation
Can anybody provide me with any code and technique that will succesfully allow me to convert my menu from a keyframed animation into a dynamically generated actionscript menu? I just realized that i might have to change the buttons more often than not and i would like to future-proof this as much as possible. i also want it to move very smoothly. Any and all help is appreciated


Here is the menu animation

Roll over the cross to start it.

P.S.: some of the buttons are to be drop down menus, so id like that functionality as well. Any and all help is appreciated. Thanks alot

Frame Animation Or Motion/shape Animation?
I know that motion/shape animations cause less lags then frame-by-frame animation, I'm making a game and I think the speed of the Flash Player is very important.
is it better to make all the motions in Flash, then play it directly or export the animation into .gif file and import them in Flash again(in order to make frame-by-frame animation)? Because the second way has a huge(I think) advantage: when you set the quality of the movie to low, the graphics' quality doesn't change for real since they're gif

Place Animation On Stage Over Dynamic Animation
This might seem like a really dumb question but.......... Say I've got a dynamic created flag animation. Working fine. How can I place an animation created on the stage on top of this created animation? It seems, that the as animation overrules the stage animation. thanks in advance

Tweened Animation Vs Action Scripted Animation
Hi All.

The reason for this title is because I am currently producing flash banners for a company and have been looking all over the internet on such a subject.

My flash skills are somewhat limited. I currently make everything on the timeline and have started to see its limits. I find I am getting choppy movement with some of my animations.

I have tried using jpgs, pngs, gifs and vectors in flash but still get the same problems. I have tried setting the fps to 12, 24, 32 and 90.

I hear that flash 8 is apparently buggy and that you should set it to 31fps. Can anyone verify this?

Also I understand by uping the fps you start to encounter loading problems as you are starting to reload the whole piece your working on faster and faster and so computers with a low cpu will suffer.

I found by looking at using certain colours one can get around possible chopping problems and by spinning the word or image this can take away some of the effect.

I also read by setting publish to 'quality=best' can make a difference.

Next I've started reading about 'onEnterFrame' 'pressHandler' and OnMouseMove handlers in actionscript and how this can help.

Can anyone shed any light about how to get a nice simple smooth animation for a flash banner?

Many thanks

Newsense

Changing Keyframed Animation Into Actionscript Animation
Can anybody provide me with any code and technique that will succesfully allow me to convert my menu from a keyframed animation into a dynamically generated actionscript menu? I just realized that i might have to change the buttons more often than not and i would like to future-proof this as much as possible. i also want it to move very smoothly. Any and all help is appreciated


Here is the menu animation

Roll over the cross to start it.

P.S.: some of the buttons are to be drop down menus, so id like that functionality as well. Any and all help is appreciated. Thanks alot

Easing Animation Vs Time Based Animation
I want an animation to be controlled by easing, what I really want to do is a boat floats slowly then speeds up when it reaches at the other end of the screen(left to right). I know easing is effective, however; is it possible to control motion with actionscript?

I want to start slowing down and then when it reaches to certain point on the _root; it speeds up slowly.

Hit Counter
can we create hit counter in flash 5
if yes what will be the coding.
thanks for anyhelp

Counter
How can i make a script which counts down to minutes, when its over, somethings happens????? Help

Counter For _x
Any ideas pls for such thing:

In a panoramic view by Henrik Dahm
http://www.flashkit.com/movies/Effec...60/index.shtml

i added a dynamic text field that checks X coordinates -
meters = xposition;
(rounded)
here:
http://www11.brinkster.com/samsonart/zabor.asp

how can i make it width relative so it returns a number between 0 and 128 starting from left side (e.g. when movie loads it is a middle so should show 64) - without minuses and so it starts again after reaching the end?

Thanks for all who can think of this mathematics

Counter
Does anyone know of a script that I can use that would act like a counter? I may need it to be able to speed up or slow down, also.

At this point I guess it will act almost like a timer. So when it starts it will begin at 0 and then count 1 number at a time until it is stopped.

Thanks

Counter
Is there anyway to make a counter in flash? I don't want to get one of those commercial or free counters that are html script. What would be the script for a counter in flash? What I mean by "counter" is simply the showing of the number of people that visit my site.

Counter
I'm trying to set a variable to act as a counter to record how many times I've dragged and dropped an item.
I'm using the if, else if and else commands, they all seem to work except the counter. What am I doing wrong?

I have set a variable in the first frame.
counter = "0"; (no expression set)

Then, on the button executing the action is:-

on (press) {
_root.app1.startDrag(true);
}
on (release) {
stopDrag ();
if (counter <2 && getProperty("/app1", _droptarget) == "/chip2") {
tellTarget ("_root.upload1") {
gotoAndPlay (2);
counter = "counter +1";
}
} else if (counter >=2) {
tellTarget ("_root.error") {
gotoAndPlay (2);
}
} else {
setProperty ("_root.app1", _x, "200");
setProperty ("_root.app1", _x, "250");
tellTarget ("_root.error") {
gotoAndPlay (2);
}
}
}
What I'm trying to do is drag an item called 'app1' onto a area called 'chip2'. Each time this happens the counter adds 1 and a upload message is called. If the area is not hit then it returns to it's original position and an error message is callled. When there are more than 2 apps on the chip1 then it's rejected and a error message is called. There will be the same code on an item called app2, app3 etc. The above code is only for app1.
Everything works, except I can have as many app1, app2 etc on the chip2 and I never get my error message. It seems to be ignoring the counter!

What am I doing wrong, Please advise.
Any help would be appreciated.....

[Edited by louisehall@4mostinfo.com on 09-03-2001 at 07:02 AM]

Hit Counter?
Can anyone tell me if you can have a hit counter in flash5.
I so, can I download it from somewhere?, thankyou in advance

Counter
Hi,

I've got a counter that counts backwards for every item that has been seen. I use this code in frame one of the main timeline:

counter=7;
if (counter==0){
loadMovieNum ("exit.swf", 0);
}

The counter works, it goes down to 0 but then the exit.swf doesn't load. What I'm I doing wrong?

Thank in advance for your help.
Danielle.

Hit Counter?
Hi

I was wondering if someone could tell me how to do the most basic of hit counters?

Thanks

Hit Counter
how would i make a hit counter. Would i use a varable? Please Help me on this

Hit Counter
Can someone please help me. I need a Flash hit counter to put on my site. Ive tried the ones that are on this site but i dont like them. Is there anyone out there that can point me to a hot flash hit counter.

Thanks so much

PHP Counter
I am trying to get the tutorial for a php counter to work correctly (it is also on http://www.flash-db.com). It keeps increasing the count every 10-20 seconds. I have eliminated the loop, but it still does it.
My movie begins at frame 5 (it loads to 5 from the preloader). So basically I can sit and watch it count up gradually.

Frame 5:
loadVariablesNum ("PHPCounter.php?ran="+random(9999), 0);
Frame 6:
loadVariablesNum ("PHPCounter.txt?ran="+random(9999), 0);

Thanks.

Counter Help
any body know the easiest way to put an accurate hit counter into my flash intro??

i want one that is accurate, small and dosnt rely on a third party just me and my server .

I tried the flash kit tutorial and it dont work!! It is too vague and sketchy and leaves too much to common sense which is something that i dont posess!

cheers tony

Php - Counter
I am currently using php and a text file to run a counter on my main timeline, however, I want to put the counter in a movie clip so it is independent of the main timeline, but when I use the same keyframes and php code it doesn't work. I know clips reside in different levels so do I need to add some code somewhere?

Counter
I need some help creating a counter. I have multiple draggable movie clips that can be released into a target area. I want to create a counter, so that when the value of the MCs equal a certain number no other MC can be dragged into the area and dropped. Problem is, I don't have a clue as how to start building the counter. Can anyone help?

Counter
Hopefully I can explain this so you get the idea.

I have created a drag-n-drop application in which there are multiple target areas for multiple MCs. Each MC has a different number of instances on a given scene. Each MC will have a different value, ex. there are 6 different drawers. One is 3 inches, one is 6" and so on up to 15".

The different target areas (which are MCs) also have different sizes, one is 24" another is 36", up to 60". What I am wanting to do, is create some sort of a counter for each target areas. I want it to count the different values of the MCs (or instances of MCs) that are dropped within the target area and when it reaches a value like 24" it will not allow anything else to be dropped into the target area.

So if 8 instances of the 3 inch drawer were dropped onto target area 1, it would add them up and equal 24. It would then not allow anything else to be dropped onto the target area.

Can anyone help me get started?

PHP Counter
Another issue I have, is that I tried to incorporate a PHP Counter.
On the first frame of my main movie i have this action:

loadMovie ("PHPCounter.swf", "_root.container2");

The PHPCounter.swf has the following actions:

First frame:
loadVariablesNum ("/cgi-bin/PHPCounter.php?ran="+random(999), 0);
Second Frame:
loadVariablesNum ("/cgi-bin/PHPCounter.txt?ran="+random(999), 0);

It is not working and I don't know why.

Oops, here are the scripts:

PHPCounter.php:
#!/usr/local/bin/php

<?

$filename = "PHPCounter.txt";

$fp = fopen( $filename,"r");
$Old = fread($fp, 100);
fclose( $fp );

$Old = split ("=", $Old, 5);

$NewCount = $Old[1] + '1';

$New = "Count=$NewCount";

$fp = fopen( $filename,"w+");
if (flock($fp, 2)) {
fwrite($fp, $New, 100); }
fclose( $fp );

print "Count=$NewCount";

?>

PHPCounter.txt:
Count=1

I have no clue why it is not working.

Can someone help?

Thanks

HELP I NEED A COUNTER
PLEASE HELP ME ANYONE!!!!!!

How do i make a counter????
I have made 3 dynamic texts;

1 = Minutes
2 = Seconds
3 = Miliseconds

I need to make them count for 00:00:00 to 38 minutes.

You might not understand what i am saying but please have a go!

Counter
hello
i have a dynamic text box and two buttons,when i click start button the text box should display numbers from 0 to 100 and if i click the stop button the numbers should not change,and there should be some gap between two numbers so that the number change is visible.

pls help me how to do this

bye
geethanandh

Copyright © 2005-08 www.BigResource.com, All rights reserved