How to make an intereactive 'Catching' game using Flash [Kitsunequeen]

View previous topic View next topic Go down

How to make an intereactive 'Catching' game using Flash [Kitsunequeen]

Post by Lonin on Mon Feb 25, 2013 5:12 am

Created by Kitsunequeen - Unfortunately we don't have a link to your page, so if you're Kitsunequeen, then please give us a link. Thanks!

First you need to start a new file in Flash. Make it any size you want as long as it's large enough to accommodate your adoptable that will be running around it for your users to catch.


Secondly, establish some kind of background for your pets to run around on. It can be anything, just as long as it fits to the stage. For added challenge, you can create layers with objects your pets can even hide behind when they move!


Now to create the moving adoptable link itself. Basically, you import an adopt image of choice (if you are using eggs, use the adopt that hatches out of it because moving eggs int he wild is kind of weird). Make sure that the adopt is on its own layer-one on top of the background but also underneath any obstacles you might have set up in another layer (top layer works).


Select your adopt image on the stage and convert it into a Movie Symbol. Now double-click it and make it a Movie Symbol again. Double-click it a third time now, and make it a Button Symbol.


Now that you have your button, you're going to have to give it an Instance Name. Making its Instance Name the same as the one you gave it when you turned it into a button symbol is highly recommended.


Now make a new layer and make it your actions layer. Open your actions window, and paste the following code in:
InstanceName.onRelease=function(){
getURL("http://www.yourweblinkhere.com", "_blank");
}



Change the instance name in the code to that of your button's name, and the link to the link of the adoptable you want your site users to catch.

An interesting way to do this is to use the Promo Code feature on MA to your advantage. Enter a Promo Code, grab the link to the adopt after submitting the code, and paste the link into your actions in flash. That way your users won't be able to get the adopt any other way besides playing your game Smile

In any case, now go back one to where the button is a movie clip. Make a few keyframes and tweens for it to move. The faster it moves and more directions it changes, the harder and more challenging it is to catch.


Now to add more just follow the same steps, and you have your catching game! However just remember to use a different name and link for different adopts, you don't want to have people trying to click several moving adopts that are all the exact same thing, it takes out a lot of the fun.

Some Important things to consider though if you are using a new version of Flash!
In order for this code to work, you MUST go into your publish settings, and set your Actionscript to 2.0 like shown in the image below:

Click here for a finished example!

If there are any questions about certain things, things you're not clear on or issues that arise while using this tutorial, feel free to let me know. Hope this tutorial helped or inspired you to make your own flash games for your site!
avatar
Lonin
Community Advisor
Community Advisor

Posts : 139
Beak Points : 1961
Reputation : 3
Join date : 2013-02-25
Age : 104
Location : Lonin is a Lonin, therefore lives in a cave >;3 Hehehe. - That's cool :D

View user profile

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum