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:

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

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

  1. kredit online beantragena Says:

    Hey! I know this is somewhat off topic but I was wondering which blog platform are you using for this website? I’m getting tired of Wordpress because I’ve had problems with hackers and I’m looking at alternatives for another platform. I would be awesome if you could point me in the direction of a good platform. kredit online beantragen

  2. kreditrechner immoibilienb Says:

    Hey! I know this is somewhat off topic but I was wondering which blog platform are you using for this website? I’m getting tired of Wordpress because I’ve had problems with hackers and I’m looking at alternatives for another platform. I would be awesome if you could point me in the direction of a good platform. kreditrechner immoibilien

  3. rechtsschutzversicherung testt Says:

    Good day! I could have sworn I’ve been to this website before but after checking through some of the post I realized it’s new to me. Anyhow, I’m definitely glad I found it and I’ll be bookmarking and checking back frequently! rechtsschutzversicherung test

  4. Gruener tee wirkungc Says:

    My spouse and I stumbled over here from a different web page and thought I should check things out. I like what I see so now i am following you. Look forward to looking at your web page again. Gruener tee wirkung

  5. guenstige hausratversicherungj Says:

    Great blog! Is your theme custom made or did you download it from somewhere? A theme like yours with a few simple tweeks would really make my blog jump out. Please let me know where you got your design. Many thanks [url=http://yorxx.de/cont_19.html]guenstige hausratversicherung[/url]

  6. foods to avoid for acid reflux Says:

    Along with almost everything that seems to be developing inside this particular subject material, all your perspectives are generally quite stimulating. Nonetheless, I beg your pardon, but I do not subscribe to your entire plan, all be it stimulating none the less. It appears to us that your remarks are generally not completely validated and in reality you are yourself not really totally confident of the point. In any case I did appreciate reading through it.|I do enjoy the way you have framed this particular problem and it really does offer me personally some fodder for thought. Nevertheless, through just what I have witnessed, I only wish as the actual responses stack on that folks remain on point and in no way start on a tirade associated with the news du jour. Yet, thank you for this outstanding point and though I do not really concur with this in totality, I regard your perspective.|A lot of of whatever you point out is supprisingly precise and it makes me wonder why I hadn’t looked at this in this light before. This particular piece really did turn the light on for me as far as this particular subject goes. However there is 1 position I am not really too comfy with and while I attempt to reconcile that with the main theme of your position, allow me see exactly what the rest of your visitors have to say.Nicely done.|The heart of your writing while sounding agreeable at first, did not work properly with me after some time. Somewhere within the paragraphs you managed to make me a believer but only for a very short while. I nevertheless have a problem with your leaps in assumptions and you would do well to fill in those gaps. In the event that you can accomplish that, I could definitely be amazed.|In the great design of things you actually receive an A with regard to hard work. Exactly where you misplaced me personally ended up being in your particulars. As it is said, details make or break the argument.. And it could not be more accurate right here. Having said that, allow me inform you just what did do the job. Your authoring can be quite convincing which is most likely why I am taking the effort to comment. I do not make it a regular habit of doing that. 2nd, although I can easily see the jumps in reasoning you make, I am not really certain of exactly how you seem to connect the details that help to make the actual conclusion. For right now I will subscribe to your position but wish in the foreseeable future you connect the dots better.}

  7. rechtsschutzversicherung preisvergleichp Says:

    Howdy! Someone in my Facebook group shared this website with us so I came to take a look. I’m definitely loving the information. I’m bookmarking and will be tweeting this to my followers! Wonderful blog and wonderful design. [url=http://yorxx.de/cont_14.html]rechtsschutzversicherung preisvergleich[/url]


Trackbacks/Pingbacks

  1. Play Games says:

    your opinions…

    onto others, you need to use on-line games which are available at no cost to identify the talents of…

  2. gave the…

    the care guardians should be taking over the younger people. But they’re helpful sources which provide customers with more options…

  3. muscle top says:

    [...]we like to honor many other internet sites on the web, even if they aren’t linked to us, by linking to them. Under are some webpages worth checking out[...]……

    [...]Here are some of the sites we recommend for our visitors[...]……

  4. term costs of a less than favorable…

    outcome may be. the price of a specialized legal defense is certainly worth it. many attorneys will work with you to provide options to make representation affordable, accepting credit cards or arranging payment plans to allow you to defer payment to…

  5. your test results will not be accurate…

    either. it doesn’t matter whether you were drunk or not. if the results were not accurate they are not valid. a good lawyer will know how to verify its accuracy.should that fail, the attorney may ask them to validate the machine…

  6. noisy route…

    video games can therefore be used as a way of conserving young people away undesirable web pages. They are very…

  7. Digg this…

    While checking out DIGG today I noticed this…

  8. Gaming Fun says:

    will be…

    free online video games turn out to be an industry of its own which remains very vibrant today. Changes in society and life necessitate…

  9. Great website…

    [...]we like to honor many other internet sites on the web, even if they aren’t linked to us, by linking to them. Under are some webpages worth checking out[...]……

  10. in the round…

    should you migrate from one continent to a different and still desires to take pleasure in your recreation your may be inhibited by lack of…

  11. to the baby. it can cause premature…

    births and low birth weight babies. the long term effects on children as they grow are not known.herbs and botanicals are offered for sale by off and online herbal smoke shops. one such herbal smoke shop (see below) offers 100% pure…

  12. Play Games says:

    here today…

    computer systems full time, they nonetheless undergo exhaustion and must do something different for a break. Thus free online games make it potential…

  13. clip on chandelier…

    [...]that will be the finish of this article. Here you will come across some web sites that we think you will appreciate, just click the links over[...]…

  14. Recent Blogroll Additions……

    [...]usually posts some very interesting stuff like this. If you’re new to this site[...]……

  15. rest assured mattresses…

    [...]Here are a number of the web pages we advise for our visitors[...]…

  16. iasbet says:

    Digg this…

    While checking out DIGG today I noticed this…

  17. millbrook beds…

    [...]although web-sites we backlink to below are considerably not connected to ours, we really feel they are truly really worth a go through, so possess a look[...]…

  18. powerpoint design…

    [...]Here is a superb Weblog You might Find Exciting that we Encourage You[...]…

  19. water softener…

    [...]check beneath, are some absolutely unrelated websites to ours, having said that, they may be most trustworthy sources that we use[...]…

  20. millbrook beds…

    [...]just beneath, are various absolutely not related internet sites to ours, having said that, they’re surely really worth going over[...]…

  21. contemporary rugs…

    [...]one of our guests a short while ago suggested the following website[...]…

  22. fire alarms says:

    fire alarms…

    [...]always a big fan of linking to bloggers that I really like but really don’t get a lot of link really like from[...]…

  23. forward thinking…

    Within these you can find programs which might be suitable to different…

  24. to escape it and enjoy smoke free…

    living. the majority of renters are very interested in a smoke-free rental property inside and in the outdoors common areas. if you are apartment hunting, some of the benefits of apartments with no smoking policies could include: better health: even if…

  25. digi article blaster…

    Wow, great weblog layout! How lengthy have you been running a blog for? you make running a blog look easy. The overall look of your web page is incredible, let alone the content material!…

  26. ps vita says:

    dealing with the customers?basically in most cases…

    of internet marketing you are probably the sole or chief person dealing with the buyer. be friendly, honest and reliable in all your dealings with potential clients. join forums and get to know other internet marketers and learn from them so…

  27. make to…

    video games variations regardless of the place you reside. It is not uncommon with certain on-line games to search out that individuals in a single…

  28. and fish lightweight flies effectively. if you…

    are fishing with a dry (or floating) fly the bubble is filled partially with water. if you are fishing a wet (or sinking) fly the bubble is filled completely with water. this rig can be used is both lakes and rivers,…

  29. may have heard of herbs described in…

    terms of the five flavors: bitter, sweet, salty, sour or spicy. an herb’s taste does not refer to its flavor, but rather to its effect on qi, blood, fluids, and phlegm. sour herbs have a concentrating action. they are prescribed to…

  30. Hemp Protein says:

    Blogs ou should be reading…

    [...]Here is a Great Blog You Might Find Interesting that we Encourage You[...]……

  31. New Excerpt says:

    in front…

    you can obtain the purpose of molding the character of younger individuals without utilizing force or other coercive mechanisms which can be…

  32. buy online because they know the business…

    they are buying from will absorb shipping for them if they spend a certain amount. in this way, online businesses are able to dictate just how much their customers spend at minimum – something brick and mortar stores could never do.with…

  33. wp syndicator…

    I really like your article. It’s evident that you have so much information on this topic. Your points are effectively made and relatable. Thanks for writing engaging and attention-grabbing material….

Leave a Reply

Security Code:

Free PageRank Checker

$7.49 .Com! Score Savings Cartoon Smart Tutorials

oDesk Certified Action Script Programmer oDesk Certified Adobe Flash CS3 Designer oDesk Certified Adobe Photoshop 6.0 Designer

2,815
Unique Visitors
Previous 30 Days
Powered By Google Analytics