ActionScript 3.0 :: Flash Dynamic Text (counter) Action?
Jun 21, 2010how to make if my counter counts to 3, to go on selected frame?!
Code:
if (badScoreText.text == String("3")) {
gotoAndPlay(1);
[code].....
how to make if my counter counts to 3, to go on selected frame?!
Code:
if (badScoreText.text == String("3")) {
gotoAndPlay(1);
[code].....
I'm trying to create a "counter" element that uses a formatted dynamic text box to count up in .1 increments 3 times a second, starting from a specified value (so viewer would see 3.1, then 3.2...etc.)
Here's the code so far:
var counter:Number;
counter = 3.0
counterText.text=(String(counter));
var timer:Timer = new Timer(300);
[Code]....
What I can't figure out is what should go in the function area, to add .1 seconds each time the timer cycles.
I am just learning how to use Flash AS3. I have made a very basic animation that is a circle with a slice in it that grows larger over a couple of seconds until it is about a quarter of the size of the circle. It is designed for my research subjects to watch and follow for range of motion and speed as they complete a leg exercise task. I used a basic for loop in the animation to repeat it 10 times, then a frame appears that says "Set Complete." I would like to add a repetition counter to the screen so that subjects know which rep they are on throughout the animation. I know that I have to use a dynamic text box to do this, but I don't know where to put the script so that the new counter number will appear on the screen after each loop. Here is what I have so far for script:
Action Layer first frame of loop:
var count: Number=0;
Action Layer last frame of loop:
count++;
if(count<=9){
[code]....
How can I make a FPS counter with a simple dynamic text and a script?
View 5 RepliesI have all these buttons in movieclip instances and I want to make it so there is a little counter in the corner of the screen that counts how many times buttons are pressed (not how many times you click the mouse).
View 3 Repliesi have a problem with the line space flash creates when a dynamic text is loaded in a dynamic text field on the stage i put a dynamic textFild with istance name "profile_text". then im loadin in it a text. my text is written in the Notepad like this
[Code]...
i already set a Textformat to my dynamic text with i tryied to play with the "Leading".. but i think it something dealing with paragraph. how i can decrease spacing between paragraphs??
I'm trying to create a "counter" element that uses a formatted dynamic text box to count up in .1 increments, starting from a specified value.[code]...
View 3 RepliesI'm using a hit counter according to this tutorial (http:url...)I'd like to have a text field with htmlText = "blablabla" + count;
but honestyl i can't get it done.
I am trying to increment a counter by one digit if a window (called searchItem_txt) contains text for more than five seconds. The code below activates the counter after five seconds but it keeps on incrementing until the count has reached 63.
[Code]...
I want to create a var that concatenates some text with my loop counter, this doesn't work:
[Code]....
I am creating a dynamic group of buttons based on a string that i pass to flash file. There is no problem creating these buttons (that I do duplicating a movieclip from my library) The question is, that i need these buttons to open another page, all buttons the same, but passing a parameter. How can i assign the action to my buttons?
My frame 1 code is at this moment:
for (i=0; i<totalItems; i++) {
_root.attachMovie('loader', 'imageLoader'+i, getNextHighestDepth());
_root['imageLoader'+i]._x = 132*(i);
_root['imageLoader'+i]._y = 1;
_root['imageLoader'+i].imageLoader.loadMovie(_root['img'+i]);
}
The string that flash receives is something like
totalItems=3&img0=pic01.jpg&id0=01&img1=pic02.jpg& id1=02
and the parameter i want to pass to the new page is the value of 'id'.
All I want to do is add text from my string to dynamic text field when I click dynamic buttons. What should the as code be for this? Here is my code. Right now I just have the click returning another shape.
[Code]....
I'm using the dynamic text scroller from [URL] found at [URL] Here's a link to my zipped files too... [URL]
1) I can't figure out how to have URL links in the text that loads.
2) How can I make the scroller refresh to allow for new text in the dynamic text area. The content changes alright, but the scroller stays in the same position and if it wasn't needed initially, the scroller disappears and doesn't return on new text.
is possible to align text in dynamic text control vertically to the middle? In flash CS3.
View 1 RepliesI am working in Flash CS5 and I have placed a text field (dynamic, classic text) on the stage. I am accessing it through Actionscript on the same frame like this:
var ct:TextField = TextField(getChildByName("Temperature"));
ct.text = "Hello world";
What ACTUALLY appears is this: So... The H, Ls, and D are gone. Mysteriously. Without warning. I am sitting here utterly confused. Is this just me?
PS. The text field is set to Myriad Pro Bold, a font on my computer, so it isn't like it's a font problem.
i can't get flash to show, and in a dynamic text box which loads text via a variable from a .txt file on a server.
View 2 RepliesThere is a dynamic text box and I set it's wrap to be falseHowever, when I input text and press enter key, it still return to next line. How should I fix it in Flash CS3?
View 3 RepliesCurrently I'm using javascript which works fine to pass text from textfield A to textfield B:
Code:
window.onload=function()
{
document.forms.form1.shirtText.value=document.forms.form1.KitGroupID_16_TextOption_38.value
}
Is there a way to pass the textfield A text to a dynamic text input (flash) as I'd like to use the font embedding flash offers. I can make it work when loading a value from a txt file but I'm not sure how to access the value identified above as KitGroupID_16_TextOption_38 and make it appear in a dynamic input box. Eventually I might want to have 3 font choices for the user but I'd like to just see if I can get this working properly first.
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 making a very simple adventure game with a dialogue box. The dialogue box is a dynamic text box. I need it to display the next message everytime the "next" button is pushed. Right now, this is how it looks.
[Code]...
I have a series of buttons and a text field that follows the cursor, showing you the name of the button you roll over. How do I get the text field to stop interfering with the buttons? You don't get the pointing finger or get a click registered since you're clicking on the text, not the button.
I tried setting the mouseChildren of the text to false, which did nothing. And since it's not part of any button, there's no point in setting the property for each button.
My only option is to have hidden copies of the button floating over the text, but there ought to be a way to have the click pass thru the text and reach the button, yes?
P.S. FWIW, the buttons are actually movie clips with buttonmode = true and useHandCursor = true.
I'm searching for a way to link a text and a button in this way: When the mouse goes over the button or the text I want the text to become orange et the button to get an orange border.This is when the mouse is not over the buttons nor the titles.And this is when the mouse is over the title or the button.
View 1 RepliesI want to capture the text typed by a user with the keyboard and to use it in a program (written in the panel action). For instance, the user types the text "TEXT" and the program automatically catch this text and process it (for instance, the program writes this same text in bold letters; so the text TEXT appears in the result panel).
View 3 RepliesHow 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.