Video: ActionScript Shoot Game Part 1 Custom Cursor

Thu, Oct 1, 2009

ActionScript

This movie requires Flash Player 9

We are starting a shoot game, and for this let’s replace our mouse pointer with a cross hair to aim at our targets.
A great introduction to movie clip variables, hide method, and assigning location.

Move the mouse over the stage to move the cross hair

CLICK HERE FOR COMPLETE CLASSIC GAMING CARTOON SMART TUTORIAL

HERE IS THE SOURCE CODE!

//The ActionScript 3.0 Custom Cursor
// solutions at say-web dot com
// FREE to USE, COPY and DISTRIBUTE

var cursor:MovieClip;

//this creates the movie clip
//we will place on stage

function initializeGame():void {
cursor = new Cursor;

//Note that the class has
//Capital C on the name
//cursor with a small c is the moive clip
// name

addChild(cursor);
//this will place a cursor on stage

cursor.enabled = false;
// this will neutralize the cursor
Mouse.hide();
//This will hide our own mouse (cursor)

stage.addEventListener(MouseEvent.MOUSE_MOVE, dragCursor);
// this functions fires when the mouse moves
// changes the cursor location

}

function dragCursor (event:MouseEvent):void{

cursor.x=this.mouseX;
cursor.y=this.mouseY;
// this will place the cursor on stage according
// to the mouse coordinates

}

initializeGame();

//thanks for watching
// see you on lesson 2

Cartoonist Drawing Tutorials

Related Articles:

, , , , , , , , , , , , , , , , , , , , , , , , ,

65 Responses to “Video: ActionScript Shoot Game Part 1 Custom Cursor”


Trackbacks/Pingbacks

  1. ab346368@gmail.com

    The info you have offered here is valid and informative. You have apparently done a lot of research on the topic. Thanks for sharing it….

  2. ab346368@gmail.com

    not bad,not bad. i say that it’s useful info!!…

  3. ab346368@gmail.com

    I have seen articles like this before on this subject. You have definitely thought this through to come up with such interesting and unique views….

  4. yahoodsl says:

    Find more there:…

    [...]Search engine optimization needs a good search engine optimizer plan. Just certainly one of these methods can make a big distinction in your sites position and company your website brings you.[...]…

  5. casques says:

    ab346368@gmail.com

    Back in my college days I seldom read writing this good. You display a lot of knowledge without being intimidating. Your attention to detail is superb. You make clear-cut points on which I can concur….

  6. ab346368@gmail.com

    I have read various articles on this topic, but this one really makes sense to me. Thanks for making this information so interesting and understandable….

  7. ab346368@gmail.com

    Your article is clearly very well-researched and informative. I think your content is useful and valuable information presented in a very unique way. On a scale from 1 to 10 it’s a 10….

  8. ab346368@gmail.com

    Until I read your article, I thought I was well versed on this subject matter. Thank you for giving me more fresh information to add to my knowledge to make me an even better teacher….

  9. Blombud Blog says:

    ab346368@gmail.com

    This information is unique to me. I really like your points and think you put a new spin on this for readers. I respect your writing style. You’re so perceptive….

  10. tatuaggi says:

    Title…

    Wow that was strange. I just wrote an extremely long comment but after I clicked send my comment didn’t show up. Grrrr… well I’m not typing all that again. Anyways, just wanted to say fantastic blog!…

  11. SEO Company says:

    Title…

    Ugh that was strange. I just wrote an extremely detailed response but after I clicked send my comment didn’t show up. Sigh well I’m not typing all that again. Anyways, just wanted to say great blog!…

  12. Intivar…

    thanks for the great post!do you need a Intivar…

  13. SEO Company says:

    Title…

    Ugh, I just typed a long comment, but it disappeared when I clicked send. Anyway, I’m not going to retype it again, so I just wanted to say great blog! Better than http://google.com! :-)

  14. SEO Company says:

    Title…

    Wow, I’m really happy that I clicked on this page, good info here! Better than http://google.com!…

  15. SEO Perth says:

    Title…

    Wow, I’m so happy that I landed on this page, good info here! Better than http://google.com!…

Leave a Reply

You must be logged in to post a comment.

My name is Avraham Saltoun, and I live in Jerusalem, Middle East. I am currently on my mid  40's and I am a computer programming technician. Here you will find over one hundred quality video tutorials on Actionscript, and yes, I give online support for aspiring programmers, and pros as well, sharing screen on skype and delivering source code by email, click the button for live flash actionscript support now!

 
oDesk Certified Action Script Programmer
oDesk Certified Adobe Flash CS3 Designer
oDesk Certified Adobe Photoshop 6.0 Designer
Skype Me™!

$7.49 .Com! Score Savings Cartoon Smart Tutorials


839
Unique Visitors
Previous 30 Days
Powered By Google Analytics