dcsimg
A Flash Developer Resource Site

Results 1 to 10 of 10

Thread: Beginner - Need guidance - Questions

Hybrid View

  1. #1
    Member
    Join Date
    Jan 2005
    Posts
    60

    Beginner - Need guidance - Questions

    Hey, I'm a major beginner at Flash (I don't know anything about it, really), and wondering about things. Is there anyone that is willing to help me with flash on AIM? My screenname is Crouching Lotus0 and I'm on often. I would just like to ask a couple of questions on how to do basic manuvers (for example, if I'm stuck on a tutorial or something while learning). I realize I can't ask "how do I make a movie," but I would just like a guide for simple questions. If you could help me, that would be great. Anyways, I have a question regarding actionscript and games.

    I'm doing a project for school regarding flash, and I want to make a small little game that demonstrates some action script. My game would be that you have a box that pops out of random places and whenever you click it, you get a point, whenever you miss, you get one added to "missed." Now, I do not have any idea on how to attempt this, really. Could anyone help me (also, if you could help me, could you tell me HOW to do it as opposed to just giving me the actionscript. I'm trying to learn actionscript).

    Thanks in advance for everything.

    P.S. The tutorials are great here, I'll be looking over them in the next couple of days.

  2. #2
    See-n-reMember azwaldo's Avatar
    Join Date
    Mar 2003
    Location
    Sonoran Desert
    Posts
    745

    welcome to FlashKit

    howdy anonymous member, and welcome to FK

    "Is there anyone that is willing to help me with flash on AIM? My screenname is Crouching Lotus0 and I'm on often. I would just like to ask a couple of questions..."
    This is more difficult than you might think. I have been in several conversations like this and it has not been very productive ( different time zones, something else comes up, etc.) Still, I think you will find these boards at FK to be quite dynamic. I have rarely waited more than an hour or two after posting a question to see some response.

    Specific questions seem to be addressed most rapidly. It might be best to just start making a movie, and post a question when you get stuck (attaching the .fla for review).

    Meanwhile, keep browsing the tutorials, and you might add these to your browser's favorites:

    Perfect Newbie Starter Tutorial

    http://www.kirupa.com/developer/actionscript/index.htm
    http://www.actionscript.org/tutorials.shtml
    http://www.moock.org/webdesign/flash/
    http://www.macromedia.com/support/fl...pt_dictionary/
    __azwaldo__

  3. #3
    Senior Member mandissected's Avatar
    Join Date
    Jan 2005
    Location
    Berwick - England
    Posts
    338
    I'm fairly new to flash, probably played on it for around 12 hours making 3 basic games. I think I could help you out on your game, it sound's pretty simple. Maybe after we solve this one we can help each other out some more and challenge each other to get better.
    If your interested e-mail me

  4. #4
    did0bib chero's Avatar
    Join Date
    Jun 2004
    Location
    in a bar, under the sea
    Posts
    751
    Posting is definitely more productive + others benefit from your posts, since many have similar problems & solutions can often be found by searching the forum.

    I also add a link - the page I've put up there with the resources I use:
    http://www.dcalcomp.avalon.hr/lynx/lynx.html

    and another great site I've stumbled upon:

    http://www.phong.com/tutorials/

    Enjoy your stay on FK

  5. #5
    Member
    Join Date
    Jan 2005
    Posts
    60
    Oh and by the way, I have flash 5.5

  6. #6
    Member
    Join Date
    Jan 2005
    Posts
    60
    It seems I got the score and miss codes working (still, I would like to know if I did them correctly, code following).


    on (release) {
    var miss=miss+1;
    }


    The button is one big button in the background that if you click it, miss goes up one. Now is there a way I can do this by making it do something like if I release outside of the score button, my miss goes up one.

    And for the button.


    on (release) {
    var Score = score+1;
    }


    This is right, right?

    Anwyays, I just need to know how to make the button reappear in different places (see thread in newbie forum).

  7. #7
    See-n-reMember azwaldo's Avatar
    Join Date
    Mar 2003
    Location
    Sonoran Desert
    Posts
    745
    You can have a small target button above the background button in your layer stack; then if the user clicks outside of the small button he is already on the background (miss) button.

    Also, it a good habit to declare variables on the main timeline (in frame 1 of an 'actions' layer), that makes the variable accessible to scripts anywhere else on the timeline (movie clips, buttons); then you refer to those variables with a path (_root. - a reference to the location of the variable)

    So, place this in the actions layer:
    Code:
    var miss;
    var score;//careful, your post had this capitalized
    //in one place but not in the other
    ...and then use these for the buttons:
    Code:
    on (release) {
      _root.miss++; 
      //this increments the variable by 1, 
      //use it instead of var miss=miss+1;
    }
    
    on (release) {
      _root.score++;//increments var by 1
    }
    am working on an explanation of the random location feature...
    Last edited by azwaldo; 01-29-2005 at 12:18 AM.
    __azwaldo__

  8. #8
    See-n-reMember azwaldo's Avatar
    Join Date
    Mar 2003
    Location
    Sonoran Desert
    Posts
    745

    random location

    okay, i started to work up a demo, but maybe you can sort this out on your own - would be a better exercise to learn with, anyway.

    there are several things that need to happen for a random location feature to work

    1) place the small (target) button inside a movie clip, give the clip instance that is onstage a name (i'll use "target")

    2) create a fxn (on main timeline) to generate a random location by assigning new target._x and target._y values (use the random method for this, see this page for info)

    3) call the fxn after each try

    work through this, and post if you get stuck - also, attach your .fla
    __azwaldo__

  9. #9
    Member
    Join Date
    Jan 2005
    Posts
    60
    Thanks for the help, I'll tell you if I have any questions (didn't try it out yet) when I do it. I don't really understand the purpose of the "root" command, but I'll go look it up so you don't have to tell me.

  10. #10
    did0bib chero's Avatar
    Join Date
    Jun 2004
    Location
    in a bar, under the sea
    Posts
    751
    _root refers to the main timeline - since your 'miss' and 'score' variables are placed in the main timeline actionScript, _root simply tells flash where to look for them so it can change their value.

    Or as azwaldo wrote:
    you refer to those variables with a path (_root. - a reference to the location of the variable)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center