Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2006
    Location
    China,Shanghai
    Posts
    1

    [help] how to move a object by step-by-step

    I'm trying to move a image object to another y-position when page loaded, but I can not move it to the target position by step-by-step , it always moved to there at once time . can you guys give me some helps? or give me a simply example and i'll try to learn it by myself.

    thx anyway !

    btw, I have download some example here , to try to learn it by myself , but I can not understand your example , not meaning the example are not good, it's just ... my poor english can not help me more at that.


    Best Regards !
    Last edited by westoy; 06-08-2006 at 12:22 AM.

  2. #2
    Join Date
    Jun 2002
    Location
    Israel
    Posts
    1,843
    Way back ( I don't remember who) a ballbouncing project was posted. Here it is.
    Check the onTimer actions which call upon a global function.
    Good luck

    Yossi
    Attached Files

  3. #3
    Join Date
    Jul 2002
    Location
    Just South of Reality
    Posts
    778
    Assuming your step-by-step loop is correct, could you be missing an Application.Sleep(50); within the loop (slow down the move a little).

    I don't see any of your code posted so I can't see exaclty what you're doing.

    cheers.

  4. #4
    Join Date
    Oct 2005
    Location
    MI
    Posts
    524
    Here are a couple more examples of how to move objects:

    http://www.indigorose.com/forums/showthread.php?t=16287

    http://www.indigorose.com/forums/showthread.php?t=15675

    Both examples use the 'On Timer' event to faciliate the move. To create basic movements you'll need define the following:
    1) Object to be moved
    2) Starting X,Y position
    3) Target X,Y position
    4) Number of pixils to move per timer event
    5) Interval for the timer event

    Once you have these defined, start the page timer in the 'On Timer' event:
    1) Get the current position of the object
    2) Check that against the target position
    3a) If the are the same, stop the timer
    3b) If they are different, calculate your object's next position (step) and move it

    You'll want to play with the number of pixils per move and timer interval to get the motion speed/smoothness just the way you want.

    Hope this helps. BTW, you might want to be conservative using the Application.Sleep() as it can be a little taxing on performance.

    http://www.indigorose.com/forums/showthread.php?t=13278
    Yeah right. Who's the only one here who knows the illegal ninja moves from the government?

    ()))))))))o)))))))==============================================

Similar Threads

  1. Replies: 13
    Last Post: 04-18-2003, 08:40 PM
  2. INFO: Difference between the Media Player Object and the AVI Object
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 10-29-2002, 02:15 PM
  3. HOWTO: Make a Media Player Object Go Full Screen
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 10-23-2002, 11:23 AM
  4. TUTORIAL: Showing and Hiding Objects in AutoPlay Menu Studio 3.0
    By Support in forum AutoPlay Menu Studio 3.0
    Replies: 0
    Last Post: 10-10-2002, 02:39 PM
  5. Replies: 0
    Last Post: 10-04-2002, 10:09 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts