I am reviewing the Adobe site - "Learning ActionScript 3", as well as many other resources. It seems I am far from fluent in ActionScript, so I turn to this Forum, as well.
1). In the attached example file, I successfully call a pair of RMAs via rm.callAS:
var aRM = this.getAnnotsRichMedia(0); // var used to ID any Clip on first page (PDF document page# minus 1) // var rm = aRM; // get rich media annot for First Clip [RM List Position# minus 1] // if ( !rm.activated ) rm.activated=true; // activate the RMA rm.callAS("multimedia_play"); // play First Clip // var rm = aRM; // get rich media annot for Second Clip [[RM List Position# minus 1] // if ( !rm.activated ) rm.activated=true; // activate the RMA // // IT IS DESIRED TO WAIT N MILLISECONDS BEFORE PROCEEDING, But attempts using setTimeOut have not succeeded, so here, Second Clip begins to play, in unison with First Clip // rm.callAS("multimedia_play"); // play Second Clip
The two clips play simultaneously.
The comment in CAPS refers to attepts made in another Forum post of mine. I've been unable to achieve a delay for the second rm.callAS.
– – –
2). Also, using a separate button in the attached example file, I aim for an RMA to seek to a timepoint, at which to begin playing the clip:
var aRM = this.getAnnotsRichMedia(0); // var used to ID any Clip on first page (PDF document page# minus 1) // var rm = aRM; // get rich media annot for Second Clip [RM List Position# minus 1] // if ( !rm.activated ) rm.activated=true; // activate the RMA rm.callAS("multimedia_seek", (6)); // seek to 6.0 seconds in Second Clip rm.callAS("multimedia_play"); // play Second Clip, beginning at 6.0 seconds
The result is most puzzling. One will note that the Seek button does in fact cause the clip to initiate playing at a timepoint after 0.0 sec., but not close to 6.0 sec.
I believe when I get a grip on this, I'll be able to beneficially apply the callAS libray, much of which I'm aware.
Copy link to clipboard
You do know that Flash is not long for this world?
A complicated subject; not a simple answer; happy to address as a side topic.
I am fully aware of its long-ago-announced 'software EOL'. That is not synonymous with evaporation. My interest is development of expressive forms [cognitive spaces] for which there is no anywhere-near-close alternative. Don't be misled by this grossly oversimplified test instance. The objective goes way beyond some 'Your Friendly PGA on Youtube' folly.
Your warning, as cautionary advice, is relevant, well-taken, and appreciated. And do chime in if you've you've got a scripting pointer.
Copy link to clipboard
Multimedia_seek on video tells the embedded player to jump to the nearest keyframe for the specified time offset. How close it gets to the target depends on the keyframe intervals in your media files. As you've discovered the seek will always be consistent, but unless you craft a very carefully encoded media file with markers at the target points it will not be frame-accurate.
Yes, I've found to what timepoint the clip in the attached file was seeking. That ~1.8 seconds timepoint I cite, is a camera-cut scene-change, in the original TV broadcast.
New readers of this topic can find more in this post,