ActionScript 2.0 :: Get Score Text Box To Gotoandplay Another Frame - Scene When It Hits A Certain Score?

Aug 10, 2004

Im designing my own game in flash, iv set up a score text box and it works fine. Except i just cant seem to get it to gotoandplay another frame,scene, when it hits a certain score??

View 4 Replies


Similar Posts:


ActionScript 2.0 :: _root.gotoAndPlay(4) Won't Go To The Frame After The Score Counter Hits

May 4, 2009

my name is fabo i made a flash game and i need help with this script:

score = 0;
var Seconds = 10;
function timer():Void {
_root.Seconds -= 1;
}
setInterval(timer,1000);
if (_root.time == 0) {
_root.gotoAndPlay(4);
}
stop();

where it say: _root.gotoAndPlay(4) it won't go to the frame after the score counter hits

View 12 Replies

Actionscript 3 :: Multiple Dynamic Text Score Display - Modifying Each Text One After Another And Incrementing The Score By A Certain Number

Feb 23, 2011

I have a result screen that shows bonus points and such. I want each text field to increment one after another and also have it increment by a certain amount each frame. Result Screen pops up. First is the player score check the player score, is it more than the score we want to display if the player score is greater than the player display score by 100 increase the player display score by 100 if the player score is greater than the player display score by 10 increase the player display score by 10 else increase the player display score by 1 when finished move to the next score...and so on. I have thought of using timers to move from one score to the next, but not being in an Event.ENTER_FRAME it only does one if then moves to the next one.

Also the if statement for incrementing the score looks ridiculous and I'm thinking there has to be a better way to do it. I was thinking of making it a separate function but then I wouldn't know what to return, or how to return it so it looks like its increasing and not just showing the total number instantly. I'll try to expand on it a little more.

View 1 Replies

ActionScript 2.0 :: Score - Movie Go To Frame 3 If The Score = 500?

Feb 17, 2004

i am building a shooting game and i was wondering if it is possible to have the movie go to frame 3 if the score = 500.I.E Score is displayed in a dynamic text box and everytime the enemy is hit the:

_root.score +=50
=============
on the first frame of the film i have the code

if (_root.score == 500) {
gotoAndPlay(3);
}

View 2 Replies

ActionScript 1/2 :: Copying Game Score From Scene To Scene?

Dec 31, 2007

I've created a game that involves 10 questions. Each questionis in its own scene. I've been racking my small brain trying tofind a way to copy the user's score from scene to scene and add (ordeduct) points based on whether the user answers the questioncorrectly or incorrectly.

View 1 Replies

ActionScript 2.0 :: Goto New Scene When Score Reaches Certain Number

Apr 14, 2003

I'm trying to create a game for a class project, using Flash MX. Unfortunatly, I am unable to figure out how to goto a new scene when the score reaches a certain number.

The ActionScript for it is...:
//hit
_root.total = _root.total + 100
//miss
_root.total = _root.total - 50
[Code] .....

I've even tried using ""'s around 'score' and other things, but still no luck. I still havn't figured out the stupid timer either...

View 5 Replies

ActionScript 3.0 :: Check For Score And Then Change Frame?

Jan 20, 2010

ive got a file with a score set up, however when the counter reaches 7 .. i want to move and stop on the next frame ..

View 1 Replies

ActionScript 3.0 :: Score Text With Stroke?

Apr 26, 2011

Apparently you can add stroke to text dynamically. Therefore how can I produce a score text with stroke around the numbers. Would I have to create the ten numbers in photoshop or in flash breaking apart and using the ink bottle and simply call them as required. ie: 10 seconds calls in the 1 and the 0 shape mimicking a real timer. Adds more for the cpu to do but looks wonderful. What do angry birds or anything similar do.

View 2 Replies

ActionScript 3.0 :: Wont Add Score To Text

Jan 11, 2012

it wont add score to my text.

View 12 Replies

ActionScript 3.0 :: Score In A Dynamic Text Box

Nov 26, 2011

I'm just trying to do something simple in flash with AS3, well I was hoping it would be. I have a button that when clicked it goes to the next frame but also adds one point to a score which is displayed in the last frame of my quiz.

The dynamic text box in the last frame has a instance name of 'score' but I cant give it a variable name because its greyed out, cant do this in AS3?
The button ive got has an instance name of 'record'

This is the actionscript I currently have, im not sure if i've put script in there that only works for AS2 or if ive mixed things

ActionScript Code:
var score = 0;
record.addEventListener(MouseEvent.CLICK, fl_ClickToGoToNextFrame_7);
function fl_ClickToGoToNextFrame_7(event:MouseEvent):void

[Code]....

Also when I play the quiz and click the button I get this error:

ReferenceError: Error #1056: Cannot create property text on Number. at aducity_fla::MainTimeline/fl_ClickToGoToNextFrame_7()

View 8 Replies

ActionScript 3.0 :: Dynamic Text Box - Updating Value Of Score?

Jun 16, 2009

