limit for video clips following the mouse

Here's my ACE...

myInterval = setInterval(KBMOglobal,15);

function KBMOglobal () {}
KBMOglobal1._x = (KBMOglobal1._x - _xmouse) / 10;
KBMOglobal1._y = (KBMOglobal1._y - _ymouse) / 10-2;
}

OK, so my video clip follows the mouse around, with a slight delay and the y axis is slightly lowered. the scene of my film is 380 x 640. someone has suggestions on how to create a border, equal to the size of my stage, which leaves no film clips that follow the mouse to extend to the beyond? Does still make sense? Basically, I'd like to as video clips to follow the mouse, the stay of entire film visible on the scene clip. due to the positioning of elements on the stage which initiates this function, I must only consider the width of each clip, which fortunately is a constant = 200. Does this make any sense? Let me try this one more time...

How to set the above function for the clip, KBMOglobal1 (which has a width of 200) remain in the horizontal limits of the scene (which is 380)?

Thank you for your time and all members of this forum who was very helpful with all my questions in this project so far, yall rock!

Quote:
Posted by: NickTheNameless
It's almost works perfectly, however I need to adjust the limit of axis x. for some reason, the video stops after the mouse when it comes to halfway on scene, horizontally.

could you please be so kind as to explain what your script is doing? because I'm not a fool, I realize that I could probably replace 380 to 760 (double the width of the scene) and it works as expected. However, if you could spare the time to explain what the following two lines do, step by step... I'll give you my first born...

KBMOglobalGeneralCancelDispatch._x<0?KBMOglobalGeneralCancelDispatch._x=0:KBMOglobalGenera>
KBMOglobalGeneralCancelDispatch._x > 380 - KBMOglobalGeneralCancelDispatch._width? KBMOglobalG eneralCancelDispatch._x = 380 - KBMOglobalGeneralCancelDispatch._width:KBMOglobalGeneralCancel Dispatch._x;

Thanks again for your time!

do you know? : operator? It's as if... else... statements,

When we say:

somethingIsTrue? do1(): do2();

This is exactly the same direction as:

If {(somethingIsTrue)
do1();
} else {}
DO2();
}

Now, we look at this line:

KBMOglobalGeneralCancelDispatch._x<0? kbmoglobalgeneralcanceldispatch._x="0:">

It is same as

If (KBMOglobalGeneralCancelDispatch._x<0)>
KBMOglobalGeneralCancelDispatch._x = 0
} else {}
KBMOglobalGeneralCancelDispatch._x
}

Tags: Adobe Animate

