Reset
Hello. I have some code on a button to enlarge a movieclip in my movie. pictures._xscale = pictures._xscale + 5; pictures._yscale = pictures._yscale + 5;
and similar code on another button to make it shrink back down.
The problem comes when someone enlarges the picture really large (like a zoom) that it takes forever to bring it back down to the original size. Is there a way to "reset" it back to original size whether it is large or small?
FlashKit > Flash Help > Flash MX
Posted on: 07-26-2003, 11:59 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
One Mc Causes All Other Mc's To Reset?
How can I script it so that a movie clip (which contains a button) will "reset" or temporarilly stop all other mc's on the same stage from playing?
Thanks!
How To Reset The Swf
Is there a way to reset the entire swf from scratch without using
Code:
loadMovieNum("NameOfFile.swf", 0);
What I want to do is reset it without using the filename (NameOfFile.swf)
Maybe there's a way to do it using level0 or _root. or something. Any suggestions at all will help me to the extreme!
[F8] Reset Everything
In a game I'm making, when you die I want to give you the option to start over.
The problem I have is that timers, and everything else is just as it was before.
I've tried several different ways to get it to reset everything, but none of it works (which seems odd to me)
Is there some function to reset everything?
Thanks.
[F8] Reset Help
Hey, I'm creating a counting activity in which you input what you want to count by and what number to start at.
The chart goes up to 100. I have 100 movieclips that flip to green when clicked on and when you click reset, they should all flip back. The problem is they don't flip, with the exception of the last number clicked. When this happens, it flips but also duplicates that movieclip and you can see it underneath. I've tried many things now and done lots of searches but have been unable to fix it without the last one flipping and duplicating.
The file is too large to upload but this is my reset function.
code: this.btnReset.onRelease = function(){
countBy_txt.text="";
startAt_txt.text="";
trackspots=[];
Correct=[];
Notright=[];
gotoAndPlay(1);
resetSquares();
}
function resetSquares():Void{
square_1.gotoAndPlay(12);
square_2.gotoAndPlay(12);
square_3.gotoAndPlay(12);
square_4.gotoAndPlay(12);
}
There's more but it's just repetitive.
That clears all my arrays and textboxes, as well as lets the user start again but with the problem already mentioned.
Any help is greatly appreciated. Thanks in advance.
Don't Want It To RESET
i really need help on this one...
i'm trying to build a game on Flash MX, which I almost accomplished.
It's a space-invaders like game.
my problem is that the game resets itself, or goes to the next scene, or goes to the first frame of the first scene, apparently because i push too many buttons altogether.
player moves with arrow-keys, and shoots with CTRL-key.
If I hold CTRL down and move left, and then suddently change direction to right, it resets.
please help me if you can.
thank you!
I Want To Be Able To Reset My Swf
Hi everyone
Right im having a right hard time with flash at the mo.
The problem is that i want to be able to reset my swf. I am making a game and when it is gameover and you try to play the game again, everything stays the same. The score, movieclips etc
I am using the following code on a button
ActionScript Code:
on (press){
unloadMovie("Project Freebird_06.swf");
loadMovie("Splash.swf", 0);
}
on (release){
fscommand("Quit");
}
It loads another swf called "Splash" and from that swf i have loaded the game swf, but it still stays the same.
It is totally stupid!
I just want to know if there is a way of just resetting an SWF
Thanks in advance
Is There A Way To Reset An AS?
I have an actionscript guessing game. And once u lose the user will be given an option of playing again by pressing the replay button.
My problem is, is that when they do replay the game, you can see what they did when they played the game first time thru. So is there a way to reset the AS once they pressed the replay button? or is it more of my AS coding that is making the problem??
thanks,
Reset The Value
I have a Number:textinput component on the stage with a default value of 20 and a label component next to it. If a user types in a number >= 51 the label displays "Maximum is 50". My question is: How can I reset the textInput back to the default value if a user types in a number >= 51? Here is my function so far:
Attach Code
private function errorCheck():Void
{
var ispercenttohi:Number = Number(percent.text);
if (ispercenttohi >= Number(51)) {
alertBox.text = "<font color='#ff0000'>Maximum is 50%";
} else {
alertBox.text = "";
}
}
Reset
hullo
can anyone please help me with my movie ??
i have looked everywhere trying to find the answer
what i am trying to do is to reset it to go back to the beginning
layer one has the mc
layer two has the buttons listed below on it
x
xscale
y
yscale
vis false
vis true
alpha
reset
these buttons all work -but not the reset button --is there a code that will reset the the mc so that i can repeat the functions
Reset
This should be simple but for a newbie ... Lets say there are 4 mc's in an array which can be dragged so far ao good , how do I get it to go back(reset) to the original positions(x and y co-ordinates) pressing a button?
Looks something like this so far...
var clips:Array = new Array(tree1, tree2, tree3, tree4);
for (var i = 0; i<clips.length; i++) {
clips[i].onPress = function() {
this.startDrag();
};
clips[i].onRelease = function() {
this.stopDrag();
};
}
reset.onPress= function(){
?????????
};
Reset MC
Can someone please show me an example of reseting a movie clip and then having it repeat the actionscript again continously? I'm using AS2.
Reset Swf
Hi I have built a drag and drop game but can't think what code to use to reset it without reloading the whole page. Any ideas?
http://www.robfrost.co.uk/temp/drag.html
Reset GetTimer() ?
Hi,
I'm using the getTimer function on about frame 5 of my movie but it seems to start on about 3 secs because of this. Is there any way to reset the function to zero?
Thanks.
Counter Reset
Hi there.
I have a movieclip where I loop a couple of frames
with this script:
----------------------------------------------------
// COUNTERSCRIPT
counter++;
if (counter<5) {
tellTarget ("_root.vante") {
gotoAndPlay ("snurr");
}
} else if (counter == 5) {
tellTarget ("_root.vante") {
gotoAndPlay ("tillbaka");
}
}
---------------------------------------------------------
When the loop has been completed five times,
the script tells Flash to go back to the beginning of the clip.
Now, the problem is, that whenever the user want to go back to this loopscript (which he/she can so simply
by clicking on the movieclip), then the counter has already fulfilled its task right? It has already counted
to five. So therefore, the next time flash arrives at
the script, the loop does not happen.
I wonder if there is a way of resetting the counter
so that the script may be reused as before?
Thankful for answers
Help Me Reset The Timer ?
I have a problem of using a timer with linked swf files. I want the timer in the 2nd swf file and not the first. even though it is only created in the 2nd file it starts as soon as the game starts (the first swf file). I believe that you cant reset the timer so I figure an alternative way to accomplish what I want be to set a variable in the first swf file to the timer (x), then in the 2nd swf file create another variable (y) equal to getTimer - x
that is
fileOne -> fileTwo
x = getTimer -> y = getTimer - x
Im pretty new to this whole flash thing.. how do I pass the variable x
onto the second swf file? the two are linked via an
onMouseEvent(release) event/ loadMovieNum. Also how do I reference the variable in the 2nd file?
thanks
Skek
When Does A Variable Get Reset?
Hello, hope somebody can help me with this.
I hav a movie clip with a dynamic text box within another movie clip.
I can set that variable to the value i want, like so:
_root.Button1.Field1 = "test"
Now, when i animate Button 1 ( a simple motion tween), the content of my text is gone when the animation is done. Should i set the variable in the first frame of Button1, so i gets reloaded all the time? Is there a way to keep the content of my variable without reloading the data?
Thanks.
GetTimer() - Reset?
Hello to everyone!
Does anyone know if it's possible to reset the getTimer() function while staying within a movie?
I'm creating a racing game, and need the time to reload each race, however even when the timer is placed in a seperate swf and loaded/unloaded, the timer remains!
Does anyone know how to reset the getTimer() function?
-- Or know the alternative -- use a date object to set the amount of milliseconds at the start, and then check that from the difference at the end??
Thanks!
Submit | Reset
I can't get my submit and reset FLASH buttons to work when embeded in my PHP form. Here's what I have for the submit button:
on(release){
getURL("handleForm.php","","POST")
}
And this for my reset button:
on(release){
input = ""
textarea = ""
}
But it only send me empty variables everytime. These buttons work when I place them in my Flash form, but not when embeded. Can anyone point me in the right direction??
Reset Timer
hey guys whats the easyest way to reset the timer....???
How To Reset A Timer
my code goes like this
onClipEvent (enterFrame) {
now = Math.round(getTimer()/1000);
if (now == 7) {
//reset timer
}
}
i want it to restart at 0
Reset GetTimer()
Ok it all works but when I reset it dosen't I know I am reseting it in the wrong place or something stupid like that .
Code:
onClipEvent (load) {
start=getTimer()/1000;
end=10;
}
onClipEvent (enterFrame) {
if (_parent._currentframe>1) {
now=getTimer()/1000-start;
if (now>=end) {
_root.eventsadd=false;
}
}
// here I want the timer to start back to 0;
//so when it is called again it will do the if statement
start=getTimer()/1000;
}
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.
How Can I Reset The Movie
hullo --i have f5
can anyone please help me with my movie ??
i have looked everywhere trying to find the answer but to no avail
what i am trying to do is to reset it to go back to the beginning after i have clicked all the buttons
layer one has the mc which is a rotation
layer two has the buttons listed below on it
x
xscale
y
yscale
vis false
vis true
alpha
reset
these buttons all work -but not the reset button --is there a code or function that will reset the the mc so that i can repeat the functions buttons as often as i may like to ,
thankyou for any help Terry
Reset GetTimer() Value ?
I want to reset getTimer() value every time someone click on some link on my page so i can use this value in preloader of that external .swf. How can i do this???
thanks
How To Reset Get Time ?
hi all
i have a flash card with 2 scenes in the main scene after 35 seconds there will be an action and after 50 secons there will be another action
i use this action
_root.onEnterFrame = function() {
x=Math.floor(getTimer()/1000)
if (x ==35) {
_root.water.kalam.play();
} else if (x==70) {
_root.water.kalam.play();
}
};
but when i insert the preloading scene every thing will be wronge coz the time will count with the first scene how can i reset the time in the first frame from the main scene i use this code and again nothing happen
function timer() {
var x = getTimer()/1000-_root.resetMe;
return x;
}
function reset() {
_root.resetMe = getTimer()/1000;
}
_root.onEnterFrame = function() {
x = Math.floor(timer()/1000);
if (x == 36) {
tellTarget ("/main/water/klam") {
play();
}
tellTarget ("/main/water/klam1") {
play();
}
} else if (x == 73) {
tellTarget ("/main/water/klam") {
play();
}
tellTarget ("/main/water/klam1") {
play();
}
} else if (x == 129) {
tellTarget ("/main") {
play();
}
}
};
so can i reset the time in the first frame from the main scene
How To Reset Get Time ?
hi all
i have a flash card with 2 scenes in the main scene after 35 seconds there will be an action and after 50 secons there will be another action
i use this action
_root.onEnterFrame = function() {
x=Math.floor(getTimer()/1000)
if (x ==35) {
_root.water.kalam.play();
} else if (x==70) {
_root.water.kalam.play();
}
};
but when i insert the preloading scene every thing will be wronge coz the time will count with the first scene how can i reset the time in the first frame from the main scene i use this code and again nothing happen
function timer() {
var x = getTimer()/1000-_root.resetMe;
return x;
}
function reset() {
_root.resetMe = getTimer()/1000;
}
_root.onEnterFrame = function() {
x = Math.floor(timer()/1000);
if (x == 36) {
tellTarget ("/main/water/klam") {
play();
}
tellTarget ("/main/water/klam1") {
play();
}
} else if (x == 73) {
tellTarget ("/main/water/klam") {
play();
}
tellTarget ("/main/water/klam1") {
play();
}
} else if (x == 129) {
tellTarget ("/main") {
play();
}
}
};
so can i reset the time in the first frame from the main scene
Reset GETTIMER() ?
i got this timer thing working but i want to be able to reset it, ttried forcing the text box varible to 0 but it seems to be over written by the getTimer function.
any ideas?
Counter Reset
I was just wondering what would be the best way to reset a counter?
the situation I have here is that I have a little 10 question quiz game.
On the main timeline, there is only ONE frame.
When the counter goes up to 10, a mc would be trigger to play.
This mc has a button in it that would ask whether they would like to play again.
So once they click on that, I would like it to reset the counter, but it seems that it just exits from the mc and back to the main timeline, and DOES not reset the counter.
***********************************
Also, there is this other button on the mc that if they click onto, it will bring them to the nextscene(). But for some reason it doesn't, instead, just goes back to the main timeline. However if I specify to gotoAndPlay ("scene name"), it worked out fine.
MyColorObject Reset?
Senocular helped me with the script below - as the MC contains a button with a rollover I want the NormColour have no effect so the rollover can be seen, ie if the result id false cancel the colour effect.
Any suggestions would be cool
Thanks Oll
onClipEvent (load) {
myColorObject = new Color(this);
atcolour = 0xFF0000;
normColour = 0x009933;
}
onClipEvent (enterFrame) {
if (_root.curFile=="02") {
myColorObject.setRGB(atcolour);
} else {
myColorObject.setRGB(normColour);
}
}
>>> Reset Timer?
is there a way to reset a timer you use..
---
elapsed = getTimer();
---
how do I reset it?
thanks!
Panels Keep Getting Reset
I notice that when you open many other flash files (FLA) that usually belong to someone else, Flash removes all the panels from view upon opening.
I have to goto WINDOW >> PANEL SETS >> am layout
in order to get it back to the way I like them. Is there any way to prevent this or is there a hot key to get my panel set back?
Reset Variables
I have 6 buttons and 6 variables 1 variable on each button.
I want to be able to reset the variables using another button so i can start the process again. does that make sense?
I have tried doing this
on (press) {
_level0.text |= 0;
}
but it doesnt work.
Please help
Reset A While Loop
Hi All
Hope you can help...
I have a while loop that looks like this
n = 1;
while (n < 30) {
if (this.hitTest(_root.interface["word" + n]) and (this["playing" + n] != 1)) {
_root.interface["word" + n].gotoAndPlay("go");
this["playing" + n] = 1;
}
n++;
}
It basically sets the variable playing to 1, so that it can only be played once through the animation. Im having difficulty though resetting the variable so that it can be played again, by clicking a play again button.
Hope that makes sense...
X And Y Properties, Can You Reset Them
Is there a way to reset a _levels x and Y properties to be 0,0 at it's center and not at it's top left ??
I'm using this code to reposition my _level,
but I'd like to have the X and Y refer to the center of the level rather than it's upper left corner.
setProperty("_level100", _x, 320);
setProperty("_level100", _y, 240);
Scrollbar Reset
I have a page that changes the text within a textbox using AS. Unfortunatley when the text changes the scrollbar remains in the same place. Is there a way to bring the scrollbar back to the top onPress. Thanks.
the url is http://www.bluescreendesign.com/ljcl/
Reset FComboBox
What function would I use to reset a combo box (flash componants)
Thank you
GetTimer Reset
can i somehow reset getTimer() function..
so, for example when i come to frame 5 it starts counting, can it be achieved somehow?
Reset Counter
In my game I got a kill counter. It counts how many dragons you have killed. But then time is up and you gonna play the game again the counter is not reseted! You got your frags from the last round from the begginig of the new round. How should I do to reset the counter?
And now a bad (bader) question. How do I get an image under my name in FK....
How To Reset The Movie ?
Hi,
How can i Settimeout for a movie clip ?
example:
when a movie is running if there is no user interaction or if it is unattended for say 20 seconds i need movie automatically gets reset to its original (start) position.
Pls help me!
Regards
zab
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.
A Reset Button
Hi !
Could someone check my file and tell me how to reset
the value total with a button ?
How Do I Reset A ComboBox?
I am building a mail form in Flash MX and I would like to know how to reset my Components. I know how to reset inputText boxes but what should I do with a comboBox?
Please Help. Can't Get Buttons To Reset...
I just want to reset buttons!!!!
I have a music player that uses a play and a stop button. when a user clicks on the play button the sound plays, when the sound ends i want the two buttons to reset, so stop is diabled and play enabled. I've tried usinng a number of sound attributes including onSoundComplete but nothing works, and it's driving me mad.
Im now trying to intialise a timer heres what i've got on my play btn.....
on (release){
stop_btn._visible = true;
play_btn._visible = false;
startTime = getTimer();
waitTime = 20000;
if (startTime >= waitTime) {
stop_btn._visible = false;
play_btn._visible = true;
}
}
Please someone tell me how i can get round this, i really can't this working. Cheers
Timer Reset
Hi,
I am trying to have a stop watch in my movie, however, i am not too sure how to reset the time. The stopwatch will be used to display the paused time. so everytime when I hit the pause button, the stopwatch will start counting and once I hit resume, the timer will reset the stop watch to zero and go back to the orginial movie.
I have attached a sample of what I did...pls help me out! THANKS!!!
Reset Scroller?
I'm a novice with Actionscript, so please be patient with me. I modified Kac's Side Scroller (http://www.flashkit.com/movies/Basic...dex.php?chk=no) for an educational website I'm working on. Each box tells a part of the story. It works great, except I recreated the scroller in another scene of my movie, and it doesn't automatically reset itself. In other words, if you move through the first scroller, then go to next scene, the second scroller thinks it can only move backwards the number of spaces you moved forwards with the first scroller. If you moved all the way through the first scroller (which any user should), the second scroller refuses to advance. Is there a simple actionscript I can add that will solve this? Any help is appreciated.
Reset Timer?
This is giving me a headache...
How do you reset Flash's getTimer?
I checked out the flash example but i dont quite understand it...
Please help me this is important!
Reset Button
Is there any such action script that will reset a frame when you press a button?
How To Reset A Scrollbar
I need help on resetting a scrollbar. I am using a scroll text box tutorial found at:http://www.flashkit.com/tutorials/In...-640/index.php
I have modified the code a bit too fit my needs but I am unable to reset the scrollbar back to the top. I want it to work as if someone scrolls down, the scroll bar would go back to the top depending on a condition such as pressing a button.
Any help would be greatly appreciated, thank you.
|