Help With Reset Button
Hi everyone, im new to the forum.
I have a problem that I cannot find an answer for, hope you guys can help!
I have created a small form for the user to order goods from, it has the usual name, address email fields etc etc on it, the form works as it should after the user submits it using the submit button, my problem is the reset button, for some reason the variables I have declared can be seen on the form within the text boxes when I go to the browser view.....(it reads ...._level0.name for the name field and _level0.address for the address field etc etc)......I have used the appropriate text field(input)
The reset button can be used to delete the text so the user can input the details but I would feel much better if it wasnt to be displayed at all in the browser view....I have also attached the code for the reset action...but im sure that is not the problem....Please help!!
on (release) {
name = "";
address = "";
postcode = "";
email = "";
}
FlashKit > Flash Help > Flash General Help
Posted on: 03-16-2006, 03:07 PM
View Complete Forum Thread with Replies
Sponsored Links:
Reset Button
Is there a way of making every MC on the stage go to its first frame at the click of a button. I know it could be done by listing all the instances but i was curious as to whether there was a single piece of actionscript.
View Replies !
View Related
Reset Button
Hi,
Anyone know how to implement a reset button?
I currently have a movie clip that performs a number of actions in frame 1 and then a button is pressed in order to run a tweened animation starting in frame 2.
What I need now is a reset button that will go back to frame one and reset the movie clip and the animation (i.e. start again).
Is there some form of unload/load that I can do? Or any other method that anybody knows?
The movie clip, button and animation are all in seperate layers by the way.
View Replies !
View Related
Reset Button
Hello can any1 help? I have a connect 4 game made with flash but when i reset the game it misses out a space where the coloured disc should go. After i reset again it misses out another space.
Also within the game, when the user has 4 of the same discs in a row, the row of 4 should change to black. If anyone can help i would be really grateful. Thanx in advance.
View Replies !
View Related
Reset Button
I have a program that creates squares everytime a click a button, but i would like a reset button whereby when clicking it resets or gets rid of all the squares.
please can you give me the actionscript to do this.
It will be greatly appreciated!
View Replies !
View Related
Reset Button
hi...
i currently hav an next and back buttons...
both hav some commands inside....
but i wan to noe how to configure the back buttons to link to previous scene as well as reset all date available.....
Thanks
View Replies !
View Related
Help With Reset Button
Hi everyone, im new to the forum.
I have a problem that I cannot find an answer for, hope you guys can help!
I have created a small form for the user to order goods from, it has the usual name, address email etc etc on it, the form works as it should after the user submits it using the submit button, my problem is the reset button, for some reason the variables I have declared can be seen on the form within the text boxes when I go to the browser view.....(it reads ...._level0.name for the name field and _level0.address for the address field etc etc).
The reset button can be used to delete the text so the user can input the details but I would feel much better if it wasnt to be displayed at all in the browser view....I have also attached the code for the reset action...but im sure that is not the problem....Please help!!
on (release) {
name = "";
address = "";
postcode = "";
email = "";
}
View Replies !
View Related
Help For A Reset Button.
Hello,
I am using Action Script 2.0. I have a caddy in a little Store Website.
I have created some buttons and all is allright.
But I wish to add a reset button in the caddy (just if the buyer has made a mistake...)
I have built the reset button, but I don't know how to make the AS code...
Can you help me please ?
I join the caddy's pic.
Regards,
Jack.
View Replies !
View Related
Reset Button
Hi, Im trying to get this reset button to work. I used to use this code in Flash MX but it doesn´t work in AS2....
Code:
on (press) {
_root.playb.onRelease = function() {
_root.gotoAndStop(1);
}
}
I also tried:
Code:
loadMovieNum("YourFile.SWF", 0);
but the code dosn´t work after I export the .swf to my web server and view it on the internet..(it just disappears when the button is pressed)
and the simple
Code:
gotoandplay("start")
dosn´t work because I need to reload the code....
Can anyone help me to solve this... ?
View Replies !
View Related
Reset Button
Hello, does anyone know what could be wrong with my code. I am trying to reset a form.
On the Reset button I have the following
on (release) {
clearForm();
}
on the 1st frame of the timeline I have the following
function clearForm() {
txtbx=""; /* name of the textbox trying to clear
}
It won't clear my textbox. Am I missing something??
Thanks
View Replies !
View Related
Reset Button
hi, i'm a newbie to flash. i want to know how i can make a reset button similiar to the effect on this tutorial
http://www.actionscript.org/tutorial...PI/index.shtml
i created a bunch of moive clips with dulplicatemovieclip function, how can i erase them all with a click of a button?
here's my function code if you are curious
var i = 1;
function createball(type, color) {
var scaleVar = random(150) + 20;
var xOffset = random(300);
var yOffset = random(350);
duplicateMovieClip(type, type + i, i);
with (eval(type + i)) {
ballFrame = color + type;
_x = xOffset;
_y = yOffset;
_xscale = scaleVar;
_yscale = scaleVar;
gotoAndStop (ballFrame);
}
i = i + 1;
}
View Replies !
View Related
Help For A Reset Button Please.
Hello,
I am using Action Script 2.0. I have a caddy in a little Store Website.
I have created some buttons and all is allright.
But I wish to add a reset button in the caddy (just if the buyer has made a mistake...)
I have built the reset button, but I don't know how to make the AS code...
Can you help me please ?
Regards,
Jack.
View Replies !
View Related
Reset Button
i have a timeline with one keyframe for each diff.movies. the movies have a zooming function and it is also draggable.
i want to create a reset button where i want it to go back to its original state assuming i had already used the drag or zoom buttons. my problem is i only used a single keyframe in each movie residing in the same timeline/layer.
ex. frame 3 with keyframe
frame 4 with keyframe
frame 5 with keyframe
i used this code
on (press) {
prevFrame();
}
it works but it jumps to the other movie.
is there a way to make a reset button using only a single keyframe?
sorry for my long question.
flashroiem
View Replies !
View Related
Reset Button?
Would like to add in the functionality of resetting items back to their original screen location after allowing the user to drag n drop them.
Would create a reset button to do this….. but am not sure what code I need…
Thanks in advance,
Cle
View Replies !
View Related
Reset Button
hi am new in the forum...
am trying to learn flash.. i hava a template, i need to make a reset button for the form it have. in this page i did learn how to make a SEND but now i need a reset.
If somebody can help me plz... i ill thanks
View Replies !
View Related
Help On Reset Button
Hello everyone.
I need some help to add a Function to reset the scores. This is my action script. I found this quiz and this is the action script. Now, I want to create a reset button because when I repeat the game, the score is visible and I don't want that. So, I'm thinking of creating a reset button to clear the scores. Or if you can add a Function to clear it.
Please I need help.
Regards,
jazgirl
//--------------------------------------------------------
// Multiple Choice Quiz, By Colin Moock
// Functions and Arrays Version, for Flash MX
// For the accompanying tutorial, see Chapters 9 and 11 of
// 'ActionScript for Flash MX: The Definitive Guide'
//--------------------------------------------------------
// Stop the movie at the first question.
stop();
// ===================
// INIT QUIZ VARIABLES
// ===================
// Store a reference to the timeline that contains the quiz user interface.
var quizTimeline = this;
// Create an array to contain user's answers.
var userAnswers = new Array();
// Create an array to contain each question's correct answer.
var correctAnswers = [3, 1, 3, 1, 1, 4, 1, 4, 2, 2];
// Create a convenience variable to store the number of
// questions in the quiz.
var numQuestions = correctAnswers.length;
// =====================
// CREATE QUIZ FUNCTIONS
// =====================
// Function: answer()
// Desc: Registers the user's answers to quiz questions and
// advances the quiz through its questions.
// Params: choice The user's answer for the current question.
function answer (choice) {
// Add the current answer to the list of user answers.
userAnswers.push(choice);
// Create a convenient variable to store the number
// of the current question.
var currentQuestion = userAnswers.length;
// Display the question and answer in the Output window for debugging.
trace("Question " + currentQuestion
+ ". The user answered: " + userAnswers[currentQuestion-1] + ".");
// If we're on the last question...
if (currentQuestion == numQuestions) {
// ...go to the quiz end frame.
quizTimeline.gotoAndStop("quizEnd");
// And grade the user.
gradeUser();
} else {
// ...otherwise, go to the next question frame.
quizTimeline.gotoAndStop("q"+ (currentQuestion + 1));
}
}
// Function: gradeUser()
// Desc: Tallys the user's score at the end of the quiz.
function gradeUser() {
// Report that we're about to grade the quiz in the Output window.
trace("Quiz complete. Now grading...");
// Create a local variable to track the
// number of questions user answered correctly.
var totalCorrect = 0;
// Count how many questions the user answered correctly.
// For each question...
for (var i=0; i < numQuestions; i++) {
// If the user's answer matches the correct answer.
if(userAnswers[i] == correctAnswers[i]) {
// Give the user a point.
totalCorrect++;
}
// Display the correct answer and the user's answer
// in the Output window for debugging.
trace("Question " + (i + 1)
+ ". Correct answer: " + correctAnswers[i]
+ ". User's answer: " + userAnswers[i]);
}
// Display the final score in the Output window for debugging.
trace("User's score: " + totalCorrect + "/" + numQuestions);
// Create an onscreen text field do display the user's score.
quizTimeline.createTextField("totalOutput_txt", 1, 150, 200, 200, 20);
// Show the user's score in an onscreen text field.
quizTimeline.totalOutput_txt.text = "Your final score is: "
+ totalCorrect + "/" + numQuestions;
// Customize the font face, size, and color of the text field.
var formatObj = new TextFormat();
formatObj.size = 16;
formatObj.color = 0xF65095;
formatObj.font = "_sans";
formatObj.bold = true;
quizTimeline.totalOutput_txt.setTextFormat(formatO bj);
}
// =================================
// DEFINE QUIZ BUTTON EVENT HANDLERS
// =================================
// Code executed when button 1 is pressed.
choice1_btn.onRelease = function () {
// Call answer(), which records the user's choice
// and advances the quiz to the next question.
this._parent.answer(1);
};
// Code executed when button 2 is pressed.
choice2_btn.onRelease = function () {
this._parent.answer(2);
};
// Code executed when button 3 is pressed.
choice3_btn.onRelease = function () {
this._parent.answer(3);
};
// Code executed when button 4 is pressed.
choice4_btn.onRelease = function () {
this._parent.answer(4);
};
View Replies !
View Related
Reset Button
i need a reset button to unload the pic i unloaded. i use this:
on(release){
this._parent.text1.text= "";
this._parent.unloadMovie("container_");
}
}
but den it unload everthing and became a blank stage.
View Replies !
View Related
Reset Button - Help
Hi, Im trying to get this reset button to work. I used to use this code in Flash MX but it doesn´t work in AS2....
Code:
on (press) {
_root.playb.onRelease = function() {
_root.gotoAndStop(1);
}
}
I also tried:
Code:
loadMovieNum("YourFile.SWF", 0);
but the code dosn´t work after I export the .swf to my web server and view it on the internet..(it just disappears when the button is pressed)
and the simple
Code:
gotoandplay("start")
dosn´t work because I need to reload the code....
Can anyone help me to solve this.... ?
View Replies !
View Related
Reset Button
Hi, can anyone see what is wrong with my code. I am trying to clear an input text field once reset is pressed.
I currently have
on (release) {
_root.textfield="";
}
on the reset button
and on the 1st frame of the reset button
function clearForm() {
textfield.text="";
}
Do I need both? I have tried 1 without the other and still no results. Thanks for your help.
View Replies !
View Related
Reset Button
i have a timeline with one keyframe for each diff.movies. the movies have a zooming function and it is also draggable.
i want to create a reset button where i want it to go back to its original state assuming i had already used the drag or zoom buttons. my problem is i only used a single keyframe in each movie residing in the same timeline/layer.
ex. frame 3 with keyframe
frame 4 with keyframe
frame 5 with keyframe
i used this code
on (press) {
prevFrame();
}
it works but it jumps to the other movie.
is there a way to make a reset button using only a single keyframe?
sorry for my long question.
flashroiem
View Replies !
View Related
Reset Button?
Would like to add in the functionality of resetting items back to their original screen location after allowing the user to drag n drop them.
Would create a reset button to do this….. but am not sure what code I need…
Thanks in advance,
Cle
View Replies !
View Related
Reset Button
i have a flash game that displays a start screen, when start is pressed the
following is executed
play.onPress = function() {gotoAndStop(3);}
the person can then play the game
BUT
i want a reset button in game so the user can go back to the start screen at any point
i have this
restart.onPress = function() {gotoAndPlay(1);}
the only problem is when the button is pressed it leaves items from the game (drag and drop dress up puzzle) visable.
how would i go about this? is there a restart movie function? if i reset all x & y values with
hat_mc._x = xstart; hat_mc._y = ystart
the items end up at their start location but the last clicked item is still visable
please help
View Replies !
View Related
Reset Button
heya
I am trying to make a reset button for a drop and drag item. I was wondering if someone can give me an example of the code i would use or a good tutorial place, i searched all over the web for information and found little to nothing =(
Thanks
View Replies !
View Related
Reset Button Command
I want to create a row of buttons. When you click on the first button it highlights and remains highlighted until you click on the second button which highlights and resets the first button back to it's original state. Also when the button is clicked it loads text into a dynamic text box, but I figured out how to do that already.
Some else tried helping me with this, but they didn't elaborate enough and figuring out the actionscript was difficult. If someone could give me more info or explanation on this I would appreciate it. Thanks
View Replies !
View Related
Button Reset Problem.
I have three buttons. Two regular buttons and a reset button to set the values back to the originals. The problem is I want when the button is hit I want t he other button to dissapear and a MC to appear in its place. However what happens is if I keep hitting the false button both MC will play. I have givin a link to the .fla If anyone has any suggestions I am open.
cs2.sunyocc.edu/~majewskm/truefalse2.fla
View Replies !
View Related
Reset Position Button?
Hello All,
I am new here but not to Flash.
I am using Flash 5 and created a 'map viewer' kind of interface where you have directional arrows that allow the user to scroll through the map.
All my buttons work fine execpt for one. I can not get my reset button to reset the map MC back to its original position when the movie first loads.
Any ideas on how I can accomplish this that's not too complex?
Thank you,
Ynygma
View Replies !
View Related
Button Reset Inconsistency
http://virmalo.net/rea_post01/
Sometimes the nav buttons behave correctly and do not replay the movedclip on button "Off" frame and sometimes they do!
You can download the fla file here"
http://www.virmalo.net/index.fla.zip
Any advice?
Is this something with the "Track as Button" "Track as Menu Item" option - I am unfamiliar with it so if you understand that please share you knowledge there as well.
Thanks,
b
brett@virmalo.net
View Replies !
View Related
Reset/Reload Button?
Hello all,
Newbie here and I need help making a button the will reset or restart my movie.
I made a paper doll interactive where the user can click on and drag an article of clothing to the doll, then click to drop.
What I need is a button that will put all the clothes back to the closet without having to take each article individually. I would like it to basically go back to start before anything was moved.
I have the button in place but I don't know what to do next. I would appreciate any suggestion or help. Thank in advance.a
View Replies !
View Related
How Do I Round Up And Get A Reset Button?
Hi, I'm useing flash MX and am making a small calculation app that takes a load of values and outputs a set of results.
It has two push button ui components, a calculate button and a reset button.
It was built on the basis of scott manning's article about math calculations in flash, which is where I followed his format and just entered the calculations necessary.
On the calculate button, all I did was give it a clickhandler 'onCalculate' and created my actionscript in another layer of it's own.
The movie is five frames long.
The code is as follows:
function onCalculate() {
c4 = Number (c4) ;
c5 = Number (c5) ;
c6 = Number (c6) ;
c10 = Number (c10) ;
c11 = Number (c11) ;
c12 = 4*c10/5 ;
c13 = c10/c11 ;
c17 = c6/(1+c13*c5*((c6-c4)/(c4*c4))) ;
c18 = c6/(1-c13*c5*(c6-c4)/(c4*c4)) ;
c19 = c18-c17 ;
c20 = c19/2 ;
c21 = c17*c12/c4 ;
c22 = c18*c12/c4 ;
c23 = c22-c21 ;
c235 = c23/2 ;
c24 = c21/c11 ;
c25 = c22/c11 ;
c26 = c25/c24 ;
}
stop();
so the user inputs all his numbers into the six input fields, presses calculate button and the scripting does the rest, coming to a stop at the end of the movie on frame 5.
This is what I would like to do next, and where I need help.
1) the results are outputed with lots of decimal places. how do I get it to display just a whole number?
I have been told to use 'result = Math.ceil(number)' but I don't know how to use this in the context of the script which I modified.
Also I have asecond UI button called reset. What i'd like this to do is clear everything so that the user can start over. I've tried scripting it to goto and play frame 1, but it doesn't clear the fields. I tried moving the AS for the calculate button to a new set of keyframes on frame 2, leaving frame 1 empty of scripts but this didn't work either!
Can anybody help?
View Replies !
View Related
Reset A Button As It It Was Not Pressed...?
Greetings all,
I am trying to figure out a way to do something but cannot figure it out and I don't even know if it is possible. What I have is this:
_mcOne.onPress = function() {
dosomething
}
What I want dto do is if the user clicks on another button _mcOne is reset as if it was never pressed.
Is this possible?
I am using Flash MX.
Any assistance will be appreciated.
TIA
View Replies !
View Related
[F8] Reset Button Actionscripting
I created a click and drag (newbie here) and I am trying to figure out the reset_btn scripting to reset the answers back to there original place once they completed the activity.
I am using Flash 8 and the scripting I am using is:
reset_btn.onRelease = function() {
circle._x = initx;
circle._y = inity;
pentagon._x = initx;
pentagon._y = inity;
square._x = initx;
square._y = inity;
rectangle._x = initx;
rectangle._y = inity;
}
This is the error I am getting:
*Error** Scene=Scene 1, layer=shapes, frame=1:Line 1: Statement must appear within on handler
reset_btn.onRelease = function() {
Total ActionScript Errors: 1 Reported Errors: 1
Can someone assit me with this?
thanks,
ke
View Replies !
View Related
Submit And Reset Button
in relation with my first post...I already know how to make the drag and drop codes...Now my problem is how will I make it work with the submit and reset button?
The neither the submit and reset button works...Can you please give me some codes..
The scenario:I have 6 pictures that has to be dragged and dropped into each of the 6 boxes
If the pictures are placed in their boxes..the submit button will lead the user to scene notifying that it is right
Thus, the submit button will lead the user to another scene that will tell the user that he/she needs to reset what he/she did if the pictures are placed in the improper box.
Can anyone please be kind to share the code regarding the scenario above?
Thank You
View Replies !
View Related
Reset Button Trouble
Hi,
here is the actionscript that I have for a reset button for a coloring book:
on (release) {
_root.prince_arms.fillColor.setRGB(0xFFFFFF);
gotoAndStop(1);
}
What I need to accomplish is for the fill objects to return back to white at the same time the frame for the story goes back to frame 1.
Is this scripting right?
View Replies !
View Related
Save And Reset Button
hey all. i have a question about this widget that i want to put on my myspace. there are letters that i want to move around, but i can't get them to save and reset. there is a lot of code here (possibly too much), and any help is appreciated.
thank you.
-ap
View Replies !
View Related
Code For A Reset Button
i am trying to make two buttons (the other i will post in another thread). this code is what i have for a reset button:
on (release) {
firstname = "";
lastname = "";
etc = "";
}
but it doesn't seem to be working. I know that the AS(2) has to be put on a button, because of the use of 'on (release)'. Anyhow, any help is appreciated.
View Replies !
View Related
Clear/Reset Button?
Ive made a simple flash application which when buttons are clicked loads external swf's into the scene and keeps them there. is there code for a button i can create to reset everything so that the external swf's get "unloaded" for lack of a better word. hope someone is brainy enough to help me (its as3)
View Replies !
View Related
Reset Button For A Form
I have a form in Flash and I can't seem to find the AS to get the reset button to reset the input text fields to blank if the user wants to start the form over. Here is my .fla everything works except the reset btn. My file was too big so you can dload it at http://www.nucklewebdesign.com/dloads/
View Replies !
View Related
Reset Button Help Needed
Hi. I am learning Flash and I have made a photo puzzle using "drag and drop" actionscripting.
My puzzle has 20 pieces and 20 targets set up on a grid. Everything exists on separate layers but in one frame in the main timeline. The puzzle works and I also have a "hint" button that reveals the completed puzzle. What I am trying to figure out is how I can script a button that resets the puzzle and the photo hint back to their beginning state.
I tried to upload a smaller version of the puzzle for anyone who wants to see it, but it's too large to upload. I have included the actionscript for each puzzle piece and for the hint button below.
Any help would be appreciated. Thanks.
Action script on each puzzle piece (each puzzle piece is a movie clip):
on (press){
startDrag(this, true);
this.swapDepths(100);
}
on (release){
stopDrag();
if
(this._droptarget=="/target1"){
this._x = 353.7;
this._y = 53.1;
}else{
this._x = 218.3;
this._y = 302.1;
}
}
Action script on the hint button:
on (release){
hintMov.nextFrame();
}
//advances one frame in the hint movie clip
View Replies !
View Related
Button Actions Not Being Reset?
hey guys,
alright i am doing a site for monkey rose clothing and am down to one last glitch. when you go to the we the people page, i have a photo gallery with thumbs, all which is loaded from a cms. now the first time you go everything works perfectly, but when you browse to another area of the site, and then back to that page, none of the buttons seem to work (except sometimes only the first click)
check out http://www.monkeyrose.com/html to see what i mean
any ideas? i gotta finish this site today. thanks!
View Replies !
View Related
Reset Button Action
I want to create a row of buttons. When you click on the first button it highlights and remains highlighted until you click on the second button which highlights and resets the first button back to it's original state. Also when the button is clicked it loads text into a dynamic text box, but I figured out how to do that alerady.
Some else tried helping me with this, but they didn't elaborate enough and figuring out the actionscript was difficult. This is what they sent me. If someone could give me more info or explanation on this I would appreciate it. Thanks
code:
------------------------------------------------------------------------
resetButtons = function() {
for (myClip in this) {
if (typeof (this[myClip]) == "movieclip") {
this[myClip].gotoAndStop(1);
}
}
}
------------------------------------------------------------------------
then on each button - the first action you call MUST be resestButton()
View Replies !
View Related
E-mail Php Reset Button
Hello. I was able to successfully put a e-mail form on my site. THANKS LEE!!!! Here is the problem I am encountering... When the message sends, the rest of my advanced buttons do not seem to work. I was wondering how I can set-up a reset button that will "refresh the page". That way, if the message fails or if the person makes a mistake, they can refresh the page. Can someone provide me with the correct code? My coding skills are horrid!
Thanks
View Replies !
View Related
Button Action To Reset Whole Swf?
I have a drag and drop tutorial which I also have a reset button for (to revert the swf back to it's original state).
Because the _root is only on one frame I can't tell it to gotoAndStop to the start. I can work round this by making my swf a moviclip in another swf and loading/re-loading it into a holder but surely there is an action to simply reset a swf back to it's original state?
Thanks
Scott
Flash8Pro
View Replies !
View Related
Reset Variable On Button Release
Hello,
I'm kinda new to variables.
What I'm trying to do is: when a button is released, have the MC timeline that it's in now, goto and play close.
This way it has a nice tweening close effect instead of just dissapearing. Then just as it's closed, I have it telling another timeline to play another MC using the variable reset using the button.
AS in first frame is:
MovieClip = "_root.MAIN_training.entrance_training";
This AS is on a button in the same timeline:
on (release) {
gotoAndPlay("close");
}
on (release) {
MovieClip = "_root.MAIN_training.license";
}
Then at the last frame of that timeline I have this AS on a small MC.
onClipEvent (enterFrame) {
tellTarget ("_root.MAIN_training") {
gotoAndPlay(MovieClip);
}
}
Any help is greatly appreciated.
View Replies !
View Related
|