Flash8 :: Make Own Cursor For Game
Aug 3, 2009Today I will show how to make your own cursor for your game. It's very simple. Draw your cursor and convert to symbol. On the Action Script bar write this code:
[Code]...
Today I will show how to make your own cursor for your game. It's very simple. Draw your cursor and convert to symbol. On the Action Script bar write this code:
[Code]...
Is it possible to make a custom cursor with restraints (meaning you only see the cursor when you put your mouse in a certain spot, by defining both the max and min of the x & y), that is placed inside a movie clip; then make the movie clip move on the stage when you click certain buttons.
[Code]...
im trying to make an object move away from the cursor when cursor goes near it, so basically you cant click on the object......
View 9 Repliesdoes anyone know how to make the initial text in an input text box disappear once your cursor changes from the arrow to the type cursor? For example, I have an input text box which has the text visible saying "enter your email address here" I want this text to disappear automatically when the user goes to type something there...
View 3 RepliesI made a game and I like to add scores. For now I have:
Code:
if (eval('ball'+curball).sunk) {
counter = counter + 10; how could I show points (counter) in a game?
I am making a game in Actionscript 2 where I need to open another "window" by pressing a button. The window is just a movie clip with some stuff on it, and a red X to "X" the window out.It all works out until I "X" out the window, and try to re-open it with the button.This is the actionscript code in my button:
Code:
on(release){
_root.window.gotoAndStop(2)
}
I'm following a tutorial to make a simple game. The aim of the game is for a player to evade a flying enemy ; the higher the score, the faster the enemy. The main elements in the game are the enemy the player and a score card.
However, from following the tutorial, and adding the dynamic text field etc....the score doesn't actually work.
This is the code that I was instructed to place on the first frame of the Scripts layer:
//Game Variables
enemySpeed = 5; //Set Enemy initial speed
numberEnemy = 4; //Change this to add more Enemies
score = 0; //Set initial score to 0
[Code].....
How do i use the on(dragover), becuase i am making a simple randomness game,(to start off) because i have something that you can drag, and i want to make it if you drag the thing over it it takes you to a new keyframe.Here is the movie clip i want to be drug on: (nothing happens)
Code:
on(dragOver) {
gotoAndStop(3)
}
Heres the code that you can drag the item(works)
Code:
on(press) {
startDrag(this)[code].....
I'm following a tutorial to make a simple game. The aim of the game is for a player to evade a flying enemy ; the higher the score, the faster the enemy. The main elements in the game are the enemy the player and a score card.However, from following the tutorial, and adding the dynamic text field etc....the score doesn't actually work.This is the code that I was instructed to place on the first frame of the Scripts layer:
//Game Variables
enemySpeed = 5; //Set Enemy initial speed
numberEnemy = 4; //Change this to add more Enemies
score = 0; //Set initial score to 0
[code].....
I was trying to make a game, and the character inside the game could swim. However, I only wanted him to swim in short bursts that refueled every time he hit the ground.
View 9 RepliesI'm designing a platformer game, in which the code is all held within the character MC. I want to pause the game using something like 'delete this.onEnterFrame' as a start point to terminate code. The code layout within the character is like so:
onClipEvent (enterFrame) {
...
this.onEnterFrame = function(){ //within clip event
...
if(btnon == 1){ // when button pressed(on stage)) global value of 1 is true
delete this.onEnterFrame;
}...}}
Due to the fact its within a clip event structure, it doesn't pause it, instead it slows everything down. Would I have to construct all my code in a frame layer or can I still use an MC to terminate this?
how to make a game tutorial as farmville game tutorial to teach the user to play the game. i have recently involve in make that kind of game tutorial for its user by actionscript 3
View 1 RepliesI'm new to AS3 and OOP in general and I'm trying to create a cursor class for a mouse avoider game, i.e a class whose position is mouseX, mouseY. This is where I'm at (the Avatar class in added to the stage in a Main class not shown):[code]But this doesn't work, I guess I have to refer to the mouse in some other way? I also tried using MouseEvent.MOUSE_MOVE which got me closer, but the avatar only moved when my mouse was directly at the center of the movieclip.
View 7 RepliesI have a menu for a website in flash where, an mc moves up and down and shoots...so that when the projectile MC hits a button, it clicks it.
1.) How do I make it so that the MC follows the mouse (like a custom cursor)..but is restricted to only going vertically
2.) how would you make it so that the mc can shoot anywhere....but when the fired MC hits a button, it acts as if it was clicked? My AS knowledge...is..very basic...so if you have any free time could you explain the codes?...so that I can learn from this...rather then just stealing your codes... but..if you want to just let me copy and paste...thats cool too
I need to make the background image move opposite the cursor to make it seem like the camera is moving.[URL]
View 1 Repliesi want to make the character in my flash game make a jump when the player presses a key,e.g. 'space',even the player release the key instantly,the character will still finish the complete jump process.
View 1 RepliesIs there a way to make a layer transparent?
And is there a way to make a symbol transparent?
I have a project which is very straight forward however I'm having trouble figuring out the logic to get it started as well as the actionscript to get it working.THE PROJECT1. The user must choose one (only) out of about 100 buttons available on the page/frame.2. When the chosen button is released, the other buttons diasappear/turn invisible and become inactive3. A message appears within a speech bubble pointing to the selected button.PROBLEMS1. How do I make all the button disappear except the chosen one?2. How do I make the speech bubble point to the chosen button no matter which one they choose?MY LIMITED LOGIC SAYS1. I need to collect x and y values somehow to position the speech bubble2. Pass a variable to tell flash 'this is the chosen button'3. Tell flash to hide every button that isn't the chosen one using the variable
View 5 RepliesHow would i make a button to start an animation, and only do it once?(Also, make the button change when finished? like a cellar closed, then opened :/) (AS2)
View 2 RepliesI have to make a banner ad for my company's website that is 4 frames. It needs to play each frame about 3-4 seconds and then loop after 4th frame and continuously do so. It needs to begin this process when the web page is brought up without the user doing anything to it (so no clicking)And I have to keep it under 40k.I've found alot of tutorials for using external swf files and images but everything seems to use a button and I can't seem to get the coding down at all.
View 3 RepliesI have a function in a mc and I want to use it in another mc.
But I does not seem to call it.
I guess I can make the function global in some way, or?
I am building a sniper game and I can't figure out how to make the game make the mouse twitch, like in clear vision elite.
View 1 RepliesHow can i make an object following my cursor ( but not directly) through a specific path ( something like a city plan) and every time my cursor change location the object would change path so it will stop where my cursor is?
View 7 Repliesi'm a design student who is relatively new to actionscript. So anyway, i'm trying to make an effect whereby the cursor, whch is a pen, is moving on the canvas and leaving a trail of ink as it moves.
View 2 RepliesI can't find on FK (or other sites) the solution to make the labelfield of the RadioButton component in Flash 8 (not earlier versions!) multiline.
View 1 RepliesIs there some way I can use a flash button to call some javascript? The swf would be embedded in my html webpage.
on(release){
//fire javascript code to blank whole screen.
}
What do you do when you code as always, but some folks report that the mouse cursor does not become a hand to indicate link behavior? Also, how can I make the cursor change to a big arrow? Flash CS3, Mac AS 2
View 11 RepliesI want to make a mc stick to a cursor from the start and then drop the mc.So far I know how to make a mc follow the cursor and drag and drop a mc.I need an AS3 code for "dropping" a mc at a position (cursor must transform into regular arrow again)The position the cursor needs to snap to is another mc - it should be the nearest, so the distance needs to be measured. So the position is not a grid, but the mc's is can be dropped onto are always on the same positions.
View 0 Repliesi use this script to make a custom cursor and rotate it to the direction the _root._x,ymouse goes.. but i think it can be more improved can somebody have a look?
[Code]...
how to work with useHandCursor? I want to make hand Cursor to disapear.
View 3 Replies