man, I see you didnt like my crude drawing in my fla
weāll work off yours. hhahhaha
man, I see you didnt like my crude drawing in my fla
weāll work off yours. hhahhaha
wells and seeds.
Random thoughts.
Cant we assign an initial value of 4 seeds to each well. Fill it based on that value. (looks like you did that)
Then, as the seeds go around, add or substract from the wells, therefore keeping the count where it should be?
Also, if the seeds travel from the well that is lower in number, to the well that is higher in number⦠how do we tell it to go from 14 to 1? Duh⦠if(wellnumber>14){wellnumber=1?}
Yeah, I agree with Monty, we should keep track of the number of seeds in the wells as opposed to which seeds are in which wells.
I agree, as well
What I had in mind was moving the seeds from one well to another, while adding and subtracting seeds actually makes more senseā¦
Bantumi.Well.prototype.AddSeed = function ()
{
this.seeds.push( new Bantumi.Seed( this ) );
}
Bantumi.Well.prototype.SubtractSeed = function()
{
var LastSeed = this.seeds.length-1; // get 'seeds' array length
this.seeds[LastSeed].clip.removeMovieClip(); // delete seed's clip
delete this.seeds[LastSeed];
}
I love these discussions.
Ahmed⦠I think the solution is between what weāre all saying. It is more visual and more understandable if the seeds visually travel to each well. However, we can keep the count internally, I believe, as described above. See what I mean?
So, what I see here is that weāre going to use arrays in the well to serve as the ācontainersā for the seeds, in order to count them? That sounds clever.
I was just gonna add +1 and -1 to variables, ooops⦠thatās why itās awesome to do this kind of thing together.
*Originally posted by Iammontoya *
Ahmed⦠I think the solution is between what weāre all saying. It
I agree⦠how about, the āseedā movieclip would contain a motion-tween showing the seed travelling from the previous well to the current. What that means is, well#5 calls the āaddā prototype, a new clip is attached inside well#5, and the tween shows the seed going from well#4 to #5⦠do i make any sense?
Yepā¦except, I thought you would physically move the _X and _Y to take the seed to its corresponding well. Afterall, youāre pretty much sending it to the x and y of the well (although it would be cool to offset those parameters by a pixel or two, so the stones overlap and are visible)⦠heheh
why doesnt this work? I think I have brain freeze. No matter where I put the loadwell function, it does not give me 12 wells. It will give me 9, or display 9, or none at all. If take off the well (for/loop) it will give me 12.
// AS TAGS, IVAN!!
loadwell = function(){
for (n = 1; n<=12;n++) {
//attach clip using newSeed as an ID for later reference
var newSeed = this.attachMovie("seed", "seed"+n, n);
_root["seed"+n]._x=n*20;
_root["seed"+n]._y=100;
trace(_root["seed"+n]._x);
}
}
loadwell();
Well =function(){
this.quantity=4;
this.onRelease=function(){
trace(this.quantity);
}
}
Well.prototype= new MovieClip();
Object.registerClass("well",Well);
for(i=1;i<=3;i++){
attachMovie("well","well"+i,i);
_root["well"+i]._x=i*100;
}
btw⦠the register class is the only thing that I havent seen in your code, and I was trying to do a quick test with only three wells
I guess my for/loops are combining and giving me a total of n+i objects.
Am I just to āloopyā to understand?
Someone?
I donāt think we need that SubstractSeed method. After all, when the user clicks on the well, all the seeds are moved, so we could something like
Bantumi.Well.prototype.AddSeed = function ()
{
this.seeds.push( new Bantumi.Seed( this ) );
}
Bantumi.Well.prototype.SubtractSeeds = function()
{
for (var i in this.seeds) {
this.seed*.gotoWellNumber (this.wellNumber+i) ;
}
this.seeds = [] ;
}
Or something like thatā¦
I like that :P⦠but then, we donāt need an AddSeed method as well, do we? Just one EmptyWell method would do it i think
I hope you guys are enjoying this. Are we still into it? I am!
Ilyas, or ahmed (or anyone)⦠why doesnt the for/loop work in my previous example. I guess thatās some limitation I never ran across, or did I mess something up?
I ran this
loadwell = function(){
for ( var n = 0; n<12 ;n++) {
//attach clip using newSeed as an ID for later reference
var newSeed = this.attachMovie("seed", "seed"+n, n);
newSeed._x=n*20;
newSeed._y=100;
trace("clip#"+n);
}
}
loadwell();
and it outputted
clip#1
clip#2
clip#3
clip#4
clip#5
clip#6
clip#7
clip#8
clip#9
clip#10
clip#11
clip#12
ā¦
oh any by the way,
[size=10]WHEREāS SENOCULAR!?!?!?![/SIZE]
:-:-:-\
lol⦠we need him
Heās probably on strike But youāre right, we need him. He should be super-coordinator of that project :bu:
Did I say Senocular? I meant Ralucones! [size=10]Where are you Ralucones!?!?[/size]
I looked at the traces, and it traces correctly. What it wont do is display correctly. That is what is so weird.
Whereās your spirit of adventure? Cāmon⦠we can figure this out. Right?
lol, i bet itās two clips overlapping
you mean the wells overlapping the seeds? No. thatās not it⦠Can you show it me working? I want to compare and see what Im doing wrong. If you dontā mind.
:: Copyright KIRUPA 2024 //--