Passing variables?

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.
Locked
nquit
Posts: 0
Joined: 07 Feb 2011, 14:51

Passing variables?

Post by nquit » 07 Feb 2011, 08:01

Hi Forum!
I'm tasked by my employer to create an interactive version of a manual that runs as an executable! The only problem so far is this:
Each chapter in the manual is being created as a seperate Quark project. They give the chapter to me, I open it, duplicate layout, turn into an interactive project.
Each chapter has a quiz at the end. simple stuff, you get 0 points for one answer, 2 for the next, so on. at the last page, I'm to display the total for that section. I'm able to do that, no prob :)
Here's where the problem comes. I'm also supposed to display a cumulative total for all chapters. But each chapter is its own project, and I figured I'd have each chapter be its own SWF, they link by using the action "open project" - but - let me bold this part ;) - [strong]how can I possibly carry over that cumulative total? is there some way to store a variable outside these swfs or pass a variable to the next swf???[/strong]
so far the closest thing I can find in the actions is "internet->get variable" - but I cannot for the life of me figure what that action is for, how to use it, etc, so I have no idea if it might be the thing to try...
Thanks for your help in advance, oh Quark Forum Gurus!! :)

-- Aaron from NQuit

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

Passing variables?

Post by Matthias Guenther (Quark) » 08 Feb 2011, 23:10

Hi Aaron,
the only way to pass variables or any content from one SWF to another would be the actions you foudn, yes. So you need to send that to your webserver, store it somewhere and then retrieve it (e.g. using PHP).
Do you have experience with Web Scripting?
Thanks
Matthias

nquit
Posts: 0
Joined: 07 Feb 2011, 14:51

Passing variables?

Post by nquit » 09 Feb 2011, 05:32

Hi Matthias,
Thanks for replying. Yes actually what I normally do is php, perl, etc development. So that area is more familiar to me than Quark, Flash, etc. :)
Although I'm a little confused as to what to do with this... First off this project isn't really a website, it's actually an executable that gets run from a dvd (or cd whichever fits :) ). So I'd have to store stuff...hmm. Where? On the user's harddrive somewhere like a cookie I guess?
I'm not even sure yet what to ask! :) I'm confused as to how those actions work in Quark.... guide me oh gurus! :)
-- Aaron

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

Passing variables?

Post by Matthias Guenther (Quark) » 09 Feb 2011, 05:45

Hi Aaron,
if you have offline Flash files then yes, a Flash cookie would be an option. Just QuarkXPress doesn't support any Flash cookies.
I am not sure how else you could do that unless going online, sorry.
Regards
Matthias

nquit
Posts: 0
Joined: 07 Feb 2011, 14:51

Passing variables?

Post by nquit » 09 Feb 2011, 05:51

well we do have a web server so I suppose it's a possibility.
how do I deal with that if I do use that method though?

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

Passing variables?

Post by Matthias Guenther (Quark) » 10 Feb 2011, 02:01

Hi Aaron,
Submitting variable data
When you submit a page the data is being passed in the following form:
Variable1=FirstValue&Variable2=SecondValue&Variable3=ThirdValue

The variable is the name of the text object and the value its content.

So you need to write server side script to handle this get/post so that you can extract the information from query string and store it in a file or database on the server in a format needed when you "read" it again.
Reading variable values
When reading you just need a text file on the server which contains pairs in following format:
"Variable1=FirstValue& &Variable2=SecondValue& &Variable3=ThirdValue"

Once you have this text file on your server, then you can invoke Internet>Get Variable action and refer to the text file on your server.
Does that make sense or do you need more help?
Thanks
Matthias

nquit
Posts: 0
Joined: 07 Feb 2011, 14:51

Passing variables?

Post by nquit » 10 Feb 2011, 04:33

ahh ha - ok yes that makes sense - thank you very much!
I'll run with that for a little bit and see what happens :)

Locked

Return to “Expressions”