Put a layer on the Web - design Tile map

I want to make sure a layer will be above the card when its drawn.

I want a layer on it, cause im making a menu for the game, but the game is above the layer.


var tiles: Object = new Object ({width: 52, size: 26}); The size of the tile "tired." Tiles can be of different sizes, to give the "3-d".
var offset: Object = new Object ({x: 130, y:100});}) This object allows to center the "hero" of the scene.
hero of the var: Object = new Object ({x: 1, y:5});}) The starting position of the "hero".
var canvas: Object = new Object ({mc:_root.createEmptyMovieClip ("canvas", _root.getNextHighestDepth ())}); Contains the information of clip and the map of the main movie.

Canvas.map = new Array (/ / dictates the topography of the environment)
The reason why I decided to use 200 for walls and 100 for ground must leave
Open the option add more tiles, such as 86 for another type of tile that is
within walking distance. Given that the collision detection code checks if the slab is
less than 200 then (less is within walking distance, 200 or above is not), there is no need to change
the tiles again toenable code, simply their name a number between 0 and 200.
new Array (200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200),
new Array (200,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,200),
new Array (200,100,100,100,100,100,100,100,100,100,100,100,193,196,196,196,196,189,100,200),
new Array (200,100,100,100,100,100,100,100,100,100,100,100,194,187,182,182,179,190,100,200),
new Array (200,100,100,199,199,199,199,199,199,199,199,199,199,186,183,183,180,190,100,200),
new Array (201,199,199,199,100,100,100,100,100,100,100,100,194,186,183,183,180,190,100,200),
new Array (200,100,100,100,100,100,100,100,100,100,100,100,194,186,183,183,180,190,100,200),
new Array (200,100,100,100,100,100,100,100,100,100,100,100,194,186,183,183,180,190,100,200),
new Array (200,100,100,100,100,100,100,100,100,100,100,100,194,185,181,181,178,190,100,200),
new Array (200,100,100,100,100,100,100,100,100,100,100,100,192,195,195,195,195,188,100,200),
new Array (200,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,200),
new Array (200,100,100,100,100,100,200,200,200,200,200,200,200,200,200,200,200,200,200,200),
new Array (200,200,200,200,200,200,200)
);

_root. OnLoad = function (): Void
{
InitMap (Canvas.Map); Draw the card
initplayer(); Attract the player

return;

};

_root.onEnterFrame = function (): Void
{
Input(); The keyboard move handle

return;

};

input function (): Void / / modifies the object of 'Hero', manages the collision detection ('Hero' and the wall)
{
No matter what tile under 200 and is within walking distance, all the foregoing is not.
No need to change this code manages more tiles, just name the tiles a number.
(not the best way to do this but simple, quick and easy to do)
If (Key.isDown (Key.Left) & & canvas.map [hero.y - 1] [hero.x] < 200) hero.y -;
another if (Key.isDown (Key.RIGHT) & & canvas.map [hero.y + 1] [hero.x] < 200) hero.y ++;
another if (Key.isDown (Key.UP) & & canvas.map [hero.y] [hero.x - 1] < 200) hero.x -;
another if (Key.isDown (Key.DOWN) & & canvas.map [hero.y] [hero.x + 1] < 200) hero.x ++;

Move();

return;

};

