Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 4 of 4
  1. #1
    Join Date
    May 2005
    Posts
    3

    Huh? timed image rotation?

    I've fallen and I can't get up.

    I am working with AMS Prof. v., putting together some exercise guidelines. I would like to have a page open which has four images overlayed upon one another. The goal is to have each image rotate (i.e. Set.Visible) so the four images appear to be a looped video; I want to show clients the general movement of several exercises.

    I have attempted to mimic some of the code from previous discussions but have been frustratingly unsuccessful.

    Some help would be GREATLY appreciated!

  2. #2
    Join Date
    Jul 2002
    Location
    USA
    Posts
    3,959
    Rename your image objects so that they have a number representing the sequence they should show

    Image1
    Image2
    Image3
    Image4

    in the On Preload event of the page, add this code
    Code:
    for n=2, to 4 do -- 4 being the highest numbered picture object
         Image.SetVisible("Image"..n, false);  --hide all images except the first one
    end

    in the On Timer event add this code
    Code:
    if Ctr == nil then
         Ctr =1;
    end
    
    Ctr = Ctr + 1;
    
    if Ctr > 4 then  -- 4 being the highest number Image Object
         Ctr = 1
    end
    
    Image.SetVisible("Image"..Ctr, true)
    if Ctr == 1 then
         Image.SetVisible("Image"..4, false)
    else
         Image.SetVisible("Image"..Ctr - 1, false)
    end
    In the On Show event
    Code:
    Page.StartTimer(3000);

  3. #3
    Join Date
    May 2005
    Posts
    3

    Grin

    Many Thanks Worm! Works great. One small adjustment was to remove "to" on line one in the On Preload event. Thanks again.

  4. #4
    Join Date
    Jul 2002
    Location
    USA
    Posts
    3,959
    Sorry, I was typing that off the top of my head. I seem to do that alot with my for loops. For some reason I keep wanting to inject VB code into my Lua code. Sometime they play well together, sometimes they don't

Similar Threads

  1. Switching pictures with forward/back buttons
    By ilandv in forum AutoPlay Media Studio 4.0
    Replies: 10
    Last Post: 08-08-2004, 04:51 PM
  2. Function: Resize & Center an Image
    By kpsmith in forum AutoPlay Media Studio 5.0 Examples
    Replies: 0
    Last Post: 05-17-2004, 01:36 PM
  3. Making a Thumbnail Image Browser
    By Desmond in forum AutoPlay Media Studio 5.0 Examples
    Replies: 0
    Last Post: 09-26-2003, 02:16 PM
  4. Making an Image Browser
    By Desmond in forum AutoPlay Media Studio 5.0 Examples
    Replies: 0
    Last Post: 09-26-2003, 02:06 PM
  5. Reloading Image Objects at Runtime
    By Desmond in forum AutoPlay Media Studio 5.0 Examples
    Replies: 0
    Last Post: 09-26-2003, 10:26 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