Millisecond Forums

How do I optimize my experiment for iPhone AND computer?

https://forums.millisecond.com/Topic25564.aspx

By bkorsmo - 9/19/2018

How do I optimize my experiment for iPhone AND computer?

I am able to optimize my experiment visually for either iPhone OR PC/Mac but not for both. Any tips? Advice?

I've played with canvasaspect ratio but run into the same issue= looks great on iphone but now is massive on pc/mac or vice a versa.



Help!

Thanks in advance to this forum. You all are aces and generous with helping others.
Ben

By Dave - 9/19/2018

bkorsmo - Wednesday, September 19, 2018
How do I optimize my experiment for iPhone AND computer?

I am able to optimize my experiment visually for either iPhone OR PC/Mac but not for both. Any tips? Advice?

I've played with canvasaspect ratio but run into the same issue= looks great on iphone but now is massive on pc/mac or vice a versa.



Help!

Thanks in advance to this forum. You all are aces and generous with helping others.
Ben


You can use conditional <include> elements to import different settings (e.g. a different canvassize) to different platforms.

https://www.millisecond.com/support/docs/v5/html/language/attributes/precondition.htm

Say, you have iOS settings in a file called iosdefaults.iqx containing something like

<defaults>
/ canvasaspectratio = (3,4)
</defaults>

(that would run the script in "portrait" instead of "landscape" mode on iOS)

and settings for other platforms in a file called otherdefaults.iqx with something like

<defaults>
/ canvasaspectratio = (4,3)
</defaults>

(that would be standard 4:3 landscape orientation)

then you would import those different defaults in your actual main script like so:

<include>
/ precondition=[computer.platform == "ios"]
/ file="iosdefaults.iqx"
</include>

<include>
/ precondition=[computer.platform != "ios"]
/ file="otherdefaults.iqx"
</include>
By bkorsmo - 9/19/2018


Supreme Being, thanks a million for your help!