need urgent help on flash for mobile device
A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: need urgent help on flash for mobile device

  1. #1
    Junior Member
    Join Date
    Nov 2005
    Posts
    21

    need urgent help on flash for mobile device

    currently i am doing a game on mobile device, need some guildence if you can help. First i am totally new to flash and only know a few basics of flash. My game screen is 176 px by 208 px, now i am having trouble in using the scroll pad on the mobile phone( which is the up, down, left, right and enter key). As you know normal mobile phone games can use the pad to scroll and select the options they want. For my game, there is 4 buttons created, which is the New game, Instruction, About and Exit. how or what i need to do in order to select them by using the scroll pad or number key? Thank you for you time reading, hope you can help.

  2. #2
    Moderator
    Join Date
    Apr 2001
    Location
    Akron OH, USA
    Posts
    4,841
    the simplest way to make a menu in Flash is to create a movie clip that moves a highlight indicator underneath the menu items list.

    1) make a movie clip, add 1 layer for each item in your menu.
    2) in frame 1 of the movie clip add a static text box to each layer. (put a stop Action to prevent mc autostart)
    3) put the required text in each text box:
    New Game
    Instruction
    About
    Exit
    4) add a new layer named "background" (this should be the bottom most layer so that the text will apear above the background layer)
    5) in frame 1 put a colored rectangle that is large enough to fit behind menu item 1.
    6) add a new keyframe to this layer and shift the position of the rectangle to go behind menu 2. (be sure to add enough frames to the layers with text boxes so they appear throughout the timeline.). Do this for all menu items.

    Use the up/down events to play nextFrame() or prevFrame() to shift through the menu.

    on(keyevent "<Up>"){
    // go to previous frame or stop at frame 1
    tellTarget("target path to mc"){ prevFrame(); }
    }

    on(keyevent "<Down>"){
    // go to next frame or stop at last frame
    tellTarget("target path to mc") {nextFrame();}
    }

    This will not support wrap around but gets you started. You can check _currentframe and use if/then statement to support wrap around menu navigation.
    aviarts.com - web development and flash development

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

Poll by Flashkit.com