A Flash Developer Resource Site

Results 1 to 17 of 17

Thread: draggable mask

  1. #1
    hey i want to make an effect where a mask follows the cursor...and below the mask is a blurred image of a proper image of the same picture below it. when i treid it out i cant make the mask draggable. wat can i do to achieve this effect?

  2. #2

    same problem

    I've been trying the same, but no result as yet ...
    Somebody told me it was not possible, but then others contradicted it ...

    Anybody ?


  3. #3

    work around

    there is a way u can do it. there r a few fla files here in flashkit with an example of it...but it just doesnt get thru my head...the actionscripting is a little confusing.

  4. #4

    Smile checking and investigating

    I'll try to look for them and check them out ...
    we're with two working on the case here, if we find something, we'll let you know ...

    can you tell where the .fla's are to be found ... ?



  5. #5
    Join Date
    Sep 2000

    Created an action script for buttons

    stand alone projector

    I want to create a Main Menu prompt within my movie(first frame MC). In this Main Menu(MC) there will be two buttons. The user will be prompted to choose either Button1 (fullscreen, fast computers) or button2 (original stage 600x400, slow computers) before continuing on.

    How would I go about writting the action script for each button? Are there examples source file I could examine to learn this technique.

  6. #6
    It is not possible to drag the mask, but it is possible to make a workaround that fakes the draggin mask. I have seen it done over in experts-exchange. I am not sure how it was done, but if you sign up there and look around in the previously asked questions section of Flash, then you will find it. It was a couple of months back I think.


  7. #7

    Post checked expert exchange

    I tried checking on expert exchange, but they too managed to make the workaround by making the masked layer draggable, and not the mask itself.
    There was a statement that the problem was solved, but not how ...

    I was thinking of making a movieclip that can be positioned on the scene, with spotlight mask in the middle.
    Instead of making the mask draggable, I would then make the movieclip in a whole draggable, with restrictions towards _ and _y with scripting, so that the spotlight (the mask) center cannot fall out of bounds ...
    Or would that be too complicated ??

    I could not figure out another way of doing it ...

    Anybody comments on this one - highly appreciated !!
    Deadline's approaching .... ;-)



  8. #8
    Senior Member
    Join Date
    Aug 2000

    Re: checked expert exchange

    In flash 4 you cannot use a mc as a mask...

  9. #9

    Smile yes - to some extent

    As I posted somewhere around here, you can fake the draggable mask, by creating something resembling it.

    You make a draggable movie clip, and in there you put a button with at least twice the size (hor and ver) of your movie. You adhere the dragging actions to that button - but before you do that, cut out a - as an example for a flashlight - circle in drawing mode. So - once you cut the circle out, you're left with a big rectangle with the look through hole in it (button), that's draggable once you've adhered the dragging actions to it.

    Now - you have an draggable movieclip on the scene with a look through hole in it, showing you what's beneath.
    Two remarks though - you should contain the backgrounds underneath in mv's as well, and give them different names - otherwise, they get dragged along, focusing on point only.

    Second, to completely mimic a mask, you still have to add the boundaries of your movieclip somehow - that way your spotlight stays in the scene, without revealing the trick ...

    I'll post the .fla file when I'm done... ..



  10. #10

    Smile fake draggable mask

    yep - it's true that mask layers cannot be dragged ...
    but thanks to Flash 5 and some twiddling here and there, you can bypass dragging layers, and trick visitors into the same effect ...

    This is what you do to make a spotlight kind of mask :

    1. make a square like double the size of your movie
    2. cut out a circle (or whatever form) in the middle of it - that way you have a look through peeping tom hole
    3. Make that form behave as a button
    4. Let the button be dragged upon rollover, stop the dragging on release, and set the lock center to true, and the l, b, r, t numbers to the respective l, b, r, t of your movie
    5. Include that button in a movieclip, and position it on top of your background, so that the center pivot points of the two merge
    6. Put in the background layer (the layer under the one containing the button that's draggable) whatever you want, like I put lil' kids in there ...

    You'll see they become visible when your mouse is tracking over there ...


    In case a bigger movie is to be combined with other stuff, consider it to put the whole of it in yet another movieclip .... and putting that one on the main scene

    Hopes it helps out where necessary ...

    Later folks ... out !

    Mentor - http://www.bassment.be

  11. #11


    Oeps ...
    Just noticed that the .fla file (www.bassment.be/dev/flash5/dragmask.fla) is displayed in a weird way because of the embedding in html

    I exported it as an .exe too, so that is to be seen as a standalone application as well ...
    You can find it at http://www.bassment.be/dev/flash5/dragmask.exe

    Over and out this time ... !

    mentor - http://www.bassment.be

  12. #12
    Junior Member
    Join Date
    Nov 2000
    That does sound like a simple and easy way to create a mask effect. I just thought I'd mention that I read somewhere that you can simulate a draggable mask by moving everything ELSE. I thought that was a cool approach as well, but not as easy.

    Sometimes it boils down to the simplest idea.


  13. #13
    Beyond the Sea
    Join Date
    Mar 2000

    hehe...where's stickman?

    He's got the best tutorial and sample files on his site:

    and his flash 4 example here:

    but wait, there's more. He's got a soft-edged draggable mask that just kicks butt:

    It involves dragging the whole movieclip with the mask in it, but then, moving the masked object directly opposite the mouse. So, you're not actually dragging the mask, but pushing the movieclip under the mask...

    hope this helps,

  14. #14

    resolved draggable gradient masks - nice

    there's some coding involved, long live copy paste - but draggable mask gradients rule ...

    Gotta master that one too ....

    Thanks for pointing out ...

    mentor - http://www.bassment.be

  15. #15
    Junior Member
    Join Date
    Nov 2000


    A good example of a spotlight mask is at the lexus.com page. They have a pic of the car,
    and then a spotlight mask enables you to
    see inside of it.

    anyways, just wanted to let you know

  16. #16
    Senior Member
    Join Date
    Mar 2000
    Check out my example that I have on flashkit....it has a draggable mask that might help.


  17. #17

    Post thanks for pointing out

    Apparently I wasn't the only one with something like draggable masks in mind ....

    Thanks for pointing out ...

    mentor - http://www.bassment.be

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