ActionScript 2.0 :: First Person Shooter - When Click The Crosshair (cursor) Changers Color

Feb 14, 2008

I'm making a flash game (a first person shooter game) For the Flash I have a cross hair as the cursor so that it looks like a sniper scope. I'm trying to get a code so that when you click, the crosshair (cursor) changers color. So far, my actionscript for the crosshair cursor is:

[Code]...

View 1 Replies


Similar Posts:


ActionScript 2.0 :: Mouse Cursor Disappears And A Crosshair Is Shown As The Cursor

Jan 31, 2004

I am trying to make a simple game in flash it is a target shooting game i would like to make it so that the mouse cursor dissapears and a crosshair is shown as the cursor (if you get what i mean). I have created the crosshair and made it into a graphic symbol called: "crosshair" so what is the script i need to make it the cursor for the game

View 3 Replies

ActionScript 2.0 :: [MX]First Person Shooter - Use The Spacebar To Switch Between The Ones Being Viewed?

Apr 30, 2003

I have figured out how to duck out of enemy site. I need to know if i can have two layers running the same thing at the same time, but only one is viewed and you use the spacebar to switch between the ones being viewed. For example one layer is a person ducked behind a box and getting shot at and the other is a person standing in the open getting shot at, to switch from the ducked to the standing you have to use the spacebar. Is this possible?

View 3 Replies

ActionScript 2.0 ::make A Third-person Shooter Game - "hide" Clip Does Not Receive Any Commands From The Enemy Clip?

Feb 19, 2005

