Dragging masked movie clips

Can anyone point me in the right direction?
I've been playing around with making a draggable movie clip.
This movie clip appears within a container, holder_mc, which is
masked by a mask layer to control what is seen. I can drag
holder_mc around the screen, but the mask does not move with it.
When I hit the movie_btn, I cannot see my VideoPlayer.swf file. If
I do not drag holder_mc anywhere, and just press my movie_btn, I
cannot drag my swf file. Is there an easy way to have the mask and
holder_mc drag together, and have drag functionality even after my
swf is playing?
Here is what I'm using:
movie_btn.onRelease = function (){
holder_mc.loadMovie ("VideoPlayer.swf");
holder_mc.onPress = function(){
this.startDrag(false);
holder_mc.onRelease = function(){
stopDrag();
Thanks for any help.

Couple of ways... simple enter_frame, or enter_frame TweenLite
addEventListener(Event.ENTER_FRAME, updateReflection, false, 0, true);
function updateReflection(e:Event):void
     refClip.x = mouseX;
     refClip.y = mouseY;
or using TweenLite to give it a little softer motion:
function updateReflection(e:Event):void
    TweenLite.to(refClip, .5, {x:mouseX, y:mouseY});

Similar Messages

  • Help with smooth scrolling (masked movie clip)

    Ok, I really need help here, and I'll be very grateful for
    help before Monday.
    Someone has made a movie with a different set of text on each
    frame, the text goes out of the viewable area.
    I have been asked to make these frames appear in a pop-up on
    another flash and be scrollable.
    i thought this would be easy...just cut and paste them into a
    movie clip, then using a mask to hide the rest of the text.
    However, it is going painstakingly slow.
    Seems to be a performance issue, but it might be my code.
    Any help with the code, or optimisation elsewhere would be
    helpfully.
    Heres a simplified version of the flash;
    www.darkflame.co.uk/flashwork/Flash_popuptest.fla
    Code for the scrolling;
    _global.MoveUp = function(text) {
    _root.ITproduct.IT_productlist._y =
    _root.ITproduct.IT_productlist._y+6;
    updateAfterEvent();
    //trace('press');
    Called and stopped by;
    on (press){
    //this._parent.IT_productlist._y =
    this._parent.IT_productlist._y +10;
    //_global.scrollon = "yes";
    clearInterval(IntervalID);
    IntervalID = setInterval(MoveUp,100);
    updateAfterEvent()
    //updateAfterEvent();
    //MoveUp();
    //scroll on
    on (release) {
    //this._parent.IT_productlist._y =
    this._parent.IT_productlist._y +10;
    clearInterval(IntervalID);
    updateAfterEvent();
    //scroll off
    which is linked to a button.
    I dont know if this is a actionscript problem, or the way the
    page is made, or both.
    Any help would be appreciated.
    Thanks in advance,
    Thomas Wrobel

    you have extraneous graphics on-stage that are slowing the
    scrolling (and even causing problems in the authoring environment).
    here's your file with those graphics removed:
    http://www.gladstien.com/Files.popupTest.fla

  • Mask - movie clip loaded from .swf

    Hi!
    I have made an application where a movie clip (map_mc) is
    masked by another movie_clip (map_window_mc:
    map_mc.setMask("map_window_mc");
    This works fine until I try to load an "external" .swf into
    map_mc:
    map_mc.loadMovie("Testmap.swf");
    Then the mask does not work anymore......
    Any suggestions?
    (The testmap.swf is also displaced from map_mc.........)
    I use Flash 2004 MX pro
    terjem

    terjem,
    > My problem is probably that I really don't know wath
    event
    > handler I should use...
    Depending on the approach you're using, there may not even
    be an event
    handler when the external SWF loads. If you're using the
    MovieClipLoader
    class, there will be. If you're using a
    MovieClip.onEnterFrame loop, there
    won't be.
    > Here is the first ("non-automatic") code that works:
    Okay.
    > map_mc.loadMovie("Testmap.swf");
    > trace("Loading started!");
    > this.onEnterFrame = function() {
    > if (
    > map_mc.getBytesLoaded() > 0 &&
    > map_mc.getBytesLoaded() >= map_mc.getBytesTotal()
    > ) {
    > trace("Loading complete!");
    > trace("File width: " + map_mc._width);
    > delete this.onEnterFrame;
    > } else {
    > trace("File width: " + map_mc._width);
    > }
    > };
    Okay. So far, so good. When bytes loaded is greater than
    zero and
    greater than or equal to bytes total, you'll know the
    external SWF has fully
    loaded. You'll know, because the "Loading complete!" trace
    will be visible
    in your Output panel. Well, that means the place in this
    script that
    represents "where to put additional code" is right were your
    trace()
    functions are. Not in the "else" clause, but the first one
    this.onEnterFrame = function() {
    if (
    map_mc.getBytesLoaded() > 0 &&
    map_mc.getBytesLoaded() >= map_mc.getBytesTotal()
    trace("Loading complete!");
    trace("File width: " + map_mc._width);
    [delete these trace() functions, if you like]
    [add your masking code here]
    delete this.onEnterFrame;
    // etc.
    > The code below does not work (the positioning of the
    > map_mc works, but not the setMask):
    Your problem may be right here ...
    > map_mc.setMask("map_window_mc");
    ... because "map_window_mc" is in quotes. Yes, the
    ActionScript Language
    Reference says the parameter of setMask() may be a string,
    but leave the
    quotes out and see what happens. In any case,
    David
    stiller (at) quip (dot) net
    Dev essays:
    http://www.quip.net/blog/
    "Luck is the residue of good design."

  • Dragging movie clip from Event pane to Project pane

    When I drag a movie clip from Event to Project the top part of the clip is cut off. On body pictures I am losing people's heads! The movie clips play perfectly in the Event panel, so I know they were imported correctly.

    There are two things to look at.
    First, what is the aspect ratio of your project, and is it the same as your camera is shooting?
    If your camera is standard (4:3), set your project to 4:3. If your camera is wide-screen (16:9), set your project to 16:9. You can do this in FILE/PROJECT PROPERTIES.
    Second, if your project contains a mix of 16:9 and 4:3, that is OK. You just pick the aspect ratio that you prefer. Then on each clip, go into the Rotate, Crop, Ken Burns Tool and select FIT or CROP.
    FIT will letterbox (black bars). CROP will cut off the top and bottom. You can decide which you prefer.

  • Playing different Movie Clips onRollover?

    I have several buttons that I would like to play different
    movie clips
    onrollover on the stage. So if button 1 is rolled over it
    plays a clip
    in the lower right corner and when rolled off it stops and if
    button 2
    is rolled over it does the same.
    How is this done?
    Thanks!

    This is the code I am currently using to play and stop a
    movieclip:
    myPlay_btn.addEventListener(MouseEvent.CLICK, playMc);
    myStop_btn.addEventListener(MouseEvent.CLICK, stopMc);
    function playMc(e:MouseEvent):void{
    my_mc.play();
    function stopMc(e:MouseEvent):void{
    my_mc.stop();
    1. How do I drag my movie clips onto the stage, but not have
    them
    display until the button is rolled over?
    2. Would this code just be applied for each button and
    modified from
    CLICK to OnRollover?
    Thanks!!!!
    kglad wrote:
    > assign a rollover listener to button 1 and in its
    listener function apply the play() method to your right corner
    movieclip. likewise for button 2.

  • Export a only a Movie Clip

    I am building an interactive website as my final project for my Webmastering class and need to know one thing. First I'll give you my setup. I have four Movie Clips in four seperate layers on my main timeline. I want to export one of those Movie Clips as an avi file. When I use export>movie, it exports the main timeline. I figured it would do that. So then I opened up the Movie Clip that I want to export and tried the same thing again. No luck. Anyone have any ideas on how to remedy this situation. I have five days to do this and have spent about four days of my life working on this if you add up all the hours that I have spent working on this. I really really need help. I don't want it all crashing down on me because I can't simply export a movie clip...
    Thanks in advance,
    Darth Haxor

    Create a new blank document with the same parameters - size, fps, etc. - as the one the movie clip you want to export is on. Have both documents open at the same time. Select the new document by clicking on its tab, and then open the library window.
    On top of the library window is a drop down list of all libraries that belong to currently open documents. Go there and select the library of the original document. From that library grab and drag the movie clip you want to export onto the stage of the new document you created. Position it where it belongs. Now you can export this new document, containing only the one movie clip you want to export.

  • Locking Movie Clips Together?

    I have 50 movie clips containing images. what I need is that
    when I drag one movie clip, they all move at the same time and the
    same way as if I was moving all of them. I can't put them in a
    container movie clip because I need to know their _x and _y
    positions at all time.
    Can anyone help?
    Thank You! :)

    at the start of your drag (onPress) assign some variables to
    store the initial _x and _y properties of the movieclip being
    dragged and initiate a loop (like setInterval() or onEnterFrame).
    in the loop adjust each of your other movieclip's _x and _y
    properties by the same amount as the change in the dragged
    movieclip's _x and _y properties.
    terminate the loop when you stopDrag().

  • Importing 16:9 .mov clips

    I've searched the discussions and the apple site for an answer but no luck so far.
    I've imported some .mov clips in 16:9 aspect ratio but when I share the finished project with iDVD the resulting movie is "squished", for lack of better word, and the people are elongated (pillarboxed?). So far I've tried unchecking the pillarboxing/letterboxing option in the iMovie preferenes but I think this is for importing from cameras only. Anyway, it didn't work; the resulting movie is still affected. If I drag the .mov clips directly into an iDVD project the finished DVD is in 16:9, except now I have 5 short movies rather than one feature length movie. Is there something I'm doing wrong or is this a shortcoming of iMovie?
    Thanks, Dennis

    Klaus,
    I'm not using QT as an intermediary but only to view the .mov files I downloaded from the internet. I compare that with the disc image I burned in iDVD. I use QT to view the original .mov files and Apple's DVD player to view the disc image.
    To summarize, I downloaded 5 .mov "acts" which make up an entire movie. It was available for download this way instead of the entire movie all in one file because it was too big a file (I guess), or maybe it was made in 5 different acts available at different times. Anyway, I wanted to put them all together into a complete movie using my existing software options. I thought to import them into iMovie and then share to iDVD and burn a DVD. I can do all that but in the final product the actors are elongated, so I figured the original was in 16:9 format. The problem seems to originate when I import the files into iMovie. So, I viewed the original .mov files with QT to see if they looked elongated and they did not. I even put the origiall .mov files directly into a iDVD, not "stitching" them together with iMovie, burned a disc image, and they look fine. I assume importing the .mov files into iMovie "squishes" them together and they come out elongated. I just can't figure out what I'm doing wrong. I thought maybe your suggestions would solve this probem but it didn't. Should I convert the .mov to some other file first, such as .avi or .mpg4?
    I really appreciate you trying to help me.
    Dennis

  • Movie Clip / Buttons

    I know this is probably something really easy to do I just
    for whatever reason cannot make this work. I am new to flash and am
    building an entire website. I used a template that I purchased and
    have been messing around with it and changing it. Problem is the
    buttons that are made are movie clips not actually buttons. I want
    to create a duplicate button, so I created a duplicate of the movie
    clip in the library. Problem is when I drag the movie clip into the
    movie and run the flash preview the new movie clips do not work
    like the other ones – meaning the other ones behave like they
    should – as a button (when I move my mouse over it the action
    works) but the new ones just appear as images. I know this must be
    a very easy fix and I must be doing something wrong. Any help would
    be greatly appreciated – (I might not have explained the
    problem accurately, so if more clarification is needed or an
    example needs to be uploaded let me know)
    Thanks a lot!!!

    Thanks that worked great, hope that wasn't too noob : (
    Well another problem as come up, I made another flash movie
    containing content in an xml file. When the swf is hosted and in
    the browser it works fine. However when i put that same swf in an
    html document and host it the xml never loads. Am i doing something
    wrong?
    Thanks in advance,
    ~Rob

  • .mov clip loses quality

    I imported a .mov clip into final cut, then I drag the .mov clip onto my timeline, but the clip loses quality when it's on the timeline.  I exported it using the h.264 format and it loses quality.  The loss of quality of the video is very noticeable.
    Does someone have an answer for this?  And, what do I need to do for my video clip to maintain its original quality when I put it on the timeline and when I export it?  Please let me know.  Thanks

    Michael Grenadier wrote:
    so studio...  who's gonna win tonight?
    Probably no one - and we'll subjected to a never ending barrage of political ads forever
    ... oh ... the ... HORROR ....
    x

  • Movie clip RemoveEventListener isn't working - AS3

    Friends,
    what seems to be a pretty straightforward code doesn't seem to work. I have a movieclip on the stage( this is on the second frame while the first one is the login screen). On this movie clip i load a textarea.
    When the screen goes from 1 to 2, i setup a zoom listener on the movie clip. Once the user initiates a zoom on the movie clip, i add two move event listeners (mouse down and up) to drag the movie clip. After all is done, i restore the movie clip to it's original position. In this restore code, i remove the mouse down and up events. But i don't think the remove event listener is working as i could still drag the clip(mouse down and up events are still active).
    What could be the issue ? Am i missing something here ?
    Thanks

    This is onZoom();
    public function onZoom(event:TransformGestureEvent):void
                // When the stage throws the gesture zoom event, enlarge the stage.
                event.stopImmediatePropagation();
                scStage.scaleX *= event.scaleX;
                scStage.scaleY = scStage.scaleX;
                if ( ! scStage.hasEventListener(MouseEvent.MOUSE_DOWN) ){
                    scStage.addEventListener(MouseEvent.MOUSE_DOWN, onDown);
                if ( ! scStage.hasEventListener(MouseEvent.MOUSE_UP) ){
                    scStage.addEventListener(MouseEvent.MOUSE_UP, onUp);
    and this is restore code - both are in the same frame;
    public function onRestore(event:MouseEvent):void{
                scStage.width = mwidth;
                scStage.height = mheight;
                scStage.x = mx;
                scStage.y = my;
                scStage.removeEventListener(MouseEvent.MOUSE_DOWN, onRemove);
                scStage.removeEventListener(MouseEvent.MOUSE_UP, onRemove);
    scStage is the movie clip.
    however, i solved this problem in a different way as the eventlistener removal didn't work. if the component has been restored to the original position, i take appropriate action. thanks for your time.

  • How to add a code so my drag and drop movie clip will not stick  once it is dragged to final place o

    Hello all and kglad, I have to use the old drag and drop code on my movie clips, but the problem is when I drag the movieclip to the area on my .swf file once i release it, it sticks to the hand mover.
    I am encloseing the action script I am using could someone or kglad tell me what is missing from the code so that once it is released it will not stick, see code below
    circle.onPress = function(){
    startDrag(this);
    circle.onRelease = function(){
    stopDrag();
    I am desparate for help on this must get project ready for this afternoon
    Seal55

    there's nothing wrong with that code but it would be better to use:
    circle.onPress = function(){
    this.startDrag();
    circle.onRelease = function(){
    this.stopDrag();
    but that won't solve your problem.  there must be something else going on like a depth issue.  you may need to use swapDepths() to bring your circle under the mouse when releasing.

  • Can't drag and drop or import movie clips or ver. 8 projects into iMovie 9

    Hello:
    I just installed Leopard (OS X) with iLife and iWork (although I didn't actually install iWork). I can't drag and drop .mov or .dv files into a project. If I "File-->Import-->Movies", all the types I want to import (.mov & .dv) are grayed-out. I created and saved a project with the older version of iMovie (8) and then tried to import it into iMovie 9. The result is a message in the clips panel that says "No matching video. Choose a different options from the Show pop-up menu at the lower left corner." So far, everything I wanted to do is bust. Can somebody help?
    Thanks.
    Etude.

    annadex wrote:
    I have tuns of .mp4 clips, converted them to .mov clips... .
    How?
    easy way:
    • double-click mp4 to open it in QuicktimePlayer.app
    (does it play the video?)
    • File/Export/choose 720p (if optional, if not 480p)
    • import THAT into iMovie using iMovies import routine, proceed …

  • Zoom, drag and drop in a movie clip

    if zoom a movie clip...i want drag and drop the mc...and also don't go the mc outside the screen..pls help me...:(

    To drag within a limited area you use the startDrag() method, defining a rectangle to limit how far the object can be moved in any direction.  The startDrag is normally executed when a MOUSE_DOWN event occurs for the object that is to be dragged.  A MOUSE_UP event is what is used to trigger a call to the stopDRag() method, whereby the listener for that is usually assigned to the stage.
    Search Google for a tutorial using terms like "AS3 drag drop tutorial" if you need detailed coding help to get started.

  • Drag and Drop Movie Clips onto Plugin

    Hi All,
    We've built a plugin for Adobe Flash CS5.5, with a tree control in the plugin.
    We wish to be able to drag and drop movie clips from the canvas onto the plugin. Wondering if anyone could point me in the right direction?
    regards,
    -amit

    Hi,
    If you are developing the plugin in Flash, have you tried to listen to NativeDragEvent.NATIVE_DRAG_ENTER and NativeDragEvent.NATIVE_DRAG_DROP ?
    Once the plugin behaves like an AIR Application, you should have access to its API.
    I hope it helps !

Maybe you are looking for