2 Replies Latest reply: Nov 3, 2014 7:41 AM by Eslam Yosef RSS

    how to create a map that is larger than the game in width and height?

    Eslam Yosef Community Member

      hi,

       

      i wounder how i can create a map(not the design) that is larger than the game in width and height, part of it will appear in the main page and anther part you can move to it after you press the arrow symbol, but the map is just one image so i want put it in line and out line the game page, and the out line part includes buttons and symbols the player can use, but it will be in line and the other part will be out line when you press the left arrow or the down arrow, how i can do that?

      and is that possible to animate it so when the player press the arrow, will give it action to start the animation in one sec, i know how to animate it if that possible but i don't know which code i will use for the mouse click with the arrow symbol, and how to use the same code in the same symbol to start anther animation depending on which part of the map is on?

        • 1. Re: how to create a map that is larger than the game in width and height?
          Ned Murphy CommunityMVP

          To have only a portion of a larger image showing you can either use a mask or you can use a frame.  The mask will only show what is beneath it and a frame blocks all but what is is the open section.  The cleaner approach is more often to use a mask.

           

          As far as the arrow controls, your explanation is not clear (to me).  To have a click of a button initiate the animation you just assign a MouseEvent.CLICK listener to the symbol and have the event handler function process the animation code.

          • 2. Re: how to create a map that is larger than the game in width and height?
            Eslam Yosef Community Member

            I don't know a lot about mask and masked layers and how to work with the normal layers beside i will use some 3D graphics but not in the background, i will explain all this to you to be more clearly.

             

            first i am using action script 3.0

             

            close ex,

            you have 2d map"image"  900*300 pixel.

            this image contains some 2d symbols when you click will go to anther normal map (anther normal layer) so they must appear.

            your game 320*320 px, and the place the map will show on 300*300, and there's basics objects will be in most pages including the page that show the map so i don't know a lot about how this will work with mask layers.

            so you can only see the left side of the map image and what it contains, while there's two arrows one to the left and one to the right there's three cases here,

            first when it show the left side(start from x:0 to x:300), the left arrow will not active when you press and the right arrow will start an animation that make the map image move to the mid side in one sec when you press.

            in mid side (start from x:301 to x:600) the same left arrow will active when you press to send you back to the left side while the same right arrow will be active to send you not to the mid side but to the right side,

            when moved to the right side the same left arrow will be active to send you to the mid and the right will not active when you press and depending on that,

             

            first how to make the large image appear with the three sides in the same place without effecting the other objects "like disappearing them" ?

            and the codes i need in the same left or right arrow symbol to make different actions with the same symbol when clicked depending on which part of the map is on.