modifying Z-order of slide images at runtime
David McFarlane
mcfarla9 at msu.edu
Thu Jan 16 22:07:58 UTC 2014
I got curious, so I took a quick look into this. Short story: No
streamlined way to modify Slide sub-object z-order at run time,
although one might do this with some careful coding. Details...
I fired up good old EP1 to make a simple test program and look at the
generated source code. I added a Slide, then added a SlideText and a
SlideImage object to the Slide, with the SlideImage in *front* of the
SlideText. The relevant lines in the generated source code (under
InitObjects) go
Slide1.States.Item("Default").Objects.Add Slide1_SlideImage, "Image1"
...
Slide1.States.Item("Default").Objects.Add Slide1_SlideText, "Text1"
I then moved the SlideImage *behind* the SlideText, then the relevant
lines of code went
Slide1.States.Item("Default").Objects.Add Slide1_SlideText, "Text1"
...
Slide1.States.Item("Default").Objects.Add Slide1_SlideImage, "Image1"
Based on this, it looks like the z-order from front to back
corresponds to the order of objects in the associated
SlideStimCollection object. (IOW, if you think about it, E-Prime
draws Slide sub-objects in reverse order of their position in the
SlideStimCollection.) I did not verify this any further, I leave
that to others.
If this is correct, then one might modify the z-order at run time by
using inline code to directly manipulate the objects in the
SlideStimCollection. I leave this as an exercise (and if anyone does
this, please post back with your results!).
As a workaround, if one has to consider only a few z-orders, then one
might make several SlideStates on the Slide, one SlideState for each
different z-order. One could then use an attribute reference to
select the SlideState with the desired z-order at run time, possibly
with no code at all. It might be hard, however, to maintain the
parallel but independent SlideStates during development.
-----
David McFarlane
E-Prime training
online: http://psychology.msu.edu/Workshops_Courses/eprime.aspx
Twitter: @EPrimeMaster (https://twitter.com/EPrimeMaster )
/----
Stock reminder: 1) I do not work for PST. 2) PST's trained staff
take any and all questions at https://support.pstnet.com , and they
strive to respond to all requests in 24-48 hours, so make full use of
it. 3) In addition, PST offers several instructional videos on their
YouTube channel (http://www.youtube.com/user/PSTNET ). 4) If you do
get an answer from PST staff, please extend the courtesy of posting
their reply back here for the sake of others.
\----
At 1/16/2014 11:32 AM Thursday, JACanterbury wrote:
>Hi Alon,
>
>Hopefully you found out how to do this. If so, could you post the answer?
>
>Thanks,
>
>John
--
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To unsubscribe from this group and stop receiving emails from it, send an email to e-prime+unsubscribe at googlegroups.com.
To post to this group, send email to e-prime at googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/e-prime/52d85847.220c320a.7d5e.5722SMTPIN_ADDED_MISSING%40gmr-mx.google.com.
For more options, visit https://groups.google.com/groups/opt_out.
More information about the Eprime
mailing list