Start and Stop movie through a list variable
 
PST User Forum
Home       Members    Calendar    Who's On
Welcome Guest ( Login | Register )
        



Start and Stop movie through a list variable Expand / Collapse
Author
Message
Posted 6/2/2009 7:22:04 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 5/9/2012 7:33:13 AM
Posts: 7, Visits: 91
Hi all, i'm displaying different parts of a clip on different trials, and i'm trying to set the start and stop positions by means of a list variable. For example, if i wnat to start the clip in the 16th, in Start Position i create a variable called [Comienzo] (start in spanish), and then, in the list, set the value of this variable to 00:00:16.000. But it won't work, it always starts on the beginning of the clip. Im i gettin something wrong here?

Thanks,

Alex

Post #3098
Posted 6/2/2009 11:30:50 AM
Forum MVP

Forum MVPForum MVPForum MVPForum MVPForum MVPForum MVPForum MVPForum MVP

Group: Forum Members
Last Login: 5/14/2012 4:43:58 PM
Posts: 728, Visits: 2,932
Well to start with PST has not yet documented the MovieDisplay object, so we are all working in the dark here. But your problem looked interesting so I investigated it further myself.

First I put a literal value of 00:00:02.000 right into the Start Position of my MovieDisplay, and as expected it started the clip 2 sec from the start. Then I put [MovieStart] into Start Position, and in my List entered a value 00:00:02.000 into MovieStart. In this case I got the same results as you, the clip started playback from the start, ignoring my Start Position value.

I wanted to make sure that E-Prime generated the correct script, so I looked inside. Here is the complete script of my Sub TrialProc_Run:

MovieDisplay1.Load
MovieDisplay1.StartPosition = c.GetAttrib("MovieStart")
MovieDisplay1.Run

So you can see that the script does correctly provide MovieStart to the Start Position.

Next I added a couple MsgBoxes to verify the value of .StartPosition, so my TrialProc script came out something like this:

MsgBox MovieDisplay1.StartPosition
MovieDisplay1.Load
MovieDisplay1.StartPosition = c.GetAttrib("MovieStart")
MovieDisplay1.Run
MsgBox MovieDisplay1.StartPosition

The first MsgBox dutifully showed the default value of 00:00:00.000, while the second MsgBox showed 00:00:02.000. Hmm, so the StartPosition did get changed correctly, but somehow just did not get recognized in running the MovieDisplay.

Just on a hunch I then replayed MovieDisplay1 once more at the end:

MsgBox MovieDisplay1.StartPosition
MovieDisplay1.Load
MovieDisplay1.StartPosition = c.GetAttrib("MovieStart")
MovieDisplay1.Run
MsgBox MovieDisplay1.StartPosition
MovieDisplay1.Load
MovieDisplay1.StartPosition = c.GetAttrib("MovieStart")
MovieDisplay1.Run

Aha! The first time the clip started at 0, but the second time it actually started at 2 sec, as requested!

OK, that's as far as I got. Perhaps someone else can take this further and find a workaround in script until PST admits they have a problem and fixes this. You should also definitely submit this directly to PST Web Support at http://support.pstnet.com/e%2Dprime/support/login.asp, heck I might even submit it myself. But thanks for bringing this to public attention.

-- David McFarlane, Professional Faultfinder
Post #3101
Posted 6/5/2009 2:00:43 PM
Forum MVP

Forum MVPForum MVPForum MVPForum MVPForum MVPForum MVPForum MVPForum MVP

Group: Forum Members
Last Login: 5/14/2012 4:43:58 PM
Posts: 728, Visits: 2,932
Alison at PST Web Support kindly helped out and invited me to share her reply, which I found very informative. Here is an excerpt:


"Our developers are aware of this bug and are working to fix it in a future build of the Release Candidate.

In the meantime, you can work around the issue by setting the .StartPosition property manually through script, rather than using an attribute reference in the Property Pages. Setting the start position before the Load method is the best way to ensure the movie will play correctly. This is the most likely reason your movie played correctly the second time you called Run."

".. all you have to do is create an InLine object before the MovieDisplay1 object and enter MovieDisplay1.StartPosition = c.GetAttrib("MovieStart"). StartPosition in the Property Pages can stay at the default value since it will already be set in script."


I have not tried this yet but I trust it will work and give us a workaround for now. Thanks again, Alison!

-- David McFarlane, Professional Faultfinder
Post #3114
Posted 2/11/2011 5:04:57 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 3/7/2012 2:11:47 PM
Posts: 2, Visits: 9
Any advice for a similar work-around when using a movie as a sub-object embedded in a slide? I can get the work-around above to work when the movie is a stand-alone object in the procedure, but not when it is embedded in a slide. Thanks!
Post #5217
« Prev Topic | Next Topic »


Permissions Expand / Collapse

All times are GMT -5:00, Time now is 4:28am

Powered By InstantForum.NET v4.1.4 © 2012
Execution: 0.125. 8 queries. Compression Disabled.
 
Privacy | Terms of Use | Terms and Conditions | Legal Trademarks | Authorized Use | Quality Policy
Copyright 2012 Psychology Software Tools, Inc. All Rights Reserved
Email: Info@pstnet.com | Telephone: 412.449.0078 | Fax: 412.449.0079