im trying to make a third-person shooter game similiar to those "hide" when you press Down and "attack mode" when you stand Up, sort of like Time Crisis.I've done first person shooter games before.The hero character's move clip contains three clips, one of him in hiding, one in attack mode, and the last being hit. How do I script it such that the "hide" clip does not receive any commands from the enemy clip (which tells the hero clip to advance to "hit" clip and lose a health").

View 3 Replies

ActionScript 3.0 :: Flash Click On Color Button And Write In Textarea With That Color Font?

Oct 6, 2010

I want to do as follows: * click a "red" button write in textarea with red color font click "blue" button
* write in textarea with blue color font Isn't this possible in flash 10 using AS3 I tried using setTextFormat but the problem is i have to have text before inserting format on that.

View 14 Replies

ActionScript 3.0 :: Click On Color Button And Write In Textarea With That Color Font

Oct 6, 2010

click a "red" button write in textarea with red color fontclick "blue" buttonwrite in textarea with blue color font  Isn't this possible in flash 10 using AS3 ? I tried using setTextFormat but the problem is i have to have text before inserting format on that.

View 20 Replies

AS3 :: Flash - Relative Points - Translate The X / Y Position Of The Crosshair?

Aug 21, 2011

So I have a Crosshair on the Stage and I have an Enemy with nested child limbs, when the below function is called I want to create a hit mark and attach it as a child to the Enemies Limb but how do I translate the X/Y position of the Crosshair to the Enemies Limb bearing in mind the Limb may also be rotated?

[Code]...

View 1 Replies

ActionScript 2.0 :: Creating A Customized Crosshair Replacing The Mouse?

Feb 18, 2009

create a costumized crosshair replacing my mouse?here's the conditions

1. my mouse pointer will dis appear and get replaced by a semi transparent picture of a snipers crosshair

2. each time my crosshair pointed on any object in my screen it will change its color, lets say the original color is white, when i pointed at a button it will change it color to red.

View 3 Replies

ActionScript 2.0 :: Changing Cursor Color When Over Another Movie Clip?

Nov 16, 2002

this time, I have a crosshairs custom-cursor (instance name 'crosshairs') that is black, and I want it to turn red whenever it is moved over a target that the user can 'shoot' at.asically, I am figuring that I simply need to perform a hitTest on the 'target' instance and, if it is true, use setRGB to turn the 'crosshairs' instance red. However, as of right now, the crosshairs is always black, whether it is over the target or noP.S. Oh yeah, and is there any way to make the color change / onMouseDown shooting action occur only when the CENTER of the crosshairs is over the target? Y'know, for realism. Well, anyways, cheerio...

View 11 Replies

ActionScript 3.0 :: New Fancy Cursor Can't Click

Dec 22, 2008

I have just made new cursor for my flash movie, and put this code into an actions layer:[code]Function doMenu is in another place, it works, I checked with normal cursor. But MyButton is unclickable with this new cursor.

View 13 Replies

ActionScript 3.0 :: How To Animate Cursor On Click

Feb 9, 2011

I have been trying for a long time to get my cursor to start an animation when I push the mousebutton, for example a hammer that hits down, on mouseclick. I don't get it to work.

View 6 Replies

ActionScript 3.0 :: MouseEvent.CLICK With Custom Cursor

Jan 19, 2011

In my project I have 14 buttons which are added by adding the background image their in. So I have a var bg which i addChild(bg) thus also adding 14 buttons.
 
their listeners are set to Mouse.event CLICK, and they work fine unless i add a custom cursor then their dont work any more.

View 1 Replies

ActionScript 2.0 :: Animating A Custom Cursor On Click?

Oct 3, 2008

how to take the cursor that is in the Follow Mouse tutorial and animate it on click? I have found many eamples of a custon cursor but was having trouble animating the cursor when the user clicks on a button or movieclip.

View 2 Replies

ActionScript 2.0 :: Mouse - Click On Any Link - Cursor Refuses To Just Appear

Oct 15, 2004

i have a problem with this simple effect -the mouse follow. Actually, on my splash screen, i have tow tiny lines which i intend to follow thw mouse, one in the x-direction and the other y-direction. but only one works. and it's difficult to click on any link. The curcor refuses to just appear. if i disable one, the other works. i used onenterframe, and "lock to Rectangle" in Normal mode)

View 3 Replies

ActionScript 2.0 :: Change The Cursor To An Ibeam On Click Of A Button?

Oct 18, 2008

is there any way I can change the cursor to an ibeam on click of a button?

I dont really want to create a custom cursor.

View 1 Replies

ActionScript 2.0 :: Make Movie Clip Appear Under Cursor On Click?

Oct 12, 2009

Ok so in it's simplest form, i just want to be able to click anywhere in the movie and have a movie clip show up (or duplicate from the library then show) at the exact point where you click, an example for use might be a bullet hole or a stamp tool.

View 2 Replies

ActionScript 3.0 :: Custom Cursor - Button Click Events Not Responding

Jan 18, 2011

I am attempting to use custom cursors with AS3.  I created a movie object that i position using:
 
function mouseMoved(event:MouseEvent) {
mousePointer.x = this.mouseX;
mousePointer.y = this.mouseY;

and calling Mouse.hide()
 
This works fine in that the custom cursor follows the mouse, but I am having troubles using events with the cursor.  I have several click events on several buttons.  The events do not trigger when using the custom cursor.  In my ignorance I would imagine the problem is that the custom cursor movieclip is on top of the button, and so click events are only generated for it, and not the button.

View 4 Replies

Professional :: Input Text Have Focus With Cursor Blinking Without User Having To Click It?

Jul 12, 2011

I'd like to set up my splash page (all Flash) so that the login form is ready and waiting for input, without the user having to move the pointer to the first input text field and then click it.

View 3 Replies

ActionScript 2.0 :: Disable Left Click On Flash Movie + Prevent Mouse Cursor From Changing

Apr 12, 2010

I am using a flash swf from the website[url]...where it allows me to upload images via an xml file to the flash movie. However the flash movie is changing the mouse cursor to hand-cursor when passing the mouse on it, and also it is allowing users to click on the movie, while I wanted to leave the mouse cursor to remain as an arrow, and prevent users from clicking on it, I tried the following code, whereby I used another flash movie to call the dewslider swf, but in IE it is not working, although in firefox it is ok..[code]...

View 4 Replies

ActionScript 2.0 :: When Click On A Button, It Changes Color

Oct 8, 2003

I have a list of buttons, en what I'm trying to do is when you click on a button, it changes color.

The color of the text of the original button is blue. On top is a movieClip with the same text but in black. So when you click a button I want to change the _alpha property from the black movieclip to 0. Meanwhile the _alpha of the rest of the buttons must be set back to 100; so if a button is already blue, it becomes black again.

Here's my code: the maximum value of the list of buttons is saved in 'max_array'

function anim(mc_huidig) {// function anim starts when you click 'mc_huidig'
for (i=0; i<max_array+1; i++) {
mc = eval("newsitem"+i);

[Code]....

When I use the trace on 'deactief', it does the trace but the trace keep going on, it never stops. It seems to me that "clearInterval(fadeout);" doesn't happen.

View 1 Replies

Actionscript 3 :: Change Text Cursor Color Of Text Input Flex 4?

Apr 13, 2012

I want to change the blinking text cursor color of Text Input in Flex 4... How can I change it ?

Is there any way to handle it, or it can be only controlled by Flash Player?

View 1 Replies

ActionScript 3.0 :: Change Color On Mouse Click?

Oct 17, 2011

I have followed Ned's code from another post, whereby if a text button is clicked, the color will change.  The code is like

var clicked:Boolean = false;
var clicked2:Boolean = false;
btn1.addEventListener(MouseEvent.CLICK, btn1click);

[Code]....
 
Now if I click on the first button, it changes color and stays like that, which is perfect.  If I click on btn2, this changes color and stays like it.  The problem is that if btn2 is pressed, it should change color and stay like it (as it is doing), but btn1 should return back to its normal color (black).

View 1 Replies

ActionScript 2.0 :: Click Mc To Change Color But Not When Dragged?

Dec 27, 2009

I am trying to simulate onpress and onrelease functions but using onMouseDown and onMouseUp.squareContainer can be dragged around but squareBack, which is inside squareContainer changes colour when clicked. These both work.But.. when I drag squareContainer around, if the mouse is on squareBack (back) it changes colour as it sees it as onMouseDown. In the mouseUp, if squareContainer has changed position then it has been dragged. Then, using this I somehow want to say in mouseDown that if squareContainer is being dragged then dont change colour.. but it doesnt work!!![code]

View 1 Replies

ActionScript 3.0 :: On Click - Movieclip Color Change?

Aug 8, 2010

I'm trying to get a movieclip fill color to change once clicked. I'm able to get the mouseover and mouseout working. But the click state isn't working properly.Here's my code:

Code:

Code:
my_mc.addEventListener(MouseEvent.MOUSE_OVER, onFolderOver, false, 0, true);
my_mc.addEventListener(MouseEvent.MOUSE_OUT, onFolderOut, false, 0, true);
my_mc.addEventListener(MouseEvent.CLICK, showMovieclip, false, 0, true);[code]......

When I use the above code, nothing happens once clicked. I tried using the color property, but, although that made a color change (black),it wasn't the color I had indicated (white).What I have is a movieclip ("my_mc"). Inside the movieclip are other movieclips. When one is clicked, only that movieclip ("my_mc.movieclip01"), is highlighted.

View 9 Replies

ActionScript 2.0 :: Click A Different Color Tab Or Whater To Change?

Jul 26, 2005

in my drawing program i have it so when u click a different color tab or whater to change the color it takes you to a new frame with the coding the same except the color. but when it goes to a different frame the stuff it formerly drew gets erases. how can i fix this!

View 9 Replies

ActionScript 3.0 :: Grid Planner : Change Color On Click?

Mar 21, 2011

Im making a tool to plan dungeons, its a 25x25 grid made up of movieclips, the movieclip used has 10 layers, each layer a different colour/pattern to represent a room type. The idea is to choose the room from the legend then click on the movie clips you want to turn them into that room type.i have tried 2 methods, 1st i generated a grid and added a "cell"+count to each new instance as made, however i can only get it to change the last cell, no matter which clip is clicked.Now the 2nd "noob" method is to make each cell(instance square on the grid) and label them by hand, as well as add the code for each cell, but clearly this is alot of work. But it works, the next steps would be To convert the current grid setup into a text string to save Add a counter so you know how many squares you have used Reset button.

View 1 Replies

ActionScript 3.0 :: Button / Mc Change Color On Click In Slideshow?

Jul 12, 2011

I have a slideshow with keys that when clicked, direct the viewer to a certain image in a slideshow.  I did this using some as3 directing flash to go to certain frames with specific labels tied to specific 'keys' or little navigation buttons.
 
Often I see slideshows where once the little navigation button that represents a certain slide in a show is clicked, it changes color.  Not just when it is clicked, but when it is currently on the specified image.  When another button is clicked, and when that image in the slideshow is no longer 'current', the color of the button (or mc if that's what it needs to be) changes back to the normal color.  Currently, I have the button's over and down states as one color, and the up and hit states as another color.  What do I need to do to ensure that when the button is clicked, and it's corresponding image is the 'current' image shown on screen, that the button changes to a different color to distinguish it from the rest of the nav buttons?
 
Here is an example of what I want to do:[URl]...

View 3 Replies

Professional :: Make Button Keep Color After Click Or Touch

Aug 5, 2011

I am trying to figure out how I can have my buttons keep a color after it has been clicked or pressed.This is important since I need to make the viewer understand what answer was correct.I have set the down state but I need my button to keep that down state color.

View 1 Replies

ActionScript 3.0 :: Button Color Change Every Time Click It?

Mar 21, 2012

flash professional cs5 and i dont know how to do thing like in actionscript 3.0

View 1 Replies

ActionScript 3.0 :: Change Button's Color Evertime I Click It?

Mar 25, 2012

I want to change the color of my button each time i click it using action script[code]...

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved