Position of the mouse on text block

Hello

Is it possible to work about to insert in a text block with just the mouse position?

Thank you.

Yes

Research of HitTest.

Dirk

Tags: InDesign

Similar Questions

  • get the position of the mouse on the screen

    How to use the local, local X Y properties of mouse click event...

    Any example pls...

    Use mouseX and mouseY to get the position of the mouse.

  • Control a movieclip with the position of the mouse

    Hello everyone,

    I worked on a small project at work, I'm trying to controll a movieclip which consists of 60 still images of an aircraft (total 120 frames) that when played will show a view of 360 degrees of said aircraft. I can make it work with buttons, but ultimately I want to control the movieclip by moving the mouse. If anyone can help, that would be wonderful. Thanks in advance.

    Here is the code:

    import flash.events.MouseEvent;

    AC. Stop();

    stage.addEventListener (MouseEvent.MOUSE_MOVE, mouseMove);

    function mouseMove(event:MouseEvent):void
    {
    If (mouseX > 800 & & (mouseX < 1600))
    {
    ac.gotoAndStop (ac.currentFrame + 1);

    if(AC.currentFrame == 120)
    {
    ac.gotoAndStop (1);
    }
    }
    on the other
    {
    ac.gotoAndStop (ac.currentFrame - 1);

    if(AC.currentFrame == 1)
    {
    ac.gotoAndStop (120);
    }
    }
    }

    Using this code, the SWF file acts ok without error. I can do the movieclip play in any direction, however, when you move the mouse in the opposite direction that the movieclip continues to play forward or backward.

    Thank you

    Tommy

    There are at least two ways you can address this problem and they both require to control the position of the mouse more closely.  Now you have a general... If it's 800 > ahead and if his < 800="" step="" back,="" but="" when="" you="" step="" back="" from="" 1200="" to="" 1199="" you="" are="" still=""> 800, if you take one more step.  You need to either follow the change in mouse position or the position of the mouse to determine the framework of movieclip.  The second one is probably easier to design and will also be more accurate if the intention is to have a rotation for a displacement of the full scale of the mouse... otherwise you could just step back of a pixel at a time and in 120 pixels of movement... that might be what you want-the purpose is not explained in what you provided.

    (1) following the change of the position of the mouse - you must keep track of where the mouse was against where the mouse is when you check it... if(previousMouseX > currentMouseX)... you need to make the animation go back, etc...

    (2) with the position of the mouse to determine the frame movieclip - divide 120/1600... This is the number of images per pixel.  Take the current value of mouseX and multiply by that and make it an integer - go to this issue of image in the animation... simplifies this entire function similar to...

    function mouseMove(event:MouseEvent):void {}

    ac.gotoAndStop (int(mouseX*120/1600));

    }

    but refine to remember that there is no image 0

  • Calendar AS3 with the position of the mouse control.

    Hi everyone, thanks in advance to the community for any help you might be able to offer, it's all the incredably appreceated.

    It is a problem which had scratching me my head for months and be a facilitator, was really stretching my AS3 skills a bit.

    I create an interactive story of sorts and what is needed is to use the horizontal position of the mouse to scroll forward or backward on a timeline that is, when the mouse is in the dead center of the stage that the playhead does not move, but once he deveates right centre of the read head moves forward and plays the animation and a Once it moves to the left the read head begins to move backwards.

    Ideally I would have an acceleration effect, where the animation scrolls while the timeline at a minimum speed when the mouse is always close to the Center but at a faster rate once it is reached the edges, but right now, it is a secondary concern.

    There are also keys to move through various scenes, I can code myself, I only mention this in case it affects the rest of the code.

    Thanks for you help and any solutions or navagating alternitive methods a timeline are welcome indeed

    I'll be sure to pass on the karma to an area im more familiar with.

    var mc:MovieClip = MovieClip (this);  //<- timeline="" you="" want="" to="" control="" with="" mouse="">

    var maxScrollSpeed:int = 100;  / s max for mc above

    var m:Number;

    var b:Number;

    var prevFPS:int;

    paramF(0,-maxScrollSpeed,stage.stageWidth,maxScrollSpeed);

    this.addEventListener (MouseEvent.MOUSE_MOVE, scrollF);

    function scrollF(e:Event):void {}

    var fps:int = Math.round(m*mouseX+b);

    {if(prevFPS&&prevFPS!=FPS)}

    {if(FPS!=0)}

    {if(FPS>0)}

    playF (mc, mc.currentFrame, mc.totalFrames, fps);

    } else {}

    playF(mc,mc.currentFrame,1,-fps);

    }

    } else {}

    stopF (mc);

    }

    }

    prevFPS = images/second.

    }

    function playF(mc:MovieClip,_m:int,_n:int,_fps:int):void {}

    var playFFF2:Function = {function(mc:MovieClip):void}

    If (mc.m

    mc.nextFrame ();

    } else {}

    mc.prevFrame ();

    }

    If (mc.currentFrame == mc.n) {}

    clearInterval (mc.int);

    }

    updateAfterEvent();

    };

    MC.m = m;

    MC.n = n;

    MC. FPS = FPS;

    mc.gotoAndStop (mc.m);

    clearInterval (mc.int);

    MC.int = setInterval (playFFF2, 1000/mc.fps, mc);

    }

    function stopF(mc:MovieClip):void {}

    clearInterval (mc.int);

    }

    function paramF(x1:Number,y1:Number,x2:Number,y2:Number):void {}

    m =(Y1-Y2) /(x1-x2);

    b = y1 - m * x 1;

    }

  • Help, please! animation of an Image to the top and stay in an elevated position, until the mouse leaves hover

    I have an image I want to animate on hover above him as in this example http://codepen.io/chriscoyier/pen/vDBCI I would like the picture to animate to the top and stay in an elevated position, until the mouse leaves the hover.

    After clicking on the link above, the example is in the lower left corner of the page (it's a red rectangle.  Go over it please and you will see what I want to accomplish)

    If we cannot accomplish this in muse, can I use another Adobe software to create and import in muse?

    Thx for your help!

    Sam

    Try this code

    in HTML

    In your code, I see under style, Body tag is not closed,} is missing, maybe that's the reason.

    Hope this helps

  • How to check the position of the mouse

    Hi, I am trying to do a drag and drop and validate it, now I have my slide - déposer but I can't validate if I drag the right answer to the right place.

    Is it possible to check the position of the mouse, so when I'm draggin I use smth like:

    If (mouseX = 50 & & mouseY == 100) {}

    My answer is correct

    } else {}

    incorrect ansewer

    }

    Please help me =)

    Hello, a tutorial by Paul Trani I looked on this topic has really helped me:

    http://paultrani.com/2013/03/follow-mouse-movement-in-edge-animate/

    In it, I would use the variables posX and posY to influence your function
    I hope this helps!

    Katherine

  • Position of the mouse in a chain of control/indicator

    Hi all

    By using LabVIEW 2015 and would like to know if it is possible to do the following...

    I have a string with a paragraph or two of text.  In this text, certain words and phrases are highlighted (by different font color).

    I would sense when the mouse is positioned on one of these and change the type of cursor when it is over them.

    .. think of hyperlinks in a browser.

    I feel when I'm on the control of the chain itself, but not for specific text.

    Any ideas?

    Thank you!

    Charlie

    The string should contain a method that takes the coordinates (which you can get from a mouse event down or move the mouse) and tells you where it is in the string. Create a node to invoke for the string, and then select the method used (I think he called Point byte Offset). I don't have any experience with it, but I guess it compensates for things as sizes of scrolling and the police.

  • the exact position of the mouse click xy graph while he plotted graph with mouse events

    Hello

    IAM using Graph xy for multi locations

    IAM traced graphic with mouse movement and events using the example attached (draw the graph with mouse events)

    but in sub vi Values.vi scale there are two constants 66 and 30 when I change my plot (I also change the scales), then the mouse position and chart position (cursor) value are not well aligned, but when I change the constants mentioned above I get the alignment perfect between the cursor and the last point in the path.

    as I went to another parcel (with scalability again) the same alignment problem resurfaced.

    I need to replace these two constants with something dynamic

    Please help

    concerning

    Mazhar

    solution to my problem is

  • Position of the mouse on the photo

    I use an image control with the mouse to the bottom/mouse move event detection. With the 'Mouse' for the image control property, I can tell the relative position of the cursor of the mouse on the photo. My problem is that the image control has scroll bars, and even clicks/movements on the scroll bars triggers events! Is there a practical way to determine if the mouse is on the scroll bars or the actual image?

    OK, I found a solution much simpler. You don't need to 'measure' the toolbars; the DrawAreaSize of the images property returns the surface drawable, excluding toolbars. The attached extract check if you're on the scroll bars

  • How can I determine the position of the mouse in a 2D image control

    I have an app where I would like the user to be able to interact with objects in a 2D image control with the mouse.  To do this, I need to translate between the screen coordinates, which are transmitted with the events of mouse and in the control of 2D image.

    The problem that I am running is that I can't find a way to determine the screen coordinates of the top left corner of the drawing/client of the 2D image control area.  I tried to use the 'Position' of the image control property, but this results in a mismatch because of the difference between the upper-left corner of the image control (including the label, etc.) and the upper left corner of the drawing area.  See attached VI.

    Does anyone know how to get the coordinate of the screen from the corner of the drawing of the control of the photo area?

    Mark Moss

    I tend to use the mouse in the image control property to get the position.  Deals with things like the passage of origin for you.

  • How to get a picture to rotate the position of the mouse in the Muse?

    Hey guys,.

    I'm a home page that is centered around a logo design. I need the logo to turn around 360 degrees as the mouse explores the area around him. I enclose a pochade explaining the type of movement that I need, a model of what the page might look like, and a .png file I use for the logo. Please give detailed instructions, as I am a bit new to Muse. Thanks in advance, any help is MUCH appreciated!

    Wirelos Website Sketch.jpg

    Wirelos-Logo-Example.png

    Home Page1.jpg

    UPDATE: the movement can be done very simply in Adobe Edge animate the following procedure:

    (and then published as a Deployment Package animate and inserted in the Muse in a .oam file).

    "Based on that response stack Exchange Edit fiddle - JSFiddle .

    Place the script provided in compositionReady and change the img var name of your item reference.

    example: var img = sym.$("WirelosLogoTight");     "

    -Heathrowe

    Hope this helps someone else with the same question. Here is a link to this post: How to create an animation that runs in response to the mouse position?

  • Load frames are in line with the position of the mouse

    Hello.

    Look at this site:

    www.Perpendicular.tk

    This site uses javascript to display image by image. It is not a 3D model, only images are shown by mouse position regarding a.

    In actionscript, how can I do this?

    I think I need to start putting the images in frames. After, Stop(). When you click the mouse, I need to compare with the last position and check, if the direction of the mouse is not gtonextframe and UO right.

    But how can I do this speed up the system. Look at the site that the image are load faster is movement mouse is fast...

    Thank you and sorry for my English...

    to scroll through the images for the movieclip (e.g. mc) based on the mouse position x, you can use:

    paramF(mc,0,1,stage.stageWidth,mc.totalFrames);

    this.addEventListener (MouseEvent.MOUSE_MOVE, moveF);

    function moveF(e:MouseEvent):void {}

    mc.gotoAndStop (Math.round(mc.m*mouseX+mc.b));

    }

    function paramF(mc:MovieClip,x1:Number,y1:Number,x2:Number,y2:Number):void {}

    MC.m =(Y1-Y2) /(x1-x2);

    MC.b = Y1 - mc.m * x 1;

    }

  • change the color of text blocks only the active layer

    Well my script to change the color of the text frame changes the color of all the blocks of text hidden or not.

    I need to change only the visible text blocks.

    If (app.documents.length > 0) {}

    newCMYKColor = new CMYKColor();

    newCMYKColor.black = 0;

    newCMYKColor.cyan = 0;

    newCMYKColor.magenta = 0;

    newCMYKColor.yellow = 0;

    for (i = 0; i < app.activeDocument.textFrames.length; i ++) {}

    textArtRange = app.activeDocument.textFrames [i] .textRange;

    textArtRange.characterAttributes.fillColor = newCMYKColor;

    }

    }

    Any ideas on how the way only change the color of the text on the active layer blocks? In the final script I want to hide all other layers so if it could be done by a visible attribute more easily that would work just as well.

    Thank you

    Duane Leach

    Hello

    It will work for you?  Have not tested much beyond text blocks in groups and those who are just stand-alone on the layer.

    If (app.documents.length > 0) {}

    var thisDoc = app.activeDocument;

    newCMYKColor = new CMYKColor();

    newCMYKColor.black = 00;

    newCMYKColor.cyan = 40;

    newCMYKColor.magenta = 50;

    newCMYKColor.yellow = 50;

    Need to retrieve blocks of text within the groups on the layer.

    var artSel = thisDoc.activeLayer.groupItems;

    for (i = 0; i<>

    If (artSel [i] .hidden == false) {}

    var text = .textFrames artSel [i];

    for (j = 0; j<>

    text [j].textRange.characterAttributes.fillColor = newCMYKColor;

    }

    }

    End to change the rest of the outside groups text boxes.

    var textArtRange = app.activeDocument.activeLayer.textFrames;

    for (k = 0; k<>

    If (textArtRange [k] .hidden is false)

    textArtRange [k].textRange.characterAttributes.fillColor = newCMYKColor

    }

    on the other

    Alert ("it is not any open documents to change...");

  • Prevention of the forms of text block

    When I draw a shape (box, circle, etc.) with the tool form - I usually insert columns with text inside them. The form is usually a boarder of the page and sometimes I have to change.

    Several times just by clicking on my text tool in the area of the shape transforms this form in a block of text.

    I need to find a way to prevent the form turns into a block of text.

    There are several ways to handle this. One is to turn off the preference which allows the tool to type convert images to text blocks.

    Another is to put these borders on their own layer and lock the layer.

    A third is actually use the feature to combine the border and a text frame, if it is appropriate for the page layout.

  • Framework in the context of text block text block

    Hi, I feel I ask a stupid question but I am about to throw my computer out the window, so I have about him asking anyway.

    I have a layout of book with a stream of regular text in any of the pages (my body text), but I created a line object with a text block I want to screw together in case goes on 2 pages, when I try to click on the Red [+] to connect the 2 text block, I can't. It wont let me click on it, I tried command - click as when you want to select an object in another, but it does not work.

    Is it possible to have a block of text within another framework? Maybe I did it the right way. Can someone help me with this please?

    Thanks in advance

    On the photo I cercled in red that I would like to be linked together (2 bluish objects), the thread of text that is already there is my block of text type where is my body text.

    Picture 2.jpg

    You cannot screw anchored text frames.

    Bob

Maybe you are looking for