Using the slider to rotate an image

Hello

I use slider components so that the user can rotate, scale, and position an image. I got this set scaling and rotation with the code below. However, the problem is that when I rotate and scale. Flash performs these actions as if the upper-left corner of the image is the central axis. This makes moving the image around one, but clumsy. Registration for my charger is at the top left. I tried to create a charger with registration in the Center and that did not help. so I guess what I'm asking is how can I declare the azis of a charger in Actionscript?

logoPosX.text = ' Logo scale: 0 ".

logoScaleSlider.value = 25;

logoScaleSlider.addEventListener (SliderEvent.CHANGE, logoChangeScale);

function logoChangeScale (event: SliderEvent): void

{

logoPosX.text = ' Logo scale: "+ event.target.value;"

loadLogo.scaleX = event.target.value / 5;

loadLogo.scaleY = event.target.value / 5;

}

logo of rotation around the X axis

logoRotX.text = "Rotate X: 0.

logoRotateX.value = 0;

logoRotateX.addEventListener (SliderEvent.CHANGE, logoRotateXPos);

function logoRotateXPos (event: SliderEvent): void

{

logoRotX.text = "Rotate X:" + event.target.value;

loadLogo.rotationX = event.target.value * 10;

}

logo of rotation around axis Y

logoRotY.text = "Rotate Y: 0. '

logoRotateY.value = 0;

logoRotateY.addEventListener (SliderEvent.CHANGE, logoRotateYPos);

function logoRotateYPos (event: SliderEvent): void

{

logoRotY.text = "Rotate Y:" + event.target.value;

loadLogo.rotationY = event.target.value * 10;

}

logo of rotation around the Z axis

logoRotZ.text = "Rotate z: 0".

logoRotateZ.value = 0;

logoRotateZ.addEventListener (SliderEvent.CHANGE, logoRotateZPos);

function logoRotateZPos (event: SliderEvent): void

{

logoRotZ.text = "z Rotation:" + event.target.value;

loadLogo.rotationZ = event.target.value * 10;

}

search for regpoint change the code in this forum by kglad.

Tags: Adobe Animate

