all groups > flash (macromedia) > august 2007 >
You're in the

flash (macromedia)

group:

Slide Presentation - Please Help


Slide Presentation - Please Help Tom-WalshCol
8/19/2007 3:49:40 PM
flash (macromedia): I have created a Flash Slide Presentation that is synced to a FLV file. So
far, it works pretty good, but I am having a problem.

I am using buttons to create "Chapter Points" within the presentation. AKA,
you click on a button, and the MediaPlayback component should jump to the
correct position in the FLV file, and the correct slide should appear next to
the video.

Here is the code that's on the button:

on (release) {

var m = media_Playback;
var q = m.getCuePoint("slide2");

m.play(Math.round(q.time));

gotoSlide(this.slide_master.slide2_master.slide2);
}

the variable " media_Playback" is an instance of the MediaPlayback component
that is loaded on the top-most level slide (called "presentation"). The rest
of the variables are local to the on (release) code.

Here's the problem: when I click the button, the FLV will go to the correct
place in the presentation. However, the slide loads and immediately switches
to the last slide it was on. So, for example, if I am currently on slide 7,
and I want to go back to slide 2 (which is a chapter point) by clicking the
button, the above code will cause the FLV to go to the correct point in the
video, slide 2 will appear for half a heartbeat, and then it switches back to
slide 7 (the video still plays where I want it to, however). Obviously, this
isn't desired.

I've been wracking my brain for two days to figure this out, and I can't solve
it. If I don't do anything with cue-ing the FLV (removing the m.play() code),
the correct slide loads fine (however, of course, the video is in the wrong
place). Only when I add the wrinkle of cue-ing the video do I have an issue.
I have traced the values, of "m", "q" and "q.time", by the way, and they both
have expected values, so it doesn't seem like an addressing problem.

One interesting things I noted is that the value of "m.playheadTime" is the
same before and after I change the position where the FLV should be playing
back. I've even tried changing the value of m.playheadTime, but it didn't work
(I'm pretty sure this is a read-only property). I think this might be what's
wrong, but I have no idea how to fix this problem, so I'm hoping someone can
please help me.

Thank you!

Tom
Re: Slide Presentation - Please Help Tom-WalshCol
8/20/2007 12:00:00 AM
Re: Slide Presentation - Please Help Tom-WalshCol
8/24/2007 1:50:09 PM
As it turns out, the best way I found to handle this problem was to cue the
video to 2 seconds before the time I had the cue point set. The video
re-wound, and the cue point fired within 2 seconds, automatically switching the
slide. Pretty simple solution.
AddThis Social Bookmark Button