Can anyone help me with this big problem of mine. What I need is too have a globe which spins slowly when you dont press any buttons, but when you press the left button it spins faster too the left and when the right faster to the right… Can some one help me… I have included a fla too give you the basic… :-\
hay
depending on the way you did things, i found that the only way to do it is to use the visibility property. so i did it and you can check out the final version attached.
but i realy don’t recommend doing it this way, actualy i find it realy week, so i am working on a different way that will be independe of tweening and only dependent on actionscript, i’m working on it right now and i will post it as soon as i’m done
enjoy
Thanks alot mate!! Good work… but just one little problem… If you try it… you see that the golbe hacks when you spin it… I might be able too fix it because now all the globes are on the same frame… ill see what i can do… and ill post back if i cant work it out…
Thanks tons anyway!!
you the reason it does that, is because all the movies r playing and when you press one of the buttons it will show the movie in a certain stage that might not correspond to that off the slow globe, the way to fix this is using actionscript, don’t bother trying to fix it by tweening that will not work, i’m already working on a solution i will need a fiew minutes to get it done, so be pasient
i’ll post the solution when i’m done
hay
okay, its done, and probably more than you want, i had a little fun with it, modified so that when you spin to a certain direction the globe spins faster and when you stop the globe spins slower but keeps spining to the same direction i thought that madew more sence.
any way , you can speed up the slow spinnig by changing the value of variable (a) in the main frame. and you can speed up the spinning of fast spin by changing the new value that is assined to variable (a) by the buttons actionscript.
if you read the scripts in the movie you should understand what i mean.
if you have any question, plz post them and i will be happy to reply. check out the attachment, have fun
good luck
COOL!!! THANKS SO MUCH MAN!!! THATS AWSOME!!! now i just gotta work out how it works… but i think ill be right!! THANK YOU THNAK YOU THANK YOU!!!I cant thank you enough!!
THANK YOU!!!
any time man , always happy to help, if u find anything hard don’t hesitate to ask
enjoy
just one question… What does all this mean??
*onClipEvent(enterFrame)
{
if( _root.d ==1)
{
if((this._x < 173.95) && (this._x > -158.85))
{
this._x = this._x+_root.a;
}
else
{
if(this._x > 173.95)
{
this._x = -78.45;
}
else
{
if(this._x < -158.85)
{
this._x = 95.35;
};
};
};
}
else
{
if((this._x < 173.95) && (this._x > -158.85))
{
this._x = this._x - _root.a;
}
else
{
if(this._x > 173.95)
{
this._x = -78.45;
}
else
{
if(this._x < -158.85)
{
this._x = 95.35;
};
};
};
};
}
*
Obviosly this is the whole key to the spinning and i would like too now what it is actually doing and how it works… If its not too much trouble??
You know you never learn if someone does everything for you…
Also BTW:-- Is it okay if I use this scripting on my schools webpage… I will of-course put a little thing in the corner to say you helped me with the script…
okay ofcaurse you can use this code and i apreciate you giving me some credit on it.
as for ur question, will this is the whole thing so i will explain it to u the best way i can.
// when ever the movie is playing.
onClipEvent(enterFrame)
{
// if the direction of motion is to the right(by defult).
if( _root.d ==1)
{
// if the maps x position is between 173.95 & -158.85
//then the map did not end, so move the map by changing
// the x position.
if((this._x < 173.95) && (this._x > -158.85))
{
this._x = this._x+_root.a;
}
else
// else , if the map has moved beiond the bourders to the
// right, then position the map back where it starts
// this creates the illusion of a continues movement.
{
if(this._x > 173.95)
{
this._x = -78.45;
}
// if the map has moved out of boarders to the left
// then we position it back where it should be for
// the same reason as above.
else
{
if(this._x < -158.85)
{
this._x = 95.35;
};
};
};
}
else
// here i concider the fact that the user presser the button
// to speed the motion to the left, now the same as above
// but the map is moving to the opposite direction
// that is achieved by changing the equation from
// this._x = this._x + _root.a into this._x = this._x - _root.a.
{
if((this._x < 173.95) && (this._x > -158.85))
{
this._x = this._x - _root.a;
}
else
{
if(this._x > 173.95)
{
this._x = -78.45;
}
else
{
if(this._x < -158.85)
{
this._x = 95.35;
};
};
};
};
}
okay, to make things more clear, when you read the code, the explenatiopn is the one after // .
i explained each code before it acures, so u read the explenation the the code that is explained.
you should know that i created 2 variables
1- variable a, wich controles the speed of motion.
2- variable d, wich controles the direction of motion.
when you press the right button:
a- variable a, is increased by 3, this speeds up the motion
b- variable d, is set to 1, wich indecated movement to the right and so the first code of ur question is executed, because the first if statements evaluates to true.
now when you press the left button:
a- variable a, is increased by 3, to speed up the motion
b- variable d, is set to 0, this indecated movement to the left, this would cause the first if statement in the above code will not be executed , because it evaluates to false, so the second one will (if(_root.d == 0) this will move the map to the left.
woow, never explained this way before, i hope you can understand all the bullsh*t in it.
have fun with it, and good luck in school.
by the way can you send me the url for the page ur gonna post this on.
thankx, good luck.
Thanks for explaining it now… It helped a lot…
As for your credit for the script Is this ohkay…
With thanks to “exfusion” who helped me with this script.
down in the bottom right hand corner…??
Would you like me too make a link to your webpage… if you have one… and what name would you like me too use??
The final thing will be at www.theenglishschool.se and click on class pages, but it wont be there for a while… so dont bother going there now…
hay, glad i could help, and thanks the credit sound good. you take care and good luck.