Reset The 'getTime()' Function
Is there a way to reset the getTime() function.
Base off useing a Reset Button to reset the "Game".
FlashKit > Flash Help > Flash MX
Posted on: 01-09-2003, 08:09 PM
View Complete Forum Thread with Replies
Sponsored Links:
He To Reset GetTime
How do I reset the get time action. When I play my game it just keeps adding up. I want the time to rest if the use chosses to play again. Also How do u rest a whol SWF. Is there a way
View Replies !
View Related
GetTime() Function And Synchronisation With Sound
Hi,
I use the mc_Tween functions by Zeh Fernando. These functions run in time and time is a parameter you give to the functions for duration of an action being completed. My question is now:
If the actions (for example tweenings) are synchronised with sound on my computer, are they synchronised in other computers as well?
I mean if I publish this flash work on the internet, every user experience this synchronisation?
Thanks
View Replies !
View Related
Reset A Function
Hi,
I'm writting a very simple drag n' drop function with multiple buttons to drag. For some reason, my buttons would move together after the function has been called once.
PHP Code:
//BTNS//////////
photo1.onRollOver = function() {
Snapper(photo1, 74.45, 133.2);
};
photo1.onMouseUp = function() {
draggable = false;
};
photo2.onRollOver = function() {
Snapper(photo2, 166.6, 131.7);
};
photo2.onMouseUp = function() {
draggable = false;
};
//SNAPPER FUNCTION 1
Snapper = function (mc, reX, reY) {
// Boundries
mc.onPress = function() {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
draggable = true;
}
};
mc.onMouseUp = function() {
draggable = false;
if (mc._x<207 && mc._y>240) {
// Snap
mc.Reposition(75, 375, 5);
} else {
// Return
mc.Reposition(74.45, 133.2, 5);
}
};
mc.onMouseMove = function() {
if (draggable) {
mc._x = _root._xmouse;
mc._y = _root._ymouse;
updateAfterEvent();
if (mc._x<60) {
mc._x = 60;
}
if (mc._x>650) {
mc._x = 650;
}
if (mc._y<50) {
mc._y = 50;
}
if (mc._y>400) {
mc._y = 400;
}
}
};
};
thanks in advanced,
Al
View Replies !
View Related
Reset Function
Here is my code for my Timer.
onClipEvent (load) {
start = getTimer();
startCount = 60;
}
onClipEvent (enterFrame) {
current = (getTimer()-start)/300;
if (current<startCount) {
elapsed = startCount-current;
bCounter = Math.floor(elapsed);
} else {
_root.speed += 10;
_root.score += 10;
}
}
It's a typical timer now see the last two picces of code that makes my speed and score go up but i dont want it to go up and keep going i just want to add 10 to both i figured in order to stop it i need it to reset.
So anyone know how i can make a rest function i never used it before jus heard of it.
View Replies !
View Related
Reset A Function
Hi,
I'm writting a very simple drag n' drop function with multiple buttons to drag. For some reason, my buttons would move together after the function has been called once.
ActionScript Code:
//BTNS//////////
photo1.onRollOver = function() {
Snapper(photo1, 74.45, 133.2);
};
photo1.onMouseUp = function() {
draggable = false;
};
photo2.onRollOver = function() {
Snapper(photo2, 166.6, 131.7);
};
photo2.onMouseUp = function() {
draggable = false;
};
//SNAPPER FUNCTION 1
Snapper = function (mc, reX, reY) {
// Boundries
mc.onPress = function() {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
draggable = true;
}
};
mc.onMouseUp = function() {
draggable = false;
if (mc._x<207 && mc._y>240) {
// Snap
mc.Reposition(75, 375, 5);
} else {
// Return
mc.Reposition(74.45, 133.2, 5);
}
};
mc.onMouseMove = function() {
if (draggable) {
mc._x = _root._xmouse;
mc._y = _root._ymouse;
updateAfterEvent();
if (mc._x<60) {
mc._x = 60;
}
if (mc._x>650) {
mc._x = 650;
}
if (mc._y<50) {
mc._y = 50;
}
if (mc._y>400) {
mc._y = 400;
}
}
};
};
thanks in advanced,
Al
View Replies !
View Related
Function Wont Reset, Please Help
Hi, i have a combobox(roster) set up with items. when the user selects one of the items, it will call a function(rosterSelect) which will set certain text in to dynamic text boxes depending on what they selected. It works, but.... only once, lol. I can select a item, watch the text show up in the text boxes, then i cant select any more items after that. the function is on the first frame of the layer, and all of this is done on the main time line. any ideas?
here is my code:
function rosterSelect (roster) {
value = roster.getValue();
if (value == "Smartsuite") {
_root.name.text = value;
_root.age.text = "20";
_root.location.text = "Michigan";
_root.aim.text = "smartsuiteDBD";
_root.quote.text = "Zx should die!";
_root.kills.text = "15137";
_root.deaths.text = "11048";
_root.flags.text = "178";
_root.games.text = "104";
_root.nickname.text = "****er of the Goats";
_root.picture.text = "N/A";
}
if (value == "Squadkiller") {
_root.name.text = value;
_root.age.text = "25";
_root.location.text = "Virgina";
_root.aim.text = "squadkillerDBD";
_root.quote.text = "Garth Brooks Rules!";
_root.kills.text = "14836";
_root.deaths.text = "11428";
_root.flags.text = "67";
_root.games.text = "103";
_root.nickname.text = "Mini-Van Man";
_root.picture.text = "N/A";
}
if (value == "Rabbiz") {
_root.name.text = value;
_root.age.text = "20";
_root.location.text = "Washington, DC";
_root.aim.text = "rabbi2153";
_root.quote.text = "";
_root.kills.text = "11361";
_root.deaths.text = "6076";
_root.flags.text = "45";
_root.games.text = "91";
_root.nickname.text = "Funny looking kid";
_root.picture.text = "N/A";
}
if (value == "Kap") {
_root.name.text = value;
_root.age.text = "13";
_root.location.text = "Arizona";
_root.aim.text = "g m p lyng";
_root.quote.text = "";
_root.kills.text = "60451";
_root.deaths.text = "4891";
_root.flags.text = "143";
_root.games.text = "60";
_root.nickname.text = "The Kaptain of Loooveeee";
_root.picture.text = "N/A";
}
}
I just tried updateAfterEvent(); and still didnt work. Any ideas?
View Replies !
View Related
A Reset-function For Components?
Hi,
I have a textArea component that loads new text from a txt file at every new frame.. the problem is that the length of text is very different so some have scrollbars and other has not, in some cases when the user reads the text and scrolls down then the decides to press the "forward" button and read new text, the textArea do not jump back up to the beginning but instead leaves the the scrollbars half way down... wich makes the new text a little confusing as it starts half way down. is there some way that I can reset the component, I tried both redraw and invalidate , but Im not shure I understand these classes... cant get them to do what I want anyway..
Thanks for any help you can give..
View Replies !
View Related
Random Function, How To Reset?
Hey guys. I'm working on a program I use in class to keep my kids' heads from exploding on a daily basis. The major aspect of this is a grid with nine text boxes which get randomly filled with vocab words, grammar problems, etc. (language arts class) for them to puzzle over.
Here's my problem. It's kind of complicated. I've got three types of functions.
The first chooses a number from 1 - 5, and based on the outcome, decides whether to stick vocab, grammar, or prefixes into the boxes. Once this has been decided, it runs the next function, which randomly selects (out of 75 or 50 or 20) the one item to stick in each box. I save the item (as a string) to the variable I want to use, and then I assign that item to each individual text box. The outcome looks something like this:
boxfill();
_level0.box_1 = selection;
boxfill();
_level0.box_2 = selection;
boxfill();
_level0.box_3 = selection;
and so on for nine boxes. boxfill() is the function that decides WHAT goes in the box, and "selection" is what it has decided on. Here's the weird thing: it will re-randomize to choose whether it should stick a vocab, grammar, or prefix into the box - but then it KEEPS the same one it chose for the last one. God this is so confusing trying to explain it. (example: for nine boxes it will choose three vocab words, three grammar problems, and three prefixes, but each vocab word is the same, each grammar the same, etc.) Is anyone following this?
Basic question: How do I reset the "randomization" so that it returns a new item? I'm banging my head against the wall. (My seventh graders are, too.)
View Replies !
View Related
Function Reset Question
I'm using this function to fade out some movie clips on press
Code:
function community() {
community = new Array(1, 2, 3, 6, 9, 11, 13, 16, 7);
for (z=0; z<community.length; ++z) {
i = community[z];
_root.cylinder["cylinder_small"+i].fadeout(30);
}
}
on(press){ community()}
It works fine but when movie clips are set back to _alpha 100 and I press that function again, and it doesnt work. It only works first time. Why?
View Replies !
View Related
Reset Using GetTimer Function
any help please ? I'm creating an interactive art installation using flash to control an animation via an external web-cam. but I'm having problems reseting the animation if it is in active for say 7 minutes. any help would be much appricated.
Code:
webCam = Camera.get();
myVideo.attachVideo(webCam);
myVideo.smoothing = 10;
myVideo._alpha = 0;
webCam.setQuality(16384, 100);
webCam.setMotionLevel(20, 50);
webCam.setMode(1024, 768);
var aImages:Array = new Array(mcOne, mcTwo, mcThree, mcFour, mcFive, mcSix, mcSeven);
var resetTimer:Number;
var nCurrentIndex:Number = 0;
x = 0;
function motion(mode) {
x++;
return mode;
}
// fade image function
function fadeImage(mcImage:MovieClip):Void {
mcImage._alpha -= 10;
if (mcImage._alpha<=0) {
clearInterval(nInterval);
nCurrentIndex++;
}
updateAfterEvent();
}
//reset image function
function resetImage(mcImage:MovieClip):Void {
for (var i:Number = 0; i<aImages.length; i++) {
aImages[i]._alpha = 100;
}
nCurrentIndex = 0;
}
// activity function
webCam.onActivity = function(mode) {
if (motion(mode) == true) {
clearInterval(nInterval);
nInterval = setInterval(fadeImage, 200, aImages[nCurrentIndex]);
}
if (nCurrentIndex == 7) {
resetImage();
clearInterval(nInterval);
nInterval = setInterval();
}
trace("there is activity");
if (motion(mode) == false) {
trace("there is NO activity");
getTimer();
if (getTimer()>=70000) {
trace("Start Timer");
resetImage();
}
}
}
View Replies !
View Related
Complete Reset Function
Hey all.
I'm almost embarresed to ask this, but this is the newb forum and I'm a newb.
I have a project where I'm making an animation for a client, a projector basically.
There's non-scripted animation going on in the main timeline and the basic stop action at the end.
On the main timeline there are several movieclips with individual animations that needs to be in movieclips due to transitions going on on the main timeline.
the movieclips also contain stop actions at the end since the need to stop in a finished state.
Now I want a reset button that plays the projector from the start all over.
A simple gotoAndPlay doesn't work since that means that all movieclips on the main timeline is already animated and would stay on the stop frame.
I've read my books and searched the net but my lack of AS knowledge has prevented me from finding a solution. So I now crawl to the cross and beg you for help.
How should I write this action so that it goes to frame 1 of the main timeline and plays from there, but also resets all movieclips to their frame 1.
Grateful for help, regards / Johan
View Replies !
View Related
Reset Timer Function After 3 Minutes?
How would I get a timer function to reset after no buttons were pressed for 3 minutes?
Right now I have my timer starting on load, and then when a button is pressed, it stops it. I basically want to restart it after 3 minutes.
the code I have:
[PHP]var timer:Timer = new Timer(5000);
timer.addEventListener(TimerEvent.TIMER, playSlides);
timer.start();
function playSlides(event:Event):void{
var i:Number = Math.round(Math.random()*slideinfo.length());
loader.load(new URLRequest(xml.slide.@data));
caption.text = xml.slide.@caption;
}[/PHP]
then the timer.stop(); attached to the buttons...
thanks
View Replies !
View Related
Reset Timer Function After 3 Minutes?
How would I get a timer function to reset after no buttons were pressed for 3 minutes?
Right now I have my timer starting on load, and then when a button is pressed, it stops it. I basically want to restart it after 3 minutes.
the code I have:
[PHP]var timer:Timer = new Timer(5000);
timer.addEventListener(TimerEvent.TIMER, playSlides);
timer.start();
function playSlides(event:Event):void{
var i:Number = Math.round(Math.random()*slideinfo.length());
loader.load(new URLRequest(xml.slide.@data));
caption.text = xml.slide.@caption;
}[/PHP]
then the timer.stop(); attached to the buttons...
thanks
View Replies !
View Related
FLVPlayback_Captioning Reset Or Track Function
Hi,
Couldn't find this anywhere online. What kind of reset function can I use to return to the last played caption node of a tt styled xml file. The xml file is loaded by a FLVPLayback Captioning component on the stage? I believe I need to use the track function?? And how do I set the track parameter in a tt styled xml file? Am I using the wrong XML file style (tt vs. DOM)?
Thanks in advance.
View Replies !
View Related
Using A Timed Function To Reset A Movie Clip
Hi there,
This question is a little easier than my last one, but I still need help with it. I am working with something where a movie clip is called on to display addresses on different frames. When a user clicks on the dot for a certain address, it calls the addresses movie clip and goes to that address. What action script can I use to make it so that if no one clicks on the address information in a certain time period, the movie clip that has the addresses in it goes back to its first frame which is blank?
I am still very new to actionscript, obviously, so any help is very welcome and appreciated.
Thanks, Jeremiah
View Replies !
View Related
GetTime?
Is there any way to have Flash find out what time it is, and tell the .swf to go to a certain frame based on the time?
For example, say I have a 60 frame animation of a sun setting, and I want it to play a frame every minute from 6:00 until 7:00. How would I do this?
Thank you,
DaVuLf
View Replies !
View Related
Value Of GetTime?
hi i have a function that kinda look like this:
//////////////////GTA4//////COUNTDOWN////////////////
onEnterFrame = function () {
eventDate = new Date(2007, 9, 16);
eventMsecs = eventDate.getTime();
currentDate = new Date();
currentMsecs = currentDate.getTime();
timeLeft = eventMsecs-currentMsecs;
//
timeleft_txt.text = timeLeft;
};
//////////////////////////////////////////////////////////////
it works but only counts down in msecs though....
But heres the strange thing:
after the function i put in:
if (timeLeft<=0) {
trace ("YEAH");
}
or something like that
AND IT TRACES?
i try with
if (timeLeft>=0) {
trace ("YEAH");
}
AND IT TRACES
so i try
if (timeLeft==0) {
trace ("YEAH");
}
NO TRACE
no trace is also if i try >
or <
View Replies !
View Related
Countdown With GetTime?
I found a script that displays the time
code>>>>>>>>
onClipEvent (load) {
days = new Array('Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday');
months = new Array('01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12');
timedate = new Date();
}
onClipEvent (enterFrame) {
hour = timedate.getHours();
minutes = timedate.getMinutes();
seconds = timedate.getSeconds();
todaydate = timedate.getDate();
day = timedate.getDay();
dayname = days[day];
month = timedate.getMonth();
monthname = months[month];
year = timedate.getFullYear();
if (length(minutes) == 1) {
minutes = "0"+minutes;
}
if (length(seconds) == 1) {
seconds = "0"+seconds;
}
currenttime = hour+":"+minutes+":"+seconds;
currentdate = todaydate+"/"+month+"/"+year;
fulldate = year+"."+todaydate+"."+month+"."+currenttime;
delete timedate;
timedate = new Date();
setProperty ("/stunden", _rotation, 360/60*hour);
setProperty ("/groß", _rotation, 360/60*seconds);
setProperty ("/minuten", _rotation, 360/60*minutes);
}
>>>>>>>>
is there anyway to manipulate it to countdown to July 1st... my gf's Birthday?
thanks
View Replies !
View Related
GetDate From GetTime
I have the date in the number of seconds past since midnight on January 1, 1970 and i what to transform them in day, month, year date....
for example: this is the number of seconds 1145966451 and i want to transform it in to date
In flash i found only the revers function "getTime()" that gives me the number of milliseconds between midnight on January 1, 1970.
pls help!
View Replies !
View Related
GetTime() From Another Source?...
I was woundering if anyone has ever run into the problem when they are useing the getTime(); command but wanted it to stay in a specific time zone no matter what zone the user is browsing in. So basically I want it to display central time, but if a user browsing my site is in Pacific time, I want the time to display in central, even if he/she tries to change the the clock on his/her computer. So I think the only other way to do this would get the time from another source? I tried getUTCTime(); but that time still changes if the user changes the clock on his/her computer. I was thinking if I could do something like getTime(); and inside the () , mabey I could put my IP address? I dont know, kinda stuck on this one. Thanks for any suggestions!
View Replies !
View Related
GetTime > LoadMovie 1, 2, Or 3
Hi,
I'm having trouble figuring out how to use getTime to load a certain movie (out of 3) within a given time of day.
I have an MC in a swf with these actions:
onClipEvent (enterFrame) {
currentTime = new Date();
if (currentTime.getHours() < 1100) {
loadMovie("swfs/1.swf", "vid");
} else {
loadMovie("swfs/2.swf", "vid");
}
if (currentTime.getHours() >= 1100 < 1700) {
loadMovie("swfs/3.swf", "vid");
} else {
loadMovie("2.jpg", "vid");
}
}
WHat I'm trying to do is this:
If it's anytime before 11am, I want it to play 1.swf
If it's anytme after or equal to 11am, and before 5pm, play 2.swf
Anytime after 5pm, play 3.swf.
I'm not sure if it's my math, the format of time, or the code altogether.
I appreciate the help if anyone can figure it out.
View Replies !
View Related
Date.getTime Mystery
I had an idea of using date.getTime to synchronize time between different clients. Calculate a value of difference. The strange thing is that this difference is changing after time when I'm using getTime in some tests. I thought that the clock should be realiable, is it something that I missed in functionality of getTime/milliseconds since epoch?
kind regards
Tomas Eriksson
View Replies !
View Related
GetTime() And Sound Synchronisation, Please Help
Hi,
I use the mc_Tween functions by Zeh Fernando. These functions run in time and time is a parameter you give to the functions for duration of an action being completed. My question is now:
If the actions (for example tweenings) are synchronised with sound on my computer, are they synchronised in other computers as well?
I mean if I publish this flash work on the internet, every user experience this synchronisation?
Thanks
View Replies !
View Related
Date.getTime() Doubt
Any idea why theese two throw down the same value?
var da1:Date = new Date(2007, 5, 31);
var da2:Date = new Date(2007, 6, 1);
trace(da1.getTime()); //output 1183266000000
trace(da2.getTime()); // output 1183266000000
Cheers
Gorka
View Replies !
View Related
Huge Doubt About Date.getTime();
Any idea why theese two throw down the same value?
var da1:Date = new Date(2007, 5, 31);
var da2:Date = new Date(2007, 6, 1);
trace(da1.getTime()); //output 1183266000000
trace(da2.getTime()); // output 1183266000000
Cheers
Gorka
View Replies !
View Related
Accuracy Difference Between GetTimer And Date.getTime
I came accross another issue regarding the accuracy between the getTimer and date.getTime functions.
I use this simple script (AS2)
PHP Code:
stop();//START TIMERvar tObj:Object = new Object();tObj.startDate = new Date();tObj.startDateTime = tObj.startDate.getTime();tObj.startTimer = getTimer();var gTimerID:Number;gTimerID = setInterval(this, "checkT", 100); function checkT() { tObj.msTimer = getTimer()-tObj.startTimer; var my_date:Date = new Date(); tObj.msDateTimer = my_date.getTime() - tObj.startDateTime; tObj.diffTime = Math.abs(tObj.msTimer-tObj.msDateTimer); trace("difference:"+tObj.diffTime);}
What happens if you let this simple app running is that the trace will show that the difference between the getTimer and date.getTime results slowly increases.
I would assume some inaccuracy, but not one that would slowly increase during the lifetime of the application.
The reason I want to compare the two values is that I want to see if someone is tampering with the application speed with a program such as Cheat Engine. And I noticed the date.getTime function isn’t affected by that program, but the getTimer function is.
View Replies !
View Related
Problem With Loading XML Using ?nocache=" + New Date().getTime().
I'm loading an XML file with ?nocache=" + new Date().getTime() added to the end of the file name: to make a fresh copy be loaded each time.
OK... this works fine.
BUT... what I need to do is load my SWF file from another domain.
This was a little tricky. But I've now solved.
All is working fine and loads in all browsers.
Only one problem: damn Internet Explorer!!!!!!!!!!!!!
(Works on Firefox and Mac OK.)
It loads up first time OK.
But... thne when I refresh... this causes problems.
I spent a LOT of time figuring out what the damn problem was!
I've found out the problem is the ?nocache=" + new Date().getTime().
If I replace with the full URL: http://www.mydomain.com/myXML?nocache=" + new Date().getTime()... then the problem is solved.
The only thing is: I can't do this.
I'm building a mini system.
The only way to make things work I can see are to compile a new version of the SWF file everytime!!!
I can't really do this.
Any ideas how I can fix my problem?
Is there any other way of loading a fresh copy of my XML file?
Thanks.
OM
View Replies !
View Related
Problem With Loading XML Using ?nocache=" + New Date().getTime().
I'm loading an XML file with ?nocache=" + new Date().getTime() added to the end of the file name: to make a fresh copy be loaded each time.
OK... this works fine.
BUT... what I need to do is load my SWF file from another domain.
This was a little tricky. But I've now solved.
All is working fine and loads in all browsers.
Only one problem: damn Internet Explorer!!!!!!!!!!!!!
(Works on Firefox and Mac OK.)
It loads up first time OK.
But... thne when I refresh... this causes problems.
I spent a LOT of time figuring out what the damn problem was!
I've found out the problem is the ?nocache=" + new Date().getTime().
If I replace with the full URL: http://www.mydomain.com/myXML?nocache=" + new Date().getTime()... then the problem is solved.
The only thing is: I can't do this.
I'm building a mini system.
The only way to make things work I can see are to compile a new version of the SWF file everytime!!!
I can't really do this.
Any ideas how I can fix my problem?
Is there any other way of loading a fresh copy of my XML file?
Thanks.
OM
View Replies !
View Related
[MX04] Problem With Loading XML Using ?nocache=" + New Date().getTime().
I'm loading an XML file with ?nocache=" + new Date().getTime() added to the end of the file name: to make a fresh copy be loaded each time.
OK... this works fine.
BUT... what I need to do is load my SWF file from another domain.
This was a little tricky. But I've now solved.
All is working fine and loads in all browsers.
Only one problem: damn Internet Explorer!!!!!!!!!!!!!
(Works on Firefox and Mac OK.)
It loads up first time OK.
But... thne when I refresh... this causes problems.
I spent a LOT of time figuring out what the damn problem was!
I've found out the problem is the ?nocache=" + new Date().getTime().
If I replace with the full URL: http://www.mydomain.com/myXML?nocache=" + new Date().getTime()... then the problem is solved.
The only thing is: I can't do this.
I'm building a mini system.
The only way to make things work I can see are to compile a new version of the SWF file everytime!!!
I can't really do this.
Any ideas how I can fix my problem?
Is there any other way of loading a fresh copy of my XML file?
Thanks.
OM
View Replies !
View Related
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?
View Replies !
View Related
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!
View Replies !
View Related
[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.
View Replies !
View Related
[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.
View Replies !
View Related
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!
View Replies !
View Related
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
View Replies !
View Related
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,
View Replies !
View Related
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 = "";
}
}
View Replies !
View Related
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
View Replies !
View Related
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(){
?????????
};
View Replies !
View Related
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.
View Replies !
View Related
|