I searched the archive for object.watch and found that object.watch
can't check getter/setters. my question is can it watch a read-only?
http://chattyfig.figleaf.com/mailman/htdig/flashcoders/2002-April/
030960.html
I want to watch a read-only property of an object -- basically, I
want a make a Movieclip._currentLabel in actionscript 2.0 b/c my
audience can't go to flash8 yet
Movie Clip: Frame=47 Target="_level0.play_this_audio" Label="1"
//This is returned when you list objects in the flash export movie
//(cmnd+enter = cmnd+L)
How can I watch the Label of a movie clip?
That is to say, I have a external swf that contains labels, 0, 1,
2, 3, etc and an audio track.
This swf, swf one, is called into swf two, which contains photos.
while the swf one plays its audio, every few seconds along the
timeline it fires off a function that makes swf two advance to a
different photo.
The problem is, I want the correct photo to come up when the user
begins to navigate via a nonlinear draggable timeline representation
of the audio length. (meaning - everything is fine if people can't do
anything but watch it - the minute they skip back/forward it all
becomes out of sync)
It seems the only way to do this dynamically is to know which
photo should be displaying at that point via a range - like frame label
Essentially, the movie will move to the correct photo anyway
during playback after the audio hits a keyframe with an advance
function. However, I want it to happen as soon as the user releases
the draggable timeline - the same time as the stopdrag() command.
This is so the audio and photos won't ever become out of sync
//pseudo code
controlNavBar.controlCircle_mc.onReleaseOutside=function () {
stopDrag();
timelineLength = 150;
var jumpPoint = int((controlNavBar.controlCircle_mc._x/
timelineLength)*allFramesInAudio);
// move the audio to the exact location from draggable bar
_root.play_this_audio.gotoAndPlay(jumpPoint);
var whichPictureToSee = object.watch(_root.play_this_audio,
"Label");
if (whichPictureToSee != 0) {
// jump to correct image when the audio has been adjusted
markerPic(whichPictureToSee);
} else {
// get first image in zero-index array
markerPic(0);
}
// end pseudo code
I have been digging around for some type of dynamic answer, I don't
know that object.watch works like this at all, but I don't really
have any ideas. I want to know the frame label, or count the number
of actions/function calls without having to play the audio first and
do a count using i++ or something. This is all for the sake of the
user being able to rewind / fast-forward / jump around in the audio -
while seeing the correct visuals
thanks in advance to anyone who can shed some light on my question /
problem
-gregory
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com