What does this mean for me? You will always be able to play your favorite games on Kongregate. However, certain site features may suddenly stop working and leave you with a severely degraded experience.
What should I do? We strongly urge all our users to upgrade to modern browsers for a better experience and improved security.
We suggest you install the latest version of one of these browsers:
Kongregate is a community-driven browser games portal with an open platform for all web games.
Get your games in front of thousands of users while monetizing through ads and virtual goods.
Learn more »
In the game im currently working on, i want the player to affected by an object (a spring). So basically, if it touches it, i want it to bounce up.
The spring is draggable (with the mouse) so i am using the start and stopDrag functions.
In my players code, i need to somehow check whether the spring is being dragged…
I am using external code (\*.as) with classes if that makes any difference (im still learning AS)
Never Stop Developing…
I have this in a file called drag.as
class Drag extends MovieClip
public var DRAGGING = false;
private var DRAGGABLE = true;
onPress = doDrag;
private function doDrag():Void
if (DRAGGING == false && DRAGGABLE == true)
DRAGGABLE = false;
**then with the player i have this code:**
if (root.SPRING.hitTest(x,y,true) && Math.abs(x – root.SPRING.x)<10 && _root.SPRING.DRAGGING == false)
vspeed = -16; //(WHICH I CHANGE THE _Y VALUE BY)
_root.SPRING.gotoAndPlay(2); //(MAKE IT SHOW THE “SPRINGING UP” ANIMATION)
It uses the spring even if it isn’t being dragged =(
any more help?
i don’t know why i use capitals… just a habit, and i only use it for some variables??? I understand my code, and don’t normally share it, so it doesn’t really matter…. yet
and thanks, can’t believe i didn’t notice that!
You use capitals when you wish to yell. Kinda like the thread topic.
Why don’t you take your rude self somewhere else and demand help!
Freaking rude people always want to act entitled.
ps: your problem would be easy to fix so you shouldn’t have a problem finding help somewhere else.