How to cut JPG in pieces?

Ask a Question related to Macromedia Flash, Design and Development.

  1. #1

    Default How to cut JPG in pieces?

    I'm doing a puzzle and I want to load a JPG using this code:

    createEmptyMovieClip ("Img",1);
    Img.loadMovie ("Image.jpg");

    Then I want to cut (dynamically) that image in small square pieces. How can
    I cut it? (using "for", "width", ... ?). I want to cut it in this way
    because I want the possibility of loading any image to be used in my puzzle.

    Hope you can help me :)
    Thank you all


    Jose Guest

  2. Similar Questions and Discussions

    1. Media pieces Security
      Hello there, I am wondering that we can put all of our normal media pieces over to flash server, so we can secure them and it won't store on...
    2. Pieces of RSS Feeds
      I want to take pieces of an RSS feed and place them in a flash file that i would create. The RSS Feed I have is boring with no style or colors so I...
    3. How to break the screen into 3D pieces
      Have a touch screen and I want the screen to fracture into pieces the harder they hit the screen. So caputring the screen is doable with the...
    4. 3D : Extrude pie chart pieces to different extruded depths
      I want to make a 3D pie chart with one of the pie pieces not as deep (i.e. extruded) as other piece(s). First, I created a pie chart and the then...
    5. received messages with joined pieces
      since i have installed pack 1 on winxp all messages I receive with joined pieces of the type .pps and others are refuses for inacceptable and I...
  3. #2

    Default Re: How to cut JPG in pieces?

    Hope I understand your question.

    To Cut "Slice" an image up use the guides in Photo shop. (Fire Works)

    Go View guides Top and left.

    Then drag the guide onto your image.
    Do that over and over...

    Then Export as slices...

    You will get many smaller slices.

    Also the Html file to put it back together.

    I just did that also.

    [url]www.12string.net[/url] (Lower right)

    I cut a large guitar chord document into several thousand 120x130 boxes.

    Hope this is what you were asking.

    I know nothing about flash..

    Peace...


    On Thu, 09 Oct 2003 12:50:31 GMT, Jose <mi.correo@no.es> wrote:
    > I'm doing a puzzle and I want to load a JPG using this code:
    >
    > createEmptyMovieClip ("Img",1);
    > Img.loadMovie ("Image.jpg");
    >
    > Then I want to cut (dynamically) that image in small square pieces. How
    > can
    > I cut it? (using "for", "width", ... ?). I want to cut it in this way
    > because I want the possibility of loading any image to be used in my
    > puzzle.
    >
    > Hope you can help me :)
    > Thank you all
    >
    >


    --
    visit the new Community for Guitar Players. The String Network
    [url]www.12string.net[/url]
    www.12string.net at 12string dot Guest

  4. #3

    Default Re: How to cut JPG in pieces?

    Thanks for your help but that's not exactly what I was asking for :)
    Let me explain...

    I've got a big 300x300 image. I want to cut (slices) in pieces of 50x50.
    Then I will have 6x6 cells in my puzzle. I know I can use Photoshop or
    similar to cut the big one to create 6x6 images of 50x50 but I want
    ActionScript to do it for me. I mean... some kind of code which gets a
    300x300 image and return 6x6 of 50x50 images attached to scene in little
    movieclips which, alltogeather, seems as the original 300x300 image.

    (sorry about my english :( ... must improve, I know)

    Well, I note down your explanation too. Perhaps it will help me in future
    projects :)
    Peace for you too.



    "www.12string.net at 12string dot <net" <one> escribió en el mensaje
    news:6d790553d000db7f4e3f7f291cb2c4d7@news.teranew s.com...
    > Hope I understand your question.
    > To Cut "Slice" an image up use the guides in Photo shop. (Fire Works)
    > Go View guides Top and left.
    > Then drag the guide onto your image.
    > Do that over and over...
    > Then Export as slices...
    > You will get many smaller slices.
    > Also the Html file to put it back together.
    > I just did that also.
    > [url]www.12string.net[/url] (Lower right)
    > I cut a large guitar chord document into several thousand 120x130 boxes.
    > Hope this is what you were asking.
    > I know nothing about flash..
    > Peace...

    Jose Guest

  5. #4

    Default Re: How to cut JPG in pieces?

    In flash, you wouldn't literally cut the picture up, but you could duplicate
    it and mask it for the same effect.

    You could duplicate the movie clip the number of times as the number of
    pieces you want, then resize and reposition a mask within the clip based on
    the number and position of the pieces, and rearrange the pieces randomly.
    Then have them snap in place at correct intervals, but not necessarily the
    correct positions. For example, in a 3x3 puzzle, you'd end up with nine
    duplicates of the same clip (with the jpeg in it) with a 1/3 scale mask set
    at even intervals, probably based on the instance name. All it would take
    after that is a simple snap-to script, and a success message when all of the
    pieces are at the correct _x and _y coordinates. The number of pieces would
    be easy to set up as squares of low integers, ie, 1, 4, 9, 16, 25, etc.

    Sounds fun, give me a few weeks.

    : )

    "Jose" <mi.correo@no.es> wrote in message
    news:N3jhb.53269$FN3.3686628@news.ono.com...
    > Thanks for your help but that's not exactly what I was asking for :)
    > Let me explain...
    >
    > I've got a big 300x300 image. I want to cut (slices) in pieces of 50x50.
    > Then I will have 6x6 cells in my puzzle. I know I can use Photoshop or
    > similar to cut the big one to create 6x6 images of 50x50 but I want
    > ActionScript to do it for me. I mean... some kind of code which gets a
    > 300x300 image and return 6x6 of 50x50 images attached to scene in little
    > movieclips which, alltogeather, seems as the original 300x300 image.
    >
    > (sorry about my english :( ... must improve, I know)
    >
    > Well, I note down your explanation too. Perhaps it will help me in future
    > projects :)
    > Peace for you too.
    >
    >
    >
    > "www.12string.net at 12string dot <net" <one> escribió en el mensaje
    > news:6d790553d000db7f4e3f7f291cb2c4d7@news.teranew s.com...
    > > Hope I understand your question.
    > > To Cut "Slice" an image up use the guides in Photo shop. (Fire Works)
    > > Go View guides Top and left.
    > > Then drag the guide onto your image.
    > > Do that over and over...
    > > Then Export as slices...
    > > You will get many smaller slices.
    > > Also the Html file to put it back together.
    > > I just did that also.
    > > [url]www.12string.net[/url] (Lower right)
    > > I cut a large guitar chord document into several thousand 120x130 boxes.
    > > Hope this is what you were asking.
    > > I know nothing about flash..
    > > Peace...
    >
    >

    J-Dogg Guest

  6. #5

    Default Re: How to cut JPG in pieces?

    Mask!... that it's :)
    You've got it. That's what I meant. I will try to do that. The problem will
    be how to set that mask in the JPG which is being loaded inside a MovieClip
    acting as a button blablabla... well. I will try too.

    Let's see in a few weeks then. Thank you very much :)


    "J-Dogg" <j-dogg@quitspammingme.net> escribió en el mensaje
    news:aKjhb.27629$Sn1.26601@bignews4.bellsouth.net. ..
    > In flash, you wouldn't literally cut the picture up, but you could
    duplicate
    > it and mask it for the same effect.
    >
    > You could duplicate the movie clip the number of times as the number of
    > pieces you want, then resize and reposition a mask within the clip based
    on
    > the number and position of the pieces, and rearrange the pieces randomly.
    > Then have them snap in place at correct intervals, but not necessarily the
    > correct positions. For example, in a 3x3 puzzle, you'd end up with nine
    > duplicates of the same clip (with the jpeg in it) with a 1/3 scale mask
    set
    > at even intervals, probably based on the instance name. All it would take
    > after that is a simple snap-to script, and a success message when all of
    the
    > pieces are at the correct _x and _y coordinates. The number of pieces
    would
    > be easy to set up as squares of low integers, ie, 1, 4, 9, 16, 25, etc.
    >
    > Sounds fun, give me a few weeks.
    >
    > : )
    >
    > "Jose" <mi.correo@no.es> wrote in message
    > news:N3jhb.53269$FN3.3686628@news.ono.com...
    > > Thanks for your help but that's not exactly what I was asking for :)
    > > Let me explain...
    > >
    > > I've got a big 300x300 image. I want to cut (slices) in pieces of 50x50.
    > > Then I will have 6x6 cells in my puzzle. I know I can use Photoshop or
    > > similar to cut the big one to create 6x6 images of 50x50 but I want
    > > ActionScript to do it for me. I mean... some kind of code which gets a
    > > 300x300 image and return 6x6 of 50x50 images attached to scene in little
    > > movieclips which, alltogeather, seems as the original 300x300 image.
    > >
    > > (sorry about my english :( ... must improve, I know)
    > >
    > > Well, I note down your explanation too. Perhaps it will help me in
    future
    > > projects :)
    > > Peace for you too.
    > >
    > >
    > >
    > > "www.12string.net at 12string dot <net" <one> escribió en el mensaje
    > > news:6d790553d000db7f4e3f7f291cb2c4d7@news.teranew s.com...
    > > > Hope I understand your question.
    > > > To Cut "Slice" an image up use the guides in Photo shop. (Fire Works)
    > > > Go View guides Top and left.
    > > > Then drag the guide onto your image.
    > > > Do that over and over...
    > > > Then Export as slices...
    > > > You will get many smaller slices.
    > > > Also the Html file to put it back together.
    > > > I just did that also.
    > > > [url]www.12string.net[/url] (Lower right)
    > > > I cut a large guitar chord document into several thousand 120x130
    boxes.
    > > > Hope this is what you were asking.
    > > > I know nothing about flash..
    > > > Peace...
    > >
    > >
    >
    >

    Jose Guest

  7. #6

    Default Re: How to cut JPG in pieces?

    Look at using a mask the size of your fragment in front of the jpeg. Then
    just jostle them about in AS.
    You can't cut up the jpg.


    "Jose" <mi.correo@no.es> wrote in message
    news:rQchb.53195$FN3.3682241@news.ono.com...
    > I'm doing a puzzle and I want to load a JPG using this code:
    >
    > createEmptyMovieClip ("Img",1);
    > Img.loadMovie ("Image.jpg");
    >
    > Then I want to cut (dynamically) that image in small square pieces. How
    can
    > I cut it? (using "for", "width", ... ?). I want to cut it in this way
    > because I want the possibility of loading any image to be used in my
    puzzle.
    >
    > Hope you can help me :)
    > Thank you all
    >
    >

    Ciaran Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139