Filling the Box with a little picture

Hi,

I want to make a little flash application which is just about filling a box with a default picture, size 10x10. What I want is, when a user draw a box with mouse, to fill this box with default picture.

Could you actually help me to do it?

Thanx
RomBerry

Hi RomBerry

This is all about events and responses.

Firstly you’d have to respond to the user’s mouse and draw a box.

Then, when the box is draw, import the picture.

To import the picture, create an empty movieClip, as a child of the box movieclip and load the picture into it.

Voila!

Thank you for your answer rufusW.

I found an example on the internet, where user can draw a rectangle and fill it with a colour if neccessary.

Could you just explain more detailed how I can import the picture in the box actually?

Thank you
RomBerry

Sure.
What you need to do is this:-

  1. Create an empty movieClip.

  2. On this movieClip craete 2 empty MovieClips. When you make the movieClips you need to specify the depth. It’s important that the highest level is the box and the lowest level is the picture! You could even call the movieClips ‘box’ and ‘picture’! :hugegrin:

  3. In your ‘box’ movieClip you draw your box (In response to your user).

  4. And then, in your picture movieClip, you import your picture. Use loadMovie to load a Jpeg into the picture movieClip.

Having said all that, if your box is always going to be 10x10 you could always have a movieClip in the Library and just load it from the library.

rufusW, thank you so much.

It was really so helpful. Now I have to figure out all these things and make the application :pleased: