The Enchanted Cave 2
Delve into a strange cave with a seemingly endless supply of treasure, strategically choos
4.39 / 5.00 38,635 ViewsGhostbusters B.I.P.
COMPLETE edition of the interactive "choose next panel" comic
4.09 / 5.00 15,161 Viewshey every one! i was just wondering how it would be possible to have a 2 random number generators that can remember the different combinations between the two and if it gets those two numbers again, it re does it?
like it dials 2 and 3.
and then is dails 2 and 3 again then it would keep on trying to get another number like 2 and 4 until it does.
please help
for some reason the currentframe is always breaking while the ontop==false only breaks if i say false. it doesn't break if i put it to true. Why is that?
well it has to do with the order of loading the file. people usually put the pictures and stuff first so their preloader appears earlier than if they didn't. sometime the preloader wouldn't show up at all because it was loaded last. i don't know how to do that though.
so for some reason this if statement keeps on breaking so all of it turns true; the if statement doesn't act like a door where only a certain few can enter, it acts like an open door, every one can enter. what in this script is breaking?
for (var c:Number = 1; c<6; c++) {
for (var d:Number = 1; d<6; d++) {
if ((_root[c+"_"+d]._currentframe == 1) && (_root[c+"_"+d].ontop == false)) {
trace(1);
}
}
}
also when i try to trace the current frame. every time it came back with a 1 and i know this is not true. I've had problems with _currentframe before.
mc.swapDepths(# you want it at OR other mc)
i can't find the problem, I'll just have to cancel the project.
on(press){
this.gotoAndStop(2)
}
that goes to frame two of the button/ movie clip when it is pressed.
use a v-cam
ps look it up in the forum search box at the bottom of the forums.
i found out the the miss behaved mine is the first one in the for loop. it puts a one on the second mine every time they are next to each other. it can also be thought of the ontop variable failing for the second mine. either way it is a pattern.
anybody know what is wrong? please!!!!!!!!!!!!!!!!!!
pm me if you want to talk in depth about what is wrong!!!!!!!!!!!!!
I'm desperate!!!!!!!!!!!!
look up "sound volume" in the flash help file(help>flash help or press F1) it should have an example of a sound controller and you can then modify it from there.
i figured out when it happens. when there are two mines next to each other, one ignores the ontop variable and places a 1 ontop of the other mine. the other doesn't ignore this and it follows the "rules."
going to find out if it has to do with the order of mines in the for loop.
pictures to show you
still need help!
i think it is modify>document
you could also do ctrl+J
could anybody help me along? I have no idea why the code is not working! I might have to rewrite the script if some one can't find any problems!
sometimes the numbers overlap the mines now.
http://spamtheweb.com/ul/upload/4008/396 80_mine_sweeper.fla
test it for your self!
please!!!
i will have to re write the script, there is a loop hole that is screwing up some thing, unless i messed up the ontop=true part.
for (var u:Number = 1; u<3; u++) {
//gets variables
X_1 = this["X"+u]._x;
Y_1 = this["X"+u]._y;
X = X_1/30+1;
Y = Y_1/30+1;
//decides what it is on and turns ontop to true
if (X == 1) {
_root["na"+Y].ontop = true;
} else if (X == 2) {
_root["nb"+Y].ontop = true;
} else if (X == 3) {
_root["nc"+Y].ontop = true;
} else if (X == 4) {
_root["nd"+Y].ontop = true;
} else if (X == 5) {
//trace(_root["ne"+Y].ontop+";"+X+","+Y);
_root["ne"+Y].ontop = true;
}
}
}
here's the script
ok now this script is not working, it just doesn't change the Varaible (ontop)from false to true when needed.
(see the other post for the script)
well, when you record into the microphone, you save it as a sound file. Then import it into the flash document, and use as2 to have a triger event so it plays when something happens.
hey every one, I still have the same problem from this post.(at the very bottom)
I cannot figure out why this is happening!
Thanks
it can!
http://www.kirupa.com/developer/actionsc ript/shared_objects.htm
they call it shared objects
here is the whole for loop(mine sweeper experiment)
for (var i:Number = 1; i<3; i++) {
letter = Math.ceil(Math.random()*5);
number = Math.ceil(Math.random()*5);
if (letter == 1) {
this["X"+i]._x = _root["a"+number]._x;
this["X"+i]._y = _root["a"+number]._y;
} else if (letter == 2) {
this["X"+i]._x = _root["b"+number]._x;
this["X"+i]._y = _root["b"+number]._y;
} else if (letter == 3) {
this["X"+i]._x = _root["c"+number]._x;
this["X"+i]._y = _root["c"+number]._y;
} else if (letter == 4) {
this["X"+i]._x = _root["d"+number]._x;
this["X"+i]._y = _root["d"+number]._y;
} else if (letter == 5) {
this["X"+i]._x = _root["e"+number]._x;
this["X"+i]._y = _root["e"+number]._y;
}
//anti-stacking code
if (i>1) {
for (var r:Number = 1; r<i; r++) {
if (this["X"+i]._x == this["X"+(r)]._x) {
i -= 1;
}
}
}
}
//here is where the real problems start
for (var u:Number = 1; u<3; u++) {
//gets variables
X1 = this["X"+u]._x;
Y1 = this["X"+u]._y;
X = X1/30+1;
Y = Y1/30+1;//flash thinks this variable is a string
trace(Y+","+u)//returns the first trace with Nan , # ; # , # for the second
//decides what it is on and turns ontop to true
if (X == 1) {
_root["na"+Y].ontop = true;
} else if (X == 2) {
_root["nb"+Y].ontop = true;
} else if (X == 3) {
_root["nc"+Y].ontop = true;
} else if (X == 4) {
_root["nd"+Y].ontop = true;
} else if (X == 5) {
_root["ne"+Y].ontop = true;
}
}
}
but why would it say this the first time and not the second? Is the variable string being changed into a number after the first time in the for loop?
you can put that script on the frame you want it to go on and do this:
_root.mc.gotoAndStop(2)
OR
_root.mc.onLoad=function(){
gotoAndStop(2)
}
well, you could do a hittest so if they even touch a little bit, it goes to the next frame.
so now I have another problem, when I am tracing a variable in a for loop, the first time it says NaN. What is this and why is it doing this?
well, newgrounds uses cookies to keep a user logged in every time he/she changes pages, so maybe you could access those, but i don't have any details.
how can i make a variable hold words instead of numbers?