I need some help!

A place for tutorials on how to get the most out of Flash

I need some help!

Postby RandomBoss » Fri Aug 05, 2016 2:43 am

Hello! this is my first post and I wanted to get some help

I am self-taught illustrator and lately I have begun to think I want to make a game. I have been about 2 days trying to find tutorials to help me explain how to create codes from 0 in AS3. But I have not got, at least not what I looking for.

I would like to create a simulator slaves. where you have to buy, sell. train slaves. but in a more personal way. for example when training your slave, you have to understand their feelings, physical health, diseases i dont know

as Jack or nine for example. but with the mechanics of Breeding Season. and some tower defense. I know it sounds somewhat complex for someone just starting in Flash
but now I have the time.

And yes, my English sucks. so I apologize for that, is not my native language, but fully understand what I read, so no problemo!


can someone help me or guide me how can I accomplish this?

Spoiler (click to show/hide):

Image
Image


I think it´s simple. I need to go from the Map A to B. and other locations.

Thanks!
RandomBoss
Newly Registered
 
Joined: Fri Aug 05, 2016 2:18 am

Re: I need some help!

Postby GoRepeat » Fri Aug 05, 2016 4:01 am

Well there are two basic approaches you can take depending on if you want to be more design with code support or more code with design support. Option 1 is that each of your "maps" is its own class that you then add to the stage when you click or press whatever object is currently on the screen. Option 2 is that you create a keyframe for each map on your main timeline then use gotoAndStop commands to flip around between them. Either way, since you are deciding to go with AS3 (which is very bold for a newbie to Flash), you need to get used to event handlers. These are commands that control triggers and call functions in response to those triggers. So let's say you have a button called "btnMapA" and a button called "btnMapB". You would want to create an event handler that looks like this:

Code: Select All Code
addEventListener(MouseEvent.CLICK, gameClick);  //gameClick would be the name of the function triggered when the event (mouse click) occurs

public function gameClick(e:MouseEvent):void{  //"e" is the variable we will use to refer to the mouse being clicked
    switch(true){ //simple switch statement to control what happens when you click the mouse (cleaner than a bunch of "if" statements)
        case e.target.name=="btnMapA": gotoAndStop("mapA"); break; // in the case that "e" (the mouse click)'s target's name is "btnMapA" then goto and stop on the frame "mapA"
        case e.target.name=="btnMapB": gotoAndStop("mapB"); break; // in the case that "e" (the mouse click)'s target's name is "btnMapB" then goto and stop on the frame "mapB"
    }
}


That is about as simple as it gets. As you add more maps to your main timeline and label them, you can just add a new row to the switch command defining the button name and the target frame to go to when it is hit.
Picarto LiveStream: https://picarto.tv/GoRepeat
Other Stuff: Click Here
User avatar
GoRepeat
Moderator
 
Joined: Wed Jul 21, 2010 2:26 am
Location: Behind the Looking Glass

Re: I need some help!

Postby ANooB » Fri Aug 05, 2016 4:38 pm

I'd go the compositional route. Use your design skills to make some layouts in flash and have a coder make classes that tell your artwork how to behave. This allows you to have visual control. Use other slides for possible screen variations (ie navigation frame, load frame, save frame, battle frame, train frame, etc.).
Spruce your games up using free vector content: viewtopic.php?f=45&t=7109

There're no such things as mistakes, just happy little accidents. ~Bob Ross
User avatar
ANooB
 
Joined: Mon Aug 09, 2010 12:58 am

Re: I need some help!

Postby RandomBoss » Sat Aug 06, 2016 7:10 am

Thank you so much Gorepeat! i will try to do my best :geek:

If I have another question, it´s ok to post here again? I mean, I do not want to bother anyone with my noob lvl 1 questions <.<

ANooB Wrote:I'd go the compositional route. Use your design skills to make some layouts in flash and have a coder make classes that tell your artwork how to behave. This allows you to have visual control. Use other slides for possible screen variations (ie navigation frame, load frame, save frame, battle frame, train frame, etc.).


Thank you for the advice!
I will try to draw 2 backgrounds and 1 character for this test, and some layouts.

I don´t know if it's the place but i will post here when i´m done my first test

:D
RandomBoss
Newly Registered
 
Joined: Fri Aug 05, 2016 2:18 am

Re: I need some help!

Postby GoRepeat » Sat Aug 06, 2016 3:14 pm

This forum is for noob lvl 1 questions, so no worries
Picarto LiveStream: https://picarto.tv/GoRepeat
Other Stuff: Click Here
User avatar
GoRepeat
Moderator
 
Joined: Wed Jul 21, 2010 2:26 am
Location: Behind the Looking Glass

Re: I need some help!

Postby ANooB » Sat Aug 06, 2016 5:58 pm

Doit, man. I'll code them up real quick. I'm an as3 iron chef. ;)
Spruce your games up using free vector content: viewtopic.php?f=45&t=7109

There're no such things as mistakes, just happy little accidents. ~Bob Ross
User avatar
ANooB
 
Joined: Mon Aug 09, 2010 12:58 am


Return to Tutorials



Who is online

Users browsing this forum: No registered users