Similar Questions

  • The images appear tense when played using the slide show in full screen

    The images appear tense when played using the slide show in full screen in Windows Vista Basic. That means that a picture of resolution 1920 x 1200 appears full screen covering although a 1920 x 1080 image seems letterbox in fullscreen. My screen resolution was put to the native resolution of 1920 x 1080. It is clear that this slide show program only keeping the proportions of the image. Earlier this problem wasn't there. I think that the slide show program addresses in such a way that my monitor could have 16:10 display of report resolution l / h. thanks for giving me a solution.

    This happens usually when the image resolution is high.

    Keep your screen resolution of 1024 x 768 and it should work fine.

  • When I try to edit a room photo in photoshop elements 12, I'm not able to use the slider or one of the drop down menus. All I have is a black circle with a line through it.

    When I try to edit a room photo in photoshop elements 12, I'm not able to use the slider or one of the drop down menus. All I have is a black circle with a line through it.

    Most likely, the images are 16-bit/channel.

    Go to Image > Mode and click on 8-bit/channel and see if that solves the problem.

  • Change the Volume using the Slider component

    I am using the slider (aSlider) to control the volume for mySound, which is a class called PlaySound. Created an addEventListener for aSlider with an execution of a function called changeVolume SlideEvent.CHANGE. All other works, but I can't get the cursor to control the volume for mySound. Need help. Here's the current code. TY in advance.


    import flash.events.Event;
    Import fl.controls.Slider;
    Import fl.events.SliderEvent;
    Import fl.controls.Label;

    var mySound:PlaySound = new PlaySound;

    stage.addEventListener (Event.ENTER_FRAME, clock);

    var OFF: Boolean = true;

    function clock(event:Event):void
    {
    var currentdate:Date = new Date();

    arc_mc. Visible = false;
    secondHand_mc.rotation = currentdate.seconds * 6;
    minuteHand_mc.rotation = currentdate.minutes * currentdate.seconds + 6 / 10;
    hourHand_mc.rotation = currentdate.hours * 30 + currentdate.minutes / 2;

    If (secondHand_mc.rotation >-60 & & secondHand_mc.rotation < 0)
    {
    arc_mc. Visible = true;
    If (OFF)
    {
    OFF = false;
    mySound.play ();
    }

    }
    on the other
    {
    arc_mc. Visible = false;
    SoundMixer.stopAll ();
    OFF = true;

    }


    }


    aSlider.addEventListener (SliderEvent.CHANGE, changeVolume);

    function changeVolume(event:SliderEvent):void
    {
    var volumeLevel:Number = 5;
    volumeLevel = event.target.value / 100;
    valueLabel.text = event.target.value + 'percent';
    }

    you follow all the instructions.  use:

    import flash.events.Event;
    Import fl.controls.Slider;
    Import fl.events.SliderEvent;
    Import fl.controls.Label;
    import flash.media.SoundTransform;

    import flash.media.SoundChannel;

    var mySound:PlaySound = new PlaySound();

    var mySoundChannel:SoundChannel;

    stage.addEventListener (Event.ENTER_FRAME, clock);

    var OFF: Boolean = true;

    function clock(event:Event):void
    {
    var currentdate:Date = new Date();

    arc_mc. Visible = false;
    secondHand_mc.rotation = currentdate.seconds * 6;
    minuteHand_mc.rotation = currentdate.minutes * currentdate.seconds + 6 / 10;
    hourHand_mc.rotation = currentdate.hours * 30 + currentdate.minutes / 2;

    If (secondHand_mc.rotation >-60 & secondHand_mc.rotation)<>
    {
    arc_mc. Visible = true;

    If (OFF)
    {
    OFF = false;
    mySoundChannel = mySound.play ();  delcare mySoundChannel outside all functions
    mySound.play ();
    }
    }
    on the other
    {
    arc_mc. Visible = false;
    SoundMixer.stopAll ();
    OFF = true;
    }
    }

    aSlider.addEventListener (SliderEvent.CHANGE, changeVolume);

    function changeVolume(event:SliderEvent):void
    {
    valueLabel.text = event.target.value + 'percent';
    var st:SoundTransform = mySoundChannel.soundTransform;
    St.volume =(event.target.value-event.target.minimum) / (event.target.maximum - event.target.minimum);
    mySoundChannel.soundTransform = m;
    }

    TX 1 million

  • BlackBerry Smartphone camera settings: cannot use the slider to increase/decrease the proximity of the image

    Dear all

    I'm a newbie when it comes to using a BB. I was pretty happy with my BB 8520 Curve until recently. Yesterday while trying to click on a photo, I tried using the wheel to increase the proximity of the image & it didn't work & since then it has not worked. I thought that maybe there was a problem with my scroll button but NOOOOO...

    Works of scrolling around elsewhere. I don't know too much what setting needs to be changed. We have a festive season going on here in our city & I'm dying to take some pictures of almost, but I'm unable to increase proximity using the scroll key

    I hope I could explain my problem... Pls help...

    Kind regards

    Neena

    Try this, with the POWER YOU delete waiting for battery a minute or two and then re - inserted and left entirely re - start. This should solve your problem.

  • How to use the slider to avoid movements of keys?

    Hello

    first of all, I must say, I'm not a native English speaker, so please forgive me in advance. In any case, I want to solve this particular problem: I created a project in After effects, where you can add your own text, logo or anything else in the composition... What is the after effects project does, that it transforms your text or logo in metal 3D result. Also cooked up camera which moves from one position to the other. Take a look:

    The text of the inscription is "add content" (I have 4 cameras together, but I shows an example only on the first, so that you will not see the full text. The rest of the cameras are also in other publications)

    firstone.jpg

    Here you can see the exact movement of the camera. However, if someone inserts a logo or a text, which for example has 7 letters (in the next picture, it is just "content") it will look like this:

    secondone.jpg

    Here you can see how much space we have. Also, it is not appropriate to change the original size of the text in the composition to achieve the smallest gap, as we can see here. The height will be huge.

    If I could change it by myself, I could do this:

    -I'd clicked on the "2 views" button and choose display in the "front".

    -I want to select all the keyframes and after that i would go into the left window 'front' and the mouse I would move all the camera to the position I want to:

    thirdone.jpg

    The great thing about this, is that as I've selected all the keyframes and then define the line red on one of them, the cameras works even at the beginning! So that's how it will look after the fix.

    fourthone.jpg

    What the problem is, that, after the small edit I want to send this project to a small number of friends. Then, they can easily set their text or logo in. The text must at different heights, width... it will be shorter or longer. I was just wondering if you could help with some phrases, joints and so on, for in the end result, one of my friends might move with the whole camera (not only with a keyframe) using the CONTROL SLIDER. At least for x and is the axis, if the z axis is also possible, it would be awesome. Also, it does not matter the sliders how there will be .

    So basically with the help of sliders, they should achieve:

    fifthone.jpg

    So I need some useful measures. Please help me. It is very important to me. I will be so grateful! Really! (Thanks for the potential aid )

    You're average over the thought of your problem and potentially headed on a path that will cause more problems that it solves.

    If you have a camera that is already busy road and you want to change the position of the camera as a path together the best way to do this would be to create a null value and parent then the camera for the null value. Pass null and all camera movements, you have put in place will follow. None of the expressions are required. It is the best way to change all aspects of a trajectory, turning the entire path, the path to the scale or move the path on any axis.

    If you really want to use 3 sliders position to move existing keyframes to a new value value + the values of the expressions will allow you to do. Just add a sliders control of three expression for the camera layer (or any layer as the null that you use as a parent) select the name of the cursor in the ECW and press on enter and rename it. Something like this will be the result.

    Note that I also rotation and controls are resized to this configuration. Now that you have 3 sliders, you can separate the position property to null in individual values allow expressions in each property, and the value type +, then use the pickwhip to drag your cursor named which (in my example) value of X and repeat for each operation. The value + will add the value of the slider to the current value of the position of the keyframes. The expression would look like this for X:

    value + effect("x position")("Slider")
    

    If you want to use the sliders that I would use a null value, add expression controls to null to keep position, scale and rotation, the unified camera position property and then use your sliders control of expression of the null value to change your existing path. I suggest not to do it directly on the position of the camera with separate X, Y and Z values because it will change the shape of your camera path and would be more difficult to control. You'll probably also want to create a POInull camera and use this preset to bind the point the camera of interest for the null value.

    Here's a preset , you can apply to a null value which will give complete control to the trajectory of any layer animation make you the child of this null. Search Animation preset in the field of search After Effects help, if you don't know how to use, create them, then save them.

    As a final gimme, here's a project CS6 using this animation preset to control the position of null is used to change a path animation camera.

  • delete the data using the slider to tape

    Hello

    I have some log files that I need to deal with. For some of these files, I'll have to remove the beginning and the end of them. For this I intend to draw the newspaper and set of 2 sliders, and then the user move the sliders in a way that he would leave the unwanted data out of the band and then it would be a button to continue to delete the unwanted data of all channels within the group.

    So far I traced the data and set the band using the following script:

    view. ActiveSheet.Cursor.Type = "band".

    view. ActiveSheet.Cursor.Mode = "graphPoints".

    view. ActiveSheet.Cursor.X1 = CMin ("Y_Accel") + 0.25 * (CMax("Y_Accel")-CMin("Y_Accel"))

    view. ActiveSheet.Cursor.X2 = CMin ("Y_Accel") + 0.75 * (CMax("Y_Accel")-CMin("Y_Accel"))

    Now, I would use the positions where the sliders have been moved by the user to remove data but I don't know how to read the position of the cursor. With it, I would use a function like DataBlDel or similar.

    Does anyone have an idea how to do that?

    I'm just starting with DIAdem so if anyone found out that there is an easier way to do it please let me know.

    Thank you

    Leo

    Hi Leo,

    If you're just starting with DIAdem and scripts then the following article is a great resource. It examines interactions between users and the cursor data.

    DIAdem - using scripts to run the dialog box file, intervention by the user, using the data of frame slider and good even more!

    https://decibel.NI.com/content/docs/doc-5771

    Good reading and let me know if you have any questions.

    Best regards

    Chris

  • find the angle of rotating an image in 8-bit grayscale

    Hi all

    I have an image in grayscale 8 bits of dimension 3969 X 600, the image is slightly tilted. I need to find the rotation angle and apply the rotation before treatment.

    Are there transformation features in LabVIEW to find the angle of rotation?

    Need your suggestions people,

    Hello

    just calculate the slope of the line joining the two points:

    xDiff = p2.x - p1.x

    yDiff = p2.y - p1.y

    [degrees] angle = atan2 (yDiff, xDiff) *(180/pi)

    Best regards

    K

  • Using the slider to display time

    Hello!

    I am trying to use a vertical scroll bar to represent my dataset of 72 hours. I also added two additional cursors, to represent an interval of time inside the dataset object. My problem is that when I try to connect the cluster with timestamps for the slider, he says ' Cluster-> output_timestamp 1 d of timestamp, conflicts with cluster slide, a double [real 64-bit]»

    I understand that there is a conflict of input type expected in the slider to actual entries, my question is to know how to solve this problem? Do I have to convert all the data, or there at - it options for the cursor that I don't have right?

    I have attached a picture to show what I want to do my slider.

    Greetings

    Kristoffer

    This support allows you to get what you need?

  • Unable to resize using the drop-down list of image Photoshop 2015 CC

    I recently had to rebuild my system (yesterday) include motherboard and computer.

    That's why I need to download and reinstall Photoshop 2015 CC. It lies the new "PC name" resumed. I turned off the old system.

    Problem.

    When I try to resize any photo using the height or width of the Image - the Image size-, I'm unable to change the values.

    Any ideas.

    Chomp

    Opens the dialog box resize the Image and you can target these areas?  Have you tried resetting your Photoshop tools?

  • Preview screen turns black when you use the slider to soften ultra key

    Hello

    I'm working on a video, including a greenscreen. That is why I use the ultra key to make the transparent green screnscreen. Whenever I touch the slider "soften" Ultra key, windos preview blackens. I can't get it back to normal until I restart the first. Version 2015.4.

    This issue is being investigated. So far it has been reproduced with acceleration GPU on Windows. What is the case on your system? Also, could you provide your operating system, graphics card and if you use CUDA or OpenCL?

    A possible solution is to go into project settings > General and set the Mercury Playback Engine software only, when you use the parameter to soften.

    Thank you.

  • Why I can't scale proportionally by using the slide bar?

    I know there are other ways to change the size of an image, I would use Edit > Transform > scale to scale proportionately. It doesn't seem to work for me, as you can see below in this video that I created with audio included. What I am doing wrong? I use Photoshop CC 2015.1 on a 8.1 Windows machine.

    Appreciate any help you can offer.

    Your title is confusing: "moving bar. Usually people refer only to a bar in the space bar and the shift key. Are you pressing the SPACEBAR or shift key? The space bar will give you the hand, while the SHIFT key will scale proportionally. If you use the SHIFT key, you may have to reset your preferences.

  • Using the slider for and BULK COLLECT INTO

    Hi all
    in this case we prefer to use the cursor AND the cursor with the LOOSE COLLECTION? The following contains two block this same query where used FOR the slider, the other is using COLLECT LOOSE. The task that is running better given in the existing? How do we measure performance between these two?

    I use the example of HR schema:
    declare
    l_start number;
    BEGIN
    l_start:= DBMS_UTILITY.get_time;
    dbms_lock.sleep(1);
    FOR employee IN (SELECT e.last_name, j.job_title FROM employees e,jobs j 
    where e.job_id=j.job_id and  e.job_id LIKE '%CLERK%' AND e.manager_id > 120 ORDER BY e.last_name)
    LOOP
      DBMS_OUTPUT.PUT_LINE ('Name = ' || employee.last_name || ', Job = ' || employee.job_title);
    END LOOP;
    DBMS_OUTPUT.put_line('total time: ' || to_char(DBMS_UTILITY.get_time - l_start) || ' hsecs');
    END;
    /
     
    declare
    l_start number;
    type rec_type is table of varchar2(20);
    name_rec rec_type;
    job_rec rec_type;
    begin
    l_start:= DBMS_UTILITY.get_time;
    dbms_lock.sleep(1);
    SELECT e.last_name, j.job_title bulk collect into name_rec,job_rec FROM employees e,jobs j 
    where e.job_id=j.job_id and  e.job_id LIKE '%CLERK%' AND e.manager_id > 120 ORDER BY e.last_name;
    for j in name_rec.first..name_rec.last loop
      DBMS_OUTPUT.PUT_LINE ('Name = ' || name_rec(j) || ', Job = ' || job_rec(j));
    END LOOP;
    DBMS_OUTPUT.put_line('total time: ' || to_char(DBMS_UTILITY.get_time - l_start) || ' hsecs');
    end;
    /
    In this code, I put a timestamp in each block, but they are useless, since they both launched virtually instantaneous...

    Best regards
    Val

    (1) bulk fired fresh primary use is to reduce the change of context between sql and pl sql engine.
    (2), you should always use LIMIT when it comes with bulk collect, this does not increase the load on the PGA.
    (3) and the ideal number of BOUNDARY lines is 100.

    Also if you really want to compare performance improvements between the two different approaches to sql pl try to use the package of runstats tom Kyte

    http://asktom.Oracle.com/pls/Apex/asktom.download_file?p_file=6551378329289980701

  • MovieClip content using the slider. How?

    Hello

    I have a MovieClip on the stage with a name within the text with images & content. I use the layer mask that have the name of the instance of masker show some of the MovieClip. I want to use it to scroll the MovieClip content vertically. How can I do that?

    It's my code, but it is not work that good:

    import flash.events.MouseEvent;

    var yOffset:Number;

    content.addEventListener (MouseEvent.MOUSE_DOWN, contentDown);

    stage.addEventListener (MouseEvent.MOUSE_UP, contentUp);

    function contentDown(e:MouseEvent):void

    {

    content.addEventListener (MouseEvent.MOUSE_MOVE, contentMove);

    Decalage_y = mouseY;

    }

    function contentUp(e:MouseEvent):void

    {

    stage.removeEventListener (MouseEvent.MOUSE_MOVE, contentMove);

    }

    function contentMove(e:MouseEvent):void

    {

    Content.y = mouseY - decalage_y;

    e.updateAfterEvent ();

    }

    Kind regards

    I have given you a rough example.

    For what you are trying to do, you really want to:

    var scrollHeight:Number = content.height - masker.height;

    var startY: Number = content.y;

    function contentDown(e:MouseEvent):void

    {

    content.startDrag (false, new Rectangle (content.x, startY - scrollHeight, 0, scrollHeight));

    }

    function contentUp(e:MouseEvent):void

    {

    content.stopDrag ();

    }

  • Healing Brush spot Editor by using the slider to adjust the size

    "Is anyway to do the 'size slider" more visible when using the Spot Healing Brush Editor "?

    On my system, the scroll bar is black and against the dark grey of the Editor screen"that makes it very difficult for me to see.

    Try to use the keys on the keyboard hook.

    [to decrease the size

    ] to enlarge

Maybe you are looking for

  • Can't reach the BIOS on Satellite L775

    Hello Since this morning and a failure of the upgrade to Ubuntu, I can't reach the BIOS. My laptop is the L775-13 Satellite.The screen is frozen on Toshiba official screen. You have an idea? Thank you

  • Computer HP laptop 15r003sv: a pixel dead on a new laptop screen

    Hi all. I buy the computer laptop 15r003sv on July 2014. At the same time as I have buy an extended warranty for 3 years by the dealer, that is to say I have warranty until July 2017 Before 1 month straight hinje began to loosen up. The dealer from w

  • The upgrade of a Windows 8 for Windows 8.1 Tablet

    Hello If I buy a Tablet Windows 8 (not RT!), can I upgrade it to Windows 8.1? What are the known issues. I am planning to buy a Samsung ATIV TAB 3. Thank you very much Bora

  • Practical SQL training/exam question

    HelloI am a student at the bases SQL 1z0-051 exam, and examples of questions about the Oracle University site review is the following:3. review the structure of the EMP table:EMP                                       Name                             

  • Photos of combination

    I have a great piece of work I've had to parse into two sections.  How seamless combine the two .jpg files into Photoshop Elements?