Similar Questions

  • I'm looking for video clips that I can use to open and close my video with a third lower, y at - it a link to download these templates?

    I was looking for video clips on the theme, like a clip that opens and closes my video and with the lower thirds

    the lower third models are here, if that's what you're looking for?  Library, title, missing model projects templates: Premiere Pro, After Effects, yet

  • bringing a video clip at the top of the order of the layers on mouse.

    I have 3 video clips on the stage in separate keyframes: mag1, mag2 & mag3

    trying to bring each mc on mouse up.

    mag1.addEventListener (MouseEvent.MOUSE_OVER, up, false, 0, true);

    function up(evt:MouseEvent):void
    {
    setChildIndex (MovieClip (evt.target), numChildren-1)
    }

    GETTING THIS ERROR.

    ArgumentError: Error #2025: the supplied DisplayObject must be a child of the caller.
    at flash.display::DisplayObjectContainer/setChildIndex()
    at skate_fla::MainTimeline/up()

    Thanks in advance for the help!

    It is possible, you should use "evt.currentTarget' instead of"evt.target"I think that if you use instead of MOUSE_OVER ROLL_OVER it wouldn't matter that you used.

    In addition, you can simply use addChild() to bring an object to the top...

    function up(evt:MouseEvent):void
    {
    addChild (MovieClip (evt.currentTarget));
    }

  • Sometime this week, my MacBook Pro has lost its sound. I can't listen to anything that has the sound of iTunes for video clips. It is no longer a Volume icon (speaker w / lines of radiation) on my Menu bar

    Sometime this week, my MacBook Pro has lost its sound. I can't listen to anything that has the sound of iTunes for video clips. It is no longer a Volume icon (speaker w / lines of radiation) on my Menu bar. My MacBook Pro is a mid-2012, 2.3 GHz Intel Core i7 Memory 16 GB 1600 MHz DDR3 OS X Version Yosemite 10.10.5

    Graphics Intel HD 4000. Can anyone help?

    Thank you very much!

    Thai-Anh

    Reset NVRAM may solve it.

    How to reset the NVRAM on your Mac - Apple Support

    Or system preferences > sound, check on 'Volume to see the menu bar' to show the volume of the sound in the menu bar.

  • Clicking on a video clip selects the entire clip, rather than the range.  I did the update and it still happens.  Help!

    Problem * by clicking on a video clip selects the entire clip, instead of cuisiniere.* *.

    I restarted my computer like new.  Lost the iMovie app.  Re downloaded in the App Store.  Now I have a crappy iMovie on the App Store application.  Then I made, I got the updated version and I did.  Always update does not resolve the problem.  I'm sucking in a hole because I need to make new videos for work and I can't.  In addition, I'm too broke to buy Final Cut.  In addition, all apple stores have a waiting list of 5 days before they see you!  Thank you Apple with a 6 bites taken out of it!

    I had a similar problem and it was driving me crazy. I think you press and hold the 'R' key now to select a range, otherwise, it will select the whole clip. I think it's a goal a feature and not a bug? Hope that helps!

  • How can I make characters follow the mouse?

    Hello, I am designing a new game. I wanted to add the feature to have the character be controlled mouse. I tried different ways, but none of them does not seem to work. How can I do for where the character following the mouse at a constant speed?

    package

    {

    import flash.display.Stage;

    import flash.events. *.

    import flash.ui.Keyboard;

    import flash.display.MovieClip;

    SerializableAttribute public class extends MovieClip Hero

    {

    public var stageRef:Stage;

    public var health: Number = 6;

    public var speed: number = 2;

    public var leftPressed:Boolean = false;

    public var rightPressed:Boolean = false;

    public var upPressed:Boolean = false;

    public var downPressed:Boolean = false;

    public void Hero()

    {

    stage.addEventListener (KeyboardEvent.KEY_DOWN, keyPressed);

    stage.addEventListener (Event.ENTER_FRAME, loop, false, 0, true);

    stage.addEventListener (KeyboardEvent.KEY_UP, keyReleased);

    }

    public void loop(e:Event):void

    {

    {if (leftPressed)}

    x = speed;

    } else {if (rightPressed)

    Speed x +=;

    }

    {if (upPressed)}

    y = speed;

    } else {if (downPressed)

    y += speed;

    }

    }

    public void keyPressed(event:KeyboardEvent):void

    {

    Switch (Event.keycode)

    {

    case Keyboard.LEFT:

    leftPressed = true;

    break;

    case Keyboard.RIGHT:

    rightPressed = true;

    break;

    case Keyboard.UP:

    upPressed = true;

    break;

    case Keyboard.DOWN:

    downPressed = true;

    break;

    }

    }

    public void keyReleased(event:KeyboardEvent):void

    {

    if(Event.keycode == Keyboard.Left)

    {

    leftPressed = false;

    }

    If (event.keyCode is Keyboard.RIGHT)

    {

    rightPressed = false;

    }

    If (event.keyCode is Keyboard.UP)

    {

    upPressed = false;

    }

    If (event.keyCode is Keyboard.DOWN)

    {

    downPressed = false;

    }

    }

    }

    }

    :

    package

    {

    import flash.display.Stage;

    import flash.events. *.

    import flash.display.MovieClip;

    SerializableAttribute public class extends MovieClip Hero

    {

    public var stageRef:Stage;

    public var health: Number = 6;

    public var speed: number = 2;

    private var angle: Number;

    public void Hero()

    {

    stage.addEventListener (Event.ENTER_FRAME, loop, false, 0, true);

    }

    public void loop(e:Event):void

    {

    angle = Math.atan2 (x-MouseX, MouseY-y);

    x = speed * Math.cos (angle);

    y = speed * Math.sin (angle);

    If (Math.ABS (x-MouseX) + Math.ABS (y-MouseY)<>

    x = mouseX;

    y = mouseY;

    }

    }

    }

    }

  • Tight: How the image to follow the mouse only from left to right

    I'm on a tight schedule and are looking for the AS3 code how do which makes this company on their website:
    http://www.imageworksstudio.com/

    However, I don't know AS3.

    Literally my project requires I have recreate the which is shown with the hand holding the sharpie and moving only back limited to a centered rectangular area at the bottom of the screen.

    I know how to import the image that follows the mouse on the stage and make a videoclip. Let's say that I named the instance "Image_mc".

    Someone has the ActionScript for how to do this? He tie you to the object or a keyframe on a layer separate actions ?

    I appreciate any help! Thank you!

    The replacement of these two lines of code in AS3 would be:

    mouseX = box_mc.x + (box_mc.x - mouseX) / 2

  • How can I list the instances of video clips if the clip that I am referencing is nested?

    Hello world

    It's me again and I am running into a problem. So I have this clip which is nested in several video clips. I mean Flash to perform an action when this clip from movie hits another video clip in the main timeline. It's just a collision for a game detection using the hitTestObject code. I was thinking of using MovieClip (root), but that won't work because it is so nested. Can someone help me? I would like to know if I need to explain more. Thank you!

    -DJ

    I didn't ' think I can help you without having to upload your file to see what you're doing and I don't download and fix the files unless I'm hired.

    Maybe someone else you download your fla and you help.

  • My computer crashes whenever I try to play a video clip from the internet. I have to disconnect the plug to escape. What can I do? Thank you

    My computer crashes whenever I try to play a video clip from the internet. I have to disconnect the plug to escape. What can I do? Thank you

    There is a lot of noise from speakers as well.

    Disable the hardware accelerator or install flash player 10.

  • How can I put my own description of my video clips in the 'Cashier' section, which limits me to include my meassage under the video clip?  By choosing "General" desription, ther 'Party.  This isn't a freedom of choice.

    How can I put my own description of my video clips in the section 'create '.  In the "Général" section, it is only 'part '.  My topic is completely different.  I want to choose my own description, not the one that is given to me.  There is a blockage of the freedom of expression.

    It is not clear what you're asking.

    Where is the section 'Create', you are referring?

  • I can't import video clips in the timeline. Import clips from video al chronology of first CC,

    I have a problem. I can't import video clips to the timeline, it is important only audio. I have hand appears locked. How should I do? Thank you!

    I have a problema. No puedo import clips from video al chronology of first CC, solo importa el audio. Me appears the mano locked. How solucionarlo? Gracias! @

    Hi Albert,

    Please visit this link:

    FAQ: Why no audio or video will not at the track where I let down?

    Thank you

    Ilyes Singh

  • Cannot change a video Clip with the pen tool

    Hello

    I imported video and audio clips to the first, but I can't edit video clips with the pen tool. No line appears on the clip in the timeline panel. However, the audio clips are great and I can use the tool pen on those. Why no line does not appear on the video clips? How to make it stand?

    Hey Lee,

    do not understand what you mean. On video clips in the past the line seems just when I put the video files in the timeline. I don't see them now, how can I get this line back so that I can manually disappear with the pen tool?

    With the extended track, go into the settings menu to display timeline (the key) and select "See the video keyframe."

    I hope this helps.

    Thank you

    Kevin

  • How to slow down the sound from a video clip to the exact time (keyframes) and values?

    How to slow down the sound from a video clip to the exact time (keyframes) and values?

    I used the timewarp, but the sound is not affected.

    It is to be expected. Only the native time remapping affects sound, but given that EI is not an audio processing application, the quality is terrible. You must use the hearing or a similar program.

    Mylenium

  • How to get a symbol to follow the mouse?

    I have a cross as a lightgun to an arcade style game. What is the code would use to get the symbol follow the mouse, and if possible, origin of the coast could be in the middle of the coast and not in the upper left corner of the symbol?

    HI, thatoneguy545-

    UME - san of our preview had this great project that you might want to check:

    http://Ciruelo.jp/js/edge/helloEDGE.html

    It is coded in a previous version of edge animate.  To operate, click and drag on the stage.  It included its project files in the page.

    Hope that helps!

    -Elaine

  • Menu MovieClip to follow the mouse

    Hello

    I think that my previous post has lost everyone who reads it, so no answers. I will try to explain more clearly.

    If you look at this site www.douglasfisher.co.uk and click on "portfolio", then one of the images he has a mouse following menu which is works very well - how can I create that! ?

    I can handle a similar menu following good mouse, the problem I have is when the user comes out of the MC of the right or down - the MC keeps sticking as the mouse enters the MC

    Any help would be greatly appreciated.

    Mark

    If your submenu (that of the mouse tracking) called "submenu", you must assign an onRollOver and onRollOut event

    {subMenu.onRollOver = function ()}
    stop movement menu
    }

    {subMenu.onRollOut = function ()}
    follow the mouse
    }

