A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Noob need help

  1. #1
    Junior Member
    Join Date
    Oct 2004
    Location
    Hannover, Germany ; (Expo City 2000)
    Posts
    6

    Noob need help

    Hi! Im new here, so, first of all, hello everybody! I have holidays at the moment and started with FlashMX 3 days ago. I started a little game and now, I have some questions.

    1.There is the "Key.isDown()" command in the actionscript. Is there something similiar for the left Mousebutton?

    2.I made a symbol with 2 frames. Is it possible to show frame 1 and then, when a button is pressed, change to frame 2?

    3.How can I create a symbol during the movie (game), e.g. bullets or enemys?

    4.Are variables global?

    Thats all for the moment...
    Hope you will help me...

    greertings LordbandworM
    I dont speak english very well,
    so please excuse the mistakes.

  2. #2
    Who, What, Why ... ? Fraggs's Avatar
    Join Date
    Jul 2003
    Location
    Flashland .. where else ?
    Posts
    786
    1.There is the "Key.isDown()" command in the actionscript. Is there something similiar for the left Mousebutton?
    code:
    on(release)

    or
    code:
    on(press)



    2.I made a symbol with 2 frames. Is it possible to show frame 1 and then, when a button is pressed, change to frame 2?
    In the actions panel for frame one place
    code:
    stop();


    Also on frame one, create a button and place the following code in its actions panel:
    code:
    on(release){
    _root.gotoAndPlay(2);
    }


    3.How can I create a symbol during the movie (game), e.g. bullets or enemys?
    code:
    onRelease.createEmptyClip = function();
    //statements


    4.Are variables global?
    Only if you specifiy them to be global using:
    code:
    _global.variableName



    Hope that helps.

  3. #3
    Junior Member
    Join Date
    Oct 2004
    Location
    Hannover, Germany ; (Expo City 2000)
    Posts
    6
    thx a lot!
    I think that helps, but, still i don't understand how point 3 works...
    I dont speak english very well,
    so please excuse the mistakes.

  4. #4
    Who, What, Why ... ? Fraggs's Avatar
    Join Date
    Jul 2003
    Location
    Flashland .. where else ?
    Posts
    786
    If you use that AS to create a global variable on the _root timeline it can be accessed from anywhere in your movie, whereas if you ignored the _global part it would have a limited life span and would eventually 'die'.

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