New swf every refresh/visit

You have completed your first interactive designs with QuarkXPress 7, 8 & 9 and now have need for more advanced functionality. Discuss Expressions here, ask questions and learn more about them.
Please note that Flash (SWF) authoring is not supported in QuarkXPress 10 anymore.
LesleyAnn
Posts: 1
Joined: 22 Jan 2008, 04:16

New swf every refresh/visit

Post by LesleyAnn » 11 Aug 2010, 05:13

I've created 4 very simple slide show scripts each fading in and fading out a couple of different images. I'd like to create a script which will call a different slideshow script when a visitor revisits the page.I've read about using PHP to do this, and also using Shared Objects in Flash, but is it possible in Quark?Thanks indeed!LesleyAnn

Matthias Guenther (Quark)
Quarkian
Quarkian
Posts: 2490
Joined: 04 Jun 2004, 15:06
Contact:

New swf every refresh/visit

Post by Matthias Guenther (Quark) » 11 Aug 2010, 05:16

Hi Lesley,
in what format are these slide shows?
And yes, using expressions you coudl randomize which one will be shown.
Thanks
Matthias

LesleyAnn
Posts: 1
Joined: 22 Jan 2008, 04:16

New swf every refresh/visit

Post by LesleyAnn » 11 Aug 2010, 09:10

Hi MatthiasThey are scripts in Quark Interactive show image > delay > hide image etc. I thought an expression would be the answer, but I need guidance I'm not so good at that bit!

Matthias Guenther (Quark)
Quarkian
Quarkian
Posts: 2490
Joined: 04 Jun 2004, 15:06
Contact:

New swf every refresh/visit

Post by Matthias Guenther (Quark) » 11 Aug 2010, 10:28

Hi Lesley,
ok, so you have four scripts and you want to randomly choose a script that should run, right?
If yes, that's not so difficult to do. You need a start script that runs these individual scripts. And a variable (which you can define in "Edit > Variables", call it Shufle and make it integer).
Loop
Set Expression "Shuffle = Number.RandomInt(1,4)
If Shuffle == 1
Run Script 'Script 1'
Delay 'x' seconds [make sure you specify the same time as the script runs]
End If
If Shuffle == 2
Run Script 'Script 2'
Delay 'x' seconds [make sure you specify the same time as the script runs]
End If
If Shuffle == 3
Run Script 'Script 3'
Delay 'x' seconds [make sure you specify the same time as the script runs]
End If
If Shuffle == 4
Run Script 'Script 4'
Delay 'x' seconds [make sure you specify the same time as the script runs]
End If
End Loop
Does that make sense?
Thanks
Matthias

LesleyAnn
Posts: 1
Joined: 22 Jan 2008, 04:16

New swf every refresh/visit

Post by LesleyAnn » 11 Aug 2010, 21:27

Thank goodness for you Matthias! It makes perfect sense, but I'd never have been able to work it out for myself! Thanks so much will post again when the website is complete so you can see how it looks!:)

LesleyAnn
Posts: 1
Joined: 22 Jan 2008, 04:16

New swf every refresh/visit

Post by LesleyAnn » 21 Sep 2010, 03:38

Oh dear, I cannot seem to make this work I've made the variable, should I check "array"? I've added up the time for each animation made the script accordingly, but Flash freezes when I attempt to run it. Any suggestions?Thank you

Matthias Guenther (Quark)
Quarkian
Quarkian
Posts: 2490
Joined: 04 Jun 2004, 15:06
Contact:

New swf every refresh/visit

Post by Matthias Guenther (Quark) » 21 Sep 2010, 03:46

Hi Lesley,
not "array", just a "normal" integer variable.
Locking up indicates that there is too mcuh running in Flash. Did you set up the Delay actions correctly?
Thanks
Matthias

LesleyAnn
Posts: 1
Joined: 22 Jan 2008, 04:16

New swf every refresh/visit

Post by LesleyAnn » 21 Sep 2010, 04:50

OK!I hope I set up the delay actions correctly! Should they be the sum of all the input time delays, or should it be the run time of the script for instance, Hide object 5 seconds, Show object 5 seconds, Delay 5 seconds adds up to 15 seconds, but it's really only 10 seconds as the Show/Hide cancel happen simultaneously.many thanks

Matthias Guenther (Quark)
Quarkian
Quarkian
Posts: 2490
Joined: 04 Jun 2004, 15:06
Contact:

New swf every refresh/visit

Post by Matthias Guenther (Quark) » 22 Sep 2010, 01:40

Hi Lesley,
to give the Flash Player some room to "breathe" any delay (even 0.1 seconds) is enough.
What the correct timings are depends on the effect you want to create. If you don't want anythign to happen in parallel, then after a 5 seconds movement you should use a 5 second delay (or an 'until object idle').
Does that make sense?
Thanks
Matthias

LesleyAnn
Posts: 1
Joined: 22 Jan 2008, 04:16

New swf every refresh/visit

Post by LesleyAnn » 26 Sep 2010, 20:23

I get the idea I guess if everything is running concurrently it's likely to overload. I should get some time today to work through the timings. I'll let you know how it goes!Thank youLesley

Locked

Return to “Expressions”