A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Moving objects with a slider

  1. #1
    Junior Member
    Join Date
    Jun 2002

    Moving objects with a slider

    Hello all,

    I gotta problem

    I'd like to create a slider that will move the position (y) of an object. How to translate slider position y to a position of another object? The slider is a bitmap, with drag ability ("object is draggable"). The object that is supposed to move is a child movie. How to make it move?

    And another thing, how to determine a position of an object with velocity and friction set? If I move an object with a ".velocity", how can I know, what position it is in?

    Thanks in advance...

  2. #2
    KoolMoves Moderator blanius's Avatar
    Join Date
    Jul 2001
    Atlanta GA
    you can always get an objects postiion in script with myObject.x and myObject.y

    as for the slider you can compare the objects positiion in relation to something that is fixed or store in a variable on the dragStart event. Use the difference to determine the amount to move your child movie.

    Example source file

  3. #3
    Junior Member
    Join Date
    Jun 2002


    Thank you, thank you, thank you!!

    This is EXACTLY what I needed.. I spend a week trying to figure out a method to move a child movie... But in the other hand thing - there's no clear explanation in the 3DFA Help of the difference between "object.x" and "object.position.x" which were the key to solve my problem... I tried to assign object1.x = object2.x but it didn't work, and now I know WHY :-/

    So again - thanks Blanius! You are the Master

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