function move (): Void / / move the bottom and the hero
{
These three lines manage exchanging the depths of the tile to give the "3D" effect
var d: Number = (hero.y * tiles.height) + (hero.x * tiles.width) + hero.y;
hero.mc.swapDepths (d);
Canvas.MC ["tile_" hero.y + '_' + hero.x "] .swapDepths (d - 1);

Move the hero in the opposite direction, as the environment moves
Hero.MC._x = (tiles.width / 2) * (hero.y - hero.x) + offset.x;
Hero.MC._y = (tiles.height / 2) * (hero.y + hero.x) + offset.y;

Move the environment
Canvas.MC._x = (tiles.width / 2) * (- hero.y - hero.x) + offset.x;
Canvas.MC._y = (tiles.height / 2) * (- hero.y + - hero.x) + offset.y;

return;

};

function initplayer (): Void / / Self-expalanatory
{
var d: Number = (hero.y * tiles.height) + (hero.x * tiles.width) + hero.y;

Hero.MC = canvas.mc.attachMovie ("hero", "hero_mc", d + 1, {_x:hero.x * tiles.width, _y:hero.y * tiles.height});

Move();

return;

};

function initmap(map:Array):Void / / map rendering
{
var map_height:Number = map.length; Determine the height of the map
var map_width:Number = card [0] .length; Determine the width of the map

for (var y = 0; y < map_height; y ++)
{
for (var x = 0; x < map_width; x ++)
{
MovieClip depth is all that when you make an isometric game
var depth: Number = (y * tiles.height) + (x * tiles.width) + y;

Attach the tile to the "Web".
var tile: MovieClip = canvas.mc.attachMovie ("tile" + map [y] [x], "tile_" + y + "_" + x, depth);

Tile._x = (tiles.width / 2) * (y - x) + offset.x;
Tile._y = (tiles.height / 2) * (y + x) + offset.y;

};

};

return;

};

When your fla is published (or tested), there is no layers.  all displayobjects receive depths based on the code used to assign depths and code of the compiler which attributes from the depths to the objects that put you on the stage in the authoring environment.

all objects placed on the stage in the authoring environment are placed at depths of negative from about of-16, 380.   That's why your menu (which is probably added to a layer in the authoring environment is below the movieclip you place to nextHighestDepth() (which adds to no less than zero depth))

to change a movieclip depth use the method swapDepths() of movieclips.

Tags: Adobe Animate

Similar Questions

  • Put a layer of the action on a layer with a "clickTAG" element

    Hello

    I'm doing some research on the creation of clcikTags. I read some places that the clcikTag is on the top layer.

    Which was fine, but now I want to loop and I used to put my actions in the upper layer. This will cause a problem? I'm better off-putting just my action loop on the last keyframe on the layer of clcikTag?

    Thank you!

    Babs

    ActionScript layers are not relevant to the interaction of the user.

  • How can I put my flex on the Web site?

    Hello

    Recently, I have developed a web application for flex and now I wanted to put on the internet. I know that there are pretty much free webhost but I am bit confused as in how I start. Application that I built using PHP and MySQL database. I am currently runnning on WAMP server.

    Could you please let me know exactly how I can host it on the internet.

    Your response will be very useful.

    Thank you

    Pratik

    Maybe you were referring to the implementation of a PHP application. My understanding is that most web hosting companies have installed PHP and you simply upload your .php files to your site.

    Gordon Smith

    Adobe Flex SDK team

  • Digital fax put in place in the web server integrated shows "invalid entry".

    I have an officejet Pro 8600 more than we use fax digital network folder option with.  Our installation worked fine for several months and the other day I noticed that we receive no faxes in the network folder.  I go through the installer with the built-in web server, and when I save and test I get an error of "invalid entry".  Technical support has been absolutely no help.  Hoping that someone out there has an idea that might work.  To make matters worse, when I turn off the digital fax I get is even more print faxes.  They just disappear! Any help is appreciated.

    Hello

    In Internet Explorer, open the built-in web server, click the ALT key and then click on tools on the main menu.

    Click compatibility view settings, and then click the Add button.

    Click Close, and then follow the fax to electronic-mail/network folder option.

    You can see any difference?

  • How do you put one layer behind the other part?

    In photoshop, I am doing a logo. I want the ends of each "S" in this image to go in the other, but I don't want the whole S behind the other. How can I do this?

    Add a layer mask by clicking on the mask icon in the layers panel. Ctrl/cmd click on the layer icon to make a choice:

    Ctrl/cmd-alt/opt-shift-click on the icon to the other layer. Will you limit so the selection just areas exceeded shape both knees. Select the layer mask, and with a paint brush of black paint on the areas you don't want.

  • Move the layer, but keep the layer in the Web?

    Can someone help me?

    I'm not exactly sure how to describe my question correctly. But what I want is that when I move a layer selected example to the left I want parts that normally goes outside the canvas to appear to the right.

    You want to wrap around to select the layer, and then use the menu Filter > other > offset in its dialog box enable wrap around using the sliders or type a pixel count more or less number for vertical and horizontal offsets. Works even on Basemap layers. Layer must be a raster layer, if there is a layer mask, I think more often than you would like it linked layers also content or you can use the offset on the mask or the content.

  • Is it possible to put a picture on the homepage design Solutions?

    Hello

    We build a PRM system and we want to spice up our application. We have added a photo on the home page by creating a world wide Web Applet, but it doesn't seem to be a feature in the other tabs. Since the Solutions tab is a tab that serves more partners we (also) want to place a photo on this homepage. Does anyone know if this is possible and if so, how?

    I hope you guys can help!

    Thanks in advance
    Welcome them
    Vincent

    Hi, go to the Admin-> Application-> Solution customization-> Applet Web Solution-> New (with location as 'HomePage') to place the image in the homepage of solution

    -John CRMIT

  • How can I put a layer of the element forward

    I want the code allows you to bring things forward.

    The same way I do in flash using addChild where he brings this symbol above others?

    How would I do that with the codes?

    Use the z index with css:

    SYM. $('symbole') .css ("z-index', 99");

    Here's the example using z-index to give you an idea:

    https://www.box.com/s/odo689lhanqtjgnxfwv4

  • Access files outside the web root?

    Hello, everyone.

    Hypothetical scenario.

    I wanted to have a file that would set globally accessible variables to contain passwords, and I want to put this file outside the web root, so that users can not access.

    Logical pathnames of course won't work.  And the cfinclude tag doesn't use physical paths.

    I've never done this before.  What are my options?

    Thank you

    ^_^

    Almost all your CFML files should not be in a directory web-driven!  That those people really are looking for should be accessible web.

    Files must not be accessible to be web - ed or be instantiated as objects, or used as a custom tag.

    FOR EXAMPLE:

    C:\webapps\myapp<= this="" dir="" is="" the="" root="" as="" far="" as="" coldfusion="" is="">

    C:\webapps\myapp\wwwroot<= that="" dir="" is="" the="" webroot="" as="" far="" as="" the="" web="" server="">

    C:\webapps\myapp\includes<= files="" you="">

    C:\webapps\myapp\api<=>

    The only things that should be dir wwwroot files people really browse (index.cfm, etc.) and components such as images, JS and CSS files that must be served to the browser.

    Most of your CFM files must be in a subdirectory of C:\webapps\myapp.

    So index.cfm must be traveled, and it must use the data in secretSecureStuff.cfm which is in understand this respectively.  Then index.cfm is just:

    include "/ myapp/includes/secretSecureStuff.cfm";

    If the file to include is not in the structure of subdirectory myapp for some reason, you can create a mapping in CFAdmin or Application.cfc to point to it, for example:

    /External. => C:\stuff\somewhere\else

    And you référenceriez C:\stuff\somewhere\else\outside.cfm via:

    include "/ external / outside.cfm";

    --

    Adam

  • Type cast using the Console Design

    Hi all

    I am using the function java.util.Hastable.put (key, value) using the OIM design console. The function expects two objects as parameters to the card. I want to map a string to a string. While the string is a subclass of the object, IOM design concole does no direct mapping. Variables of type other object will simply not available in the menu dropdown.

    Q: How have the input parameters when the expected type is a superclass of the real parameters, using the console of design ?

    Kind regards

    Jan Willem

    There are com.thortech.xl.util.adapters.tcUtilHashTableOperations utilities that can help you to create and add values in a hash table. You can find the documentation in the java docs included in the location SDK\javadocs\util.

    -Kevin

  • VIX file in the user interface designer receives the data from the Web service application that communicates with the SQL server database

    I created the Web service VI ("Mt-insolacije.vi"), which has two terminals of the input string (FROM / TO) for the dates of arrival and exit of two data terminals (table 1 d) from database (MS SQL server). This VI communicates with the database with functions of the database with a DSN and SQL query appropriate palette. There are two tables with two data (time and Insolation) columns in the database.

    This VI works when you run in Labview 2010, but when I used it as VI in UI Builder it returns no data.

    Could you please help me find a solution. Is it possible to communicate with the SQL server database in this way or there is another way?

    There are two files attachmet: Image of .vix file in Interface builder and .vi file ("Mt-insolacije.vi")

    Please help me ASAP!

    Thank you

    Ivan

    I found the solution problem is in the DSN. I've been using the user instead of DSN system DSN.

    It's important to create the system DSN if you want your VI of web service to communicate with the database.

    PS Please put feature bundle format timestamp and XY graph in the web user interface designer. It's complicated to trace data with datetime on X axis without them.

  • Where did my design go?  I created 4 pages for web design and I was finishing up the home page, all the other 3 pages have simply disappeared, the layers are empty? I spent 4 days design that... How to make that back?

    Adobe Muse: Web design.

    Where did my design go?  I created 4 pages for Web design and I was finishing up the home page, all the other 3 pages have simply disappeared, the layers are empty? I spent 4 days design that... How to make that back?

    I restarted the laptop,

    creates a new document and quickly made 3 new pages... and yet once... These pages have disappeared?

    Please provide a quick solution for me because I have to present my work to the customer.

    Did you remove all traces of high level in the layers (i.e. "layer-1") Panel?

    When something like you describe is reported, most often the user does not understand the layers of high level exist across all pages and updates on the page of your site. If you delete "Layer 1" you may remove the content of all pages of your site.

  • I can't capture scrolling screenshots of Web pages more since the new design of the tab.

    Since the launch of the new design label in Firefox, I can't use the scrolling screenshot of page in standalone clients or modules. I can capture scrolling web pages in other browsers, but Firefox is my main browser and I don't want to switch to Chrome. Is there another medium or that I have to wait for the next version of Firefox that solves this problem.

    Window capture for 2 different stand-alone clients place the box above the tabs that seems to prevent any scrolling. All the advice that can get this working again? I tried using SnagIT and PicPick Portable. Does not work for the latest version of FireFox. Thank you.

    Shows details of the system;

    Plug-ins installed

    Shockwave Flash 14.0 r0
    Shockwave Flash 13.0 r0

    and

    Adobe PDF plugin for Firefox and Netscape 11.0.07
    Adobe PDF plugin for Firefox and Netscape "9.5.5.

    Having multiple versions of a program can cause problems.

    Update your Shockwave Flash v14. http://get.Adobe.com/Shockwave/

  • Update of Firefox, and now all of the web pages and icons are inflated. How do I put back it as it was?

    Update of Firefox, and now all of the web pages and icons are inflated. How do I put back it as it was?

    Hello

    Firefox on Windows is now after display, scaling options that can make the biggest text on screens at high resolution.
    You can adjust the resolution of your screen.
    To change it follow these steps:

    • Type of topic: config in the Firefox address bar and hit the Enter key.
    • If the warning that this might void your warranty , click I'll be careful, I promised.
    • Search for layout.css.devPixelsPerPx

    • Double-click layout.css.devPixelsPerPx to edit its value. The default value is - 1.0 in Firefox 22 and above. Change it to 1.0 to run as in previous versions of Firefox.

    If necessary, further adjust the value of 0.1 or 0.05. Values between 1.0 and around 0.5 to reduce the size of the elements. Use a value greater than 1.0 to increase the size. For example, a value of 1.25 will increase the font size of the 125% to account for the default DPI setting in Windows 8. Check the value that you enter. Definition of a value that is too small will take everything away and too high will explode things.

    If the web pages should always be adjusted so you can watch the extension Default FullZoom Level or NoSquint .

    To adjust the font size for the user interface, you can use the extension of theme font & size changer .

    This solve your problems? Please report to us!

    Thank you.

  • Hi, I put the web filtering to the general, but there are some * site that always appears. Please notify

    Hi, I put the web filtering to the general, but there are some * site that always appears. Please notify

    Hi EddyMoe,

    You have encountered this problem because the site is not popular enough, or the content of Web site changes frequently that it has not been classified as an adult site. Security checks family with service of content classification to determine the category of the site. For more information about how Family Safety determines the web content, please refer to this article. To avoid this, you must change your level of web filter to Allow list only. To do this, follow these steps:

    1. connecting the account parent in http://fss.live.com
    2. under the child's name, click change settings
    3. Select the Web filtering.
    4 adjust the slider for web filters in list only or to your preferred configuration.
    5. click on Save.

    6. click onWeb filtering lists.
    7. Enter the web address that you want to allow in the box and click allow.
    8. click on Save.

    Finally, please always remember to update the family safety filter so you can have the latest parental control settings.

    Thank you!

Maybe you are looking for

  • Triggers of analog input output meter with delay

    Hello! I am currently using a PCI-6251 DAQ card with a block of connection BNC-2120.  I have a VI (one that is attached to this topic) that will essentially be an analog input signal and produce digital impulses from the output of the meter to each i

  • Windws xp error 0 x 80244019

    I bought a computer with windows xp home edition.  the computer has been restored to manufacture and reloaded windows.  I try to get updates to windows, but I get an error message 0 x 80244019.  What should I do to override that?

  • AZ-605 new incredibly slow

    I have new AZ-605-UR23 which is a really nice computer, but is incredibly slow.  I migrated to a more old Pentium 3 Windows XP set up that was lightning fast. I must say at the outset that my computer skills are minimal so feel free to correct any as

  • Acer Aspire E1 - 510 wireless Fn key does not

    Hello, I have a laptop of E1 - 510 with licensed Windows 8.1 Pro and when I press the Fn + F3 (Wi - Fi on / off) nothing happens. I installed everything on the Acer's Support site. All other Fn keys work except this one. Could you please help? Thank

  • Opening. PSD files

    Can I open the files in .psd Photoshop elements on my Mac (OS El Capitan) 14?