User Tag List

Results 1 to 4 of 4

Thread: Loading Tiles with APO (EXAMPLE INCLUDED!)

  1. #1
    No Products Registered

    Join Date
    Aug 2006
    Location
    The Netherlands
    Posts
    35
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Loading Tiles with APO (EXAMPLE INCLUDED!)

    Some topics ago, I learned from DavidN how to use the Active Picture Object (APO) to load tiles. For my editor, it would be best to load the tiles, from which the user has to select, in a different layer at scrolling 0,0, so that they do not follow the screen like the tiles which are 'stamped' on the map.

    At this moment, I made it possible to view one tileset (of each 13 tiles) at one time on screen in the editor. There are a BACK and FORWARD buttons to go through the different tilesets. However, when loading the tilesets, things go wrong. One or more of the tiles do not load at all and are just skipped!

    I minimized my code for the example as the following:

    Start of frame
    Do
    Start loop "Load Tiles To Select"
    + Counter"TileSet" = 1
    + Counter"TileNo" = 1

    On Loop "Load Tiles To Select"
    DO
    (Create Backdrop (Counter"X-coordinate"),200,(Counter"TileNo"x100-100),(Counter"TileSet"x50),74,38)
    + Counter"TileNo" = Counter"TileNo" + 1
    + Counter"X-coordinate" = Counter"X-coordinate" + 80

    On User clicks on Button"NextTileSet"
    Do
    Start Fastloop 13 times
    + Counter"TileSet" = Counter"TileSet" + 1
    + Counter"TileNo" = 1
    + Counter"X-coordinate" = 0

    I made a short example of the similar code i use in my editor. You can download and try the it at:
    http://www.box.net/shared/1nio5p8bty

    Just extract all the files in a directory. It includes a build .EXE, the source and the tileset picture. It is important that the tileset picture is included, otherwise the tiles won't load.

    I do not understand what i am doing wrong. The Code seems ok, and so is the output sometimes, but most of the time it is not.

    Am I doing something wrong, or is it the APO?

    Cheers, Hugo

  2. #2
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleSWF Export Module
    DavidN's Avatar
    Join Date
    Jun 2006
    Location
    Boston, MA, USA
    Posts
    4,044
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Loading Tiles with APO (EXAMPLE INCLUDED!)

    I think I actually know what's going on here... the APO's "Add backdrop" function gets X and Y co-ordinates in an unusual way, especially when they're on non-scrolling layers, and that can make it look like it's skipping rows/tiles. Trouble is I can't remember exactly what fixed it... I think it might help if you set the APO to not "Follow the frame" in its properties, but I will check later on if that doesn't work.

  3. #3
    No Products Registered

    Join Date
    Aug 2006
    Location
    The Netherlands
    Posts
    35
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Loading Tiles with APO (EXAMPLE INCLUDED!)

    I already tried to uncheck the "Follow the frame" option, this however does not work. I've been trying to figure it out all day, spending my free day on it, but i didn't find out what went wrong. Pretty frustrating, and from what i hear from you, it does not seem to be really something stupid i did either.

    What i did do, is 'skipping' the first tile and start with the second paste, because especially the first does not do what it should. Although this would make the editor workable, things still go wrong. It seems it does not (always) skip tiles, but at some point also loads the wrong tiles. You can check out my editor in the link below, where you can see that often goes ok, but pretty often not as well:

    http://www.box.net/shared/01hsph8f1f

    Controls:
    - Click on specific tile to be able to paste it on screen
    - Left click assigns tile to left button, right click to right button
    - Use Ctrl to center screen on mouse position
    - Click arrow buttons to change tile sets

    I Hope at some point you can remember how to fix this, if possible. Otherwise i guess i will use AO's, since at the moment it is just not good enough..

  4. #4
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleSWF Export Module
    DavidN's Avatar
    Join Date
    Jun 2006
    Location
    Boston, MA, USA
    Posts
    4,044
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Loading Tiles with APO (EXAMPLE INCLUDED!)

    The problem isn't what I thought at first - rather, it looks like your loop to load is starting but in some cases not finishing, and I'm not sure why that would be without looking at the code itself...

Similar Threads

  1. Trouble loading images from machine using Flash Image Plus Gold (mfa included)
    By Apex in forum SWF/Flash Export Module Version 2.0
    Replies: 9
    Last Post: 11th November 2011, 03:14 PM
  2. Endless Tiles
    By Jeff in forum iOS Released Games & Apps
    Replies: 0
    Last Post: 7th October 2011, 02:35 PM
  3. Tiles?
    By Atom in forum File Archive
    Replies: 5
    Last Post: 22nd April 2009, 05:49 PM
  4. Moving tiles
    By GWGord in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 9th September 2008, 05:39 PM
  5. Background Tiles
    By mercedes1 in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 12th March 2007, 01:21 AM

Posting Permissions

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