A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: [F8] Click item to select, click grid space to fill

  1. #1
    </hate> dtone314's Avatar
    Join Date
    Jun 2005
    Location
    CA
    Posts
    262

    [F8] Click item to select, click grid space to fill

    Hey all. I am making a design center where the user is able to select an object by clicking on it, click on a square in the grid, and have that space in the grid fill with the object selected. All of my objects being selected/filled into grid space are squares. I'm not quite sure how to go about this, and the search results are hard to relate to my topic. I know there needs to be some kind of hit test, but I'm not sure where things would go. Anyone want to take on a challenge? The help would be very much appreciated. Thank you in advance!
    -dtøne-
    Flash CS4 | AS2
    Life is a journey, not a destination.

  2. #2
    :
    Join Date
    Dec 2002
    Posts
    3,518

    Maybe try something like this...

    See attached file...

  3. #3
    </hate> dtone314's Avatar
    Join Date
    Jun 2005
    Location
    CA
    Posts
    262
    You are awesome! That's very close to what I'm looking for. Would it be difficult to alter the code to include pictures? Let me explain in more detail:

    I want to be able to select a picture (like selecting a color). I then want to click on a movie clip and have it load a different picture into that movie clip.

    I have attached a picture for better understanding. The tiles to select are on the right. After clicking on a selection, click on a ceiling tile in the picture on the left to make your selection appear in that space. Let me know if I'm unclear. Thanks for your help dawsonk!
    Last edited by dtone314; 11-23-2009 at 02:03 PM.
    -dtøne-
    Flash CS4 | AS2
    Life is a journey, not a destination.

  4. #4
    :
    Join Date
    Dec 2002
    Posts
    3,518
    Yes, you can use pictures...
    Last edited by dawsonk; 08-22-2007 at 10:51 AM.

  5. #5
    </hate> dtone314's Avatar
    Join Date
    Jun 2005
    Location
    CA
    Posts
    262
    Very cool. Now instead of generating a grid from actionscript and loading pictures into that, would it be possible to load pictures into odd shapes I create? Maybe into movie clips?

    What I'm loading into won't always be square. There will be several different shapes. If you look at the image I attached earlier you will see that the tiles in the ceiling are different shapes because of the camera angle. Each tile space in the ceiling has a corresponding image to load into it. That way it will look like a seamless image replacement. Can anyone point me in the right direction on that? Thank you!
    -dtøne-
    Flash CS4 | AS2
    Life is a journey, not a destination.

  6. #6
    </hate> dtone314's Avatar
    Join Date
    Jun 2005
    Location
    CA
    Posts
    262
    bump...
    -dtøne-
    Flash CS4 | AS2
    Life is a journey, not a destination.

  7. #7
    Script kiddie VENGEANCE MX's Avatar
    Join Date
    Jun 2004
    Location
    England
    Posts
    2,590
    Quote Originally Posted by dtone314
    Very cool. Now instead of generating a grid from actionscript and loading pictures into that, would it be possible to load pictures into odd shapes I create? Maybe into movie clips?

    What I'm loading into won't always be square. There will be several different shapes. If you look at the image I attached earlier you will see that the tiles in the ceiling are different shapes because of the camera angle. Each tile space in the ceiling has a corresponding image to load into it. That way it will look like a seamless image replacement. Can anyone point me in the right direction on that? Thank you!
    Sorry, there's no quick workaround for this kind of problem. You're just gonna have to put lots of empty movie clips into place manually, name them manually, and make a timeline in each of all the possible tiles that could be in their place (the fill tool would change the frame of the clicked movie clip).
    http://www.birchlabs.co.uk/
    You know you want to.

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