Maybe you are looking for

  • incoming text no noise - 9.3.1 on iPhone iOS 6

    iPhone with iOS 9.3.1 6.  for incoming TEXTS ONLY my wife's phone works perfectly with selected chime.  EXCEPT that when I text my iPhone sound 7 will not be ringing his phone.  The parameters are the same and we have turned off to restart, changed t

  • LASERJET 1132

    I have the software deskjet 2050 installed in my computer with 64-bit window 8. Now try to install laserjet 1132 software. The driver is installed and printer works but the printer software is not installed for scaner etc. Please guide how I can inst

  • Subtract value of the signal of the current value 2 seconds ago

    Hello I'm relatively new to LabView, but I went through the Forums and google a lot and have not found a solution. I have this problem: I have an analog signal from my USB6009 DAQ of NOR. I want to take the signal I got 2 seconds ago and subtract its

  • Order the CD or DVD with LabVIEW

    Hi all I am interested in the control of my CD/DVD internal PC using LabVIEW. I had a quick glance the forums and Web site of nor and it seems that external CD readers can be ordered using a PXI card and the SCSI interface. Research using LabVIEW, I

  • Vista home basic System Restore [system takes over 16 hours, and again during initialization

    I have Vista Home Basic and the 17/01/2010, I got a virus called Desktop Defender 2010.  BAD! I could buy & download Spyware Doctor and Antivirus. as soon as I activated the Spyware, I lost my internet connection and have not been able to reconnect a