I've got this code that creates a dynamic textfield, converts 'score' to a string, displays string, and updates the value of score. Well, I've traced it and the value of score updates, but the value displayed in the text box stays the same. How do I get the value in the textbox to update/change.

Code:
var scoreString:String = String(score);
var scoreNumber:TextField = new TextField();
addChild(scoreNumber);
scoreNumber.type = TextFieldType.DYNAMIC;
[Code] .....

View 7 Replies

ActionScript 3.0 :: Points Or Score Text Box Doesn't Work?

Aug 10, 2011

I set up the point scorer like I have in other games and it doesn't move for some reason. I trace the score and it is perfect so it's my code trying to get the this.score.score_txt.text = String(this.pointsI); to record that fails

[Code].....

View 3 Replies

ActionScript 2.0 :: Input Text Coding - Add 5 Points To The Score?

Jun 2, 2010

When they input the correct word (windmill) I want to add 5 points to the score.However with the below code it disregards the answer and just gives 5 points no matter what? WHY?

on(release)

{
if (wind_txt.text == "windmill", "Windmill", "WINDMILL")[code].....

View 2 Replies

ActionScript 2.0 :: Score Is Displayed In A Dynamic Text Box And Everytime?

Feb 17, 2004

i am building a shooting game and i was wondering if it is possible to have the movie go to frame 3 if the score = 500.

I.E Score is displayed in a dynamic text box and everytime the enemy is hit the:

[Code]...

View 2 Replies

Actionscript 3 :: Flash Game - High Score With Graphics Not With Text

Jan 1, 2010

is it possible to use graphics (the numbers 0-9 in one png-file) instead of a Textfield to show the high score of a game to the player? With a TextField it is easy to "refresh" the score but what can I do, if I want to use my png-files for the score? Is there a simple way to do this? How are other flash game designer do it?

My current solution (not tested, just in my head) is, to create 10 bitmaps (numbers from 0-9) or 1 bitmap with all the numbers in it and then convert the current score into a string, split this string and for every digit show the matching bitmap. Update: or should i try to use filters on the textfield to create a "more beautiful" score?

View 2 Replies

ActionScript 1/2 :: High Score Table Writing A Simple Text File With Flash And PHP

Dec 23, 2010

I am having a problem getting Flash to work with PHP as I need Flash to read and write to a text file on a server to store simple name/score data for a games hi score table. I can read from the text file into Flash easily enough but also need to write to the file when a new high score is reached, so I need to use PHP to do that. I can send the data from flash to the php file via POST but so far it is not working. The PHP file is confirmed as working as I added an echo to the file which displayed a message so I  could check that the server was running PHP - the files were also uploaded to a remote server so I  could test them properly. Flash code is as follows:

//php filewriter
var myLV = new LoadVars();
function sendData() {
//sets up variable 'hsdata' to send to php
myLV.hsdata = myText;
myLV.send("hiscores.php");
}
 
I believe this sends the variable 'myText' to the php file as a variable called 'hsdata' which I want the php file to write into a text file. The mytext variable is just a long string that has all the scores and names in the hiscore. OK, XML would be better way of doing this but for speed I just want to get basic functionality working, so storing a simple text sting is adequate for now. The PHP code that reads the Flash 'hsdata' variable and writes it to the text file 'scores.txt' follows:

[Code]...

View 7 Replies

Actionscript 3 :: Made A New Layer Called Score, Dragged Out A Text Area, Converted

Mar 29, 2012

I want to have a score in the bottom corner of my game. I made a new layer called Score, dragged out a text area, converted it to a symbol and named it Score. Then I set its instance name to Score.

The main class of my flash game is called Main.as. However, I can't seem to access the Score text area I made within the code. I get this error:

1046: Type was not found or was not a compile-time constant: Score.

What did I miss? How can I update the text areas text from within my code? Edit: Forgot to mention I clicked the "Export for ActionScript" box when I converted it to a symbol. And it's of type MovieClip, if that matters.

View 3 Replies

ActionScript 2.0 :: High Score List - Flash Cannot Create A Simple Text File

Aug 17, 2004

I want to create a simple high score list of 10 high scores of a game. From reading the forums I seem to get the idea that flash cannot create a simple text file. I don't have php or asp but do have cgi capability. Does anyone know where I can find a simple cgi-script that will allow me to write the text the cgi receives to a simple text file: game.sco I want to be able to write a single long string to it so that I create a string of values and can load it back in using flash loadvariables. I can create the string in flash... but how do I write it to a text file using a cgi script? the text file would include this string...I already know how to read it and split it to parse it into arrays:

[Code]...

View 1 Replies

ActionScript 2.0 :: GotoAndPlay Random Frame On Different Scene

Jun 27, 2010

-How would I make it so when my clip gets to a certain frame, it will randomly gotoAndPlay a random frame on a different scene?
-All of the frames that I want it to randomly go to are labeled.

View 3 Replies

ActionScript 2.0 :: GotoAndPlay To New Scene And Then Jump To Another Frame

Dec 14, 2009

I am making a small website out of flash and I have a photo gallery in a separate scene. I have five photo galleries and so I have five buttons that will lead to those five galleries.

The code of one of the five buttons is

on (release) {
_root.gotoAndPlay("Content_Photography");
}

Works great, but the first 10 frames of this new scene "Content_Photography" is an intro and then I would like that it would jump to the corresponding gallery that these galleries will be laid out on the timeline.

What would i put after _root.gotoAndPlay("Content_Photography");?

View 9 Replies

ActionScript 2.0 :: GotoandPlay Scene Frame Label

Dec 14, 2010

I know that you are not supposed to target a frame number but here's the deal.I have 2 scenes (Scene 1 and Scene 2). Both scenes are currently the same and I will be customizing them at a later date.The scenes are made up of multiple MC's and I need to target a particular frame. I have named the frame and tried the following script to no avail. When it does work, it goes to the first frame of Scene 2 every time like it is just traveling along the timeline and jumping to Scene 2.[code]

View 9 Replies

ActionScript 3.0 :: GotoAndPlay Frame In Main Scene

Feb 13, 2010

I have a mc INSIDE one of the layers in main scene, how to make it go to specified frame back on the main scene, when finished playing? Flash, cs4, as3.

View 1 Replies

Professional :: Loading Sequence - GotoAndPlay Scene 2 - Frame 1

Apr 5, 2011

how to code a simple load sequence scene. This is how I had it set up in AS2 -I've got two scenes, "Scene 1" and "Scene 2". I've got a 10 frame shape tween in Scene 1. On the 9th frame, I assigned actionscript that will check to see if frame 40 of Scene 2 is loaded, and if it is, gotoAndPlay Scene 2, Frame 1. Then have action in frame 10 of Scene 1 that says to gotoAndPlay scene 1 frame 1 of the current scene. This way scene 1 loops until frame 40 of scene 2 is loaded, at that point, scene 2 frame 1 plays. 

How could I set this up in AS3? Here is what I tried - I've got two scenes, "Scene 1" and "Scene 2". I've got a MC that is a simple shape tween that loops in the "Scene 1". I'm trying to assign codein "Scene 1" that will check to see if frame 40 of Scene 2 is loaded. If it is, gotoAndplay Scene 2 frame 1. If frame 40 of Scene 2 is not loaded, continure to loop the MC unitil it is. Here is the code I've got for the MC in the "Scene 1"

[Code]....

View 4 Replies

ActionScript 2.0 :: GotoAndplay A Frame In Scene 1 From A Movie Clip?

Jan 25, 2005

I need to make it so when the movie clip that is in frame 1 of scene 1 is done it plays frame 2 of my scene 1. How do I do this Im making a cartoon where a characters mouth which is the movie clip which is moving and when it is done moving i want it to go to and plays frame 2 on scene one. Its to late to do everything on the timeline, and I cant just copy the movie clip, i could but I want to just be able to do this go to and play on scene one from the movie clip instead of doing all my work all over again

View 3 Replies

ActionScript 2.0 :: GotoAndplay Frame In Scene 1 From A Movie Clip

Jan 25, 2005

I need to make it so when the movie clip that is in frame 1 of scene 1 is done it plays frame 2 of my scene 1. How do I do this , PLEASE HELP ME!!! Im making a cartoon where a characters mouth which is the movie clip which is moving and when it is done moving i want it to go to and plays frame 2 on scene one. Its to late to do everything on the timeline, and I cant just copy the movie clip, i could but I want to just be able to do this go to and play on scene one from the movie clip instead of doing all my work all over again.

View 3 Replies

ActionScript 2.0 :: How To Add Score

Feb 25, 2009

i want to make it so when ever the ball hits the edges or the rectangle touches the ball it subtracts 5 points from the score but every second adds 1 point to the score heres the file ball-border-follow.fla

View 5 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

ActionScript 3.0 :: Top 5 Leaderboard/score?

Mar 11, 2010

I'm having some issues getting my top 5 score board to work.. it's done in AS3 and is saved using a shardObject - the loading/saving aspect works 100%, but the actual scores are getting confused and overwriting each other, EG if you get the top score, it replaces both the 1. and 2.

[Code]...

View 3 Replies

CS3 Making Textbox With Score?

Apr 2, 2011

i have created a mini-game in CS3 that is like a race using KEY_UP and the score its equal to the number of times the the right key's go up. that is already done, my problem is to display the score. i'm a bit confuse of how to use a textbox. and the textbox have to appear on the Simbol that won. i create the textbox and insert its type input to appear on the tela, but put it to work with score is the problem :S

View 1 Replies

ActionScript 3.0 :: Buttons That Add To A Score

Nov 30, 2008

I'm trying to make an interactive quiz with a few key points:each answer has to add to a score, and the score has to be displayed at the end of the quiz in a dynamic text box.I've coded all the buttons and finished the animations, but I still need to set it up so each correct answer gives the player a point. How would I go about doing this, plus displaying it at the end? I might feel ambitious and try to have two different animations at the end, a "good" ending and a "bad" ending. How do I get the animation to go to a specific frame depending on the players score, depeding if it is above or below a certain number?

View 1 Replies







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