in

Quark Forums

Trouble with a loop

Last post 04-22-2009 1:58 AM by Bob Kerr. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 04-21-2009 12:09 PM

    Trouble with a loop

    Hi, I'm struggling with a script. It's a script which 'calls' other scripts and it all works fine apart from the ending. There a several 'nested scripts' so it goes a bit like: run script A delay 5 secs run script B delay 5 secs run script C delay 5 secs but then, at the end of the script when all the action is finished, I want to repeat 'script A' in an indefinite loop which will just carry on forever or until the viewer closes the swf. I've tried lots of permutations using 'loop' under 'Control' but haven't got anywhere. Hope I've explained this OK. Any help appreciated. Bob.
  • 04-21-2009 6:31 PM In reply to

    Re: Trouble with a loop

    Hello Bob, I only use Interactive occasionally. Wish I had time for more! Last year I was trying to create a loop and Jyoti Bhatnagar, Quark Interactive Designer with Quark helped me out. Here are his instructions. The thing that made the difference for me was step five (Fit box to picture.) This is possible with below steps: 1. Create an interactive layout with video object. Select video using External Resource option. In External Resource dialog, delete the browsed path and keep only video file name (to make it absolute path). Select Loop video in options dropdown. 2. Go to Scripts tab and create new script, assign action Video > Play > Video object. 3. Go to Page tab and assign above created script to Entry script of Page 1. 4. Export Layout as Macromedia Flash file. In Export folder only SWF file is created, copy the referenced video file here and double click on the SWF file to check if video is playing correctly. 5. Create Web layout and draw a picture box on it, import SWF file in it and right click on the picture box > select Fit box to picture option.Basically if the box is smaller than the SWF, QuarkXPress thinks you are trying to edit the image (because it thinks you want to crop the image using the box) so it will take the preview (first frame) of the SWF and crop it (therefore making it a static image). Making the box fit the SWF will avoid this from happening and QuarkXPress will just pass the SWF right through. 6. Export the web layout as HTML.Now you would have your .html files and an "image" folder. Simply copy the video file, inside this "image" folder. The swf will now have access to the video file and you would be able to see it in your web page.
  • 04-22-2009 12:13 AM In reply to

    Re: Trouble with a loop

    Thanks Jim, but I think your reply addresses a different problem to the one I have. The scripts I'm referring to: 'script A', 'Script B' . . . are simple animations, no SWFs involved. I just want the last animation to keep on looping at the end of the script. Bob.
  • 04-22-2009 12:37 AM In reply to

    Re: Trouble with a loop

    Hi Bob,

    You are doing just right. now you only add few actions to loop Script A infinetly. So your modified script, say "Main script",  would look  like:

    Run Script->"Script A"

    Delay Time, "5"

    Run Script->"Script B"

    Delay Time, "5"

    Run Script->"Script C"

    Delay Time, "5"

     Loop

    Run Script->"Script A"

    Delay Time, "5"

    End loop

    Now call this "Main script" at the page entry of page 1 and it will solve your problem.

     

    Regards,

    Jyoti Bhatnagar
    jbhatnagar@quark.com
  • 04-22-2009 1:58 AM In reply to

    Re: Trouble with a loop

    Perfect - thanks so much Jyoti. Bob.
Page 1 of 1 (5 items)
Powered by Community Server (Commercial Edition), by Telligent Systems