Q: Character menus, up & down buttons 'go to the frame +1 & -1', no good for 'looping' through the menu (as +1 on last frame of menu will take you to next frame in Movie, not back to the next character in menu.
A: added an individual 'up' button to the 1st frame in menu with 'go to frame 10' (or whatever the frame number of last menu frame), and added an individual 'down' button to last frame in menu with 'go to frame 7 (or frame number of 1st menu frame).
Q: Frame Script for Flash animation (in abm1.dir) to play, and then when finished playing, automatically jump to next frame (or any required frame) in movie.
A:
on exitFrame
if sprite(2).playing = 1 then
go to the frame
else go to frame 2
end if
end
This is an 'if, then, else' script.
This means if the sprite 2 (which is our flash animation as it is in channel 2 of the timeline) is playing (=1, means 'playing'), then playhead must 'go to the frame' (keep looping within it's frame/frames), else (otherwise, i.e, if the flash animation has finished playing, so it no longer =1), then it must go to frame 2 (or whatever number/marker you need to go to).
Q: We need our Quicktime video clips to play, and then when finished, automatically jump to another frame (which shows the 'disconnecting' Flash animation)
A: We originally used the Frame script:
on exitFrame
if the movieRate of sprite 2=1 then
go to the frame
else go to to 'end'
end if
end
'end' was the marker for the 'disconnecing' Flash animation.
This code was used to tell the playhead that if the Quicktime video (sprite 2) was playing (movieRate = 1) then 'go to the frame' (keep looping within frame), else (if it's stopped playing) go to 'end'.
This worked within Director, and when previewed on a web browser on the Mac. However, the Quicktime movie did not play on a PC (even after re-publishing from a Mac, and also creating a separate 'Xtras' folder within out 'Sites' folder and manually including the Quicktime Xtras).
We felt it was a shame that it didn't work on both platforms, but time considerations meant we were going to keep it as a Mac product (and work on it after the deadline to make it cross platform)
However, when we uploaded the final .dcr's to the server, the Quicktime videos didn't even play on the Mac. They played partially, on some Mac's, but not at all on others. Generally, they would 'skip' straight past the Quicktime video (with a brief glimpse of the 1st frame) and go directly to the 'disconnecting' animation.
We had great difficulty understanding why it worked sometimes, on some Mac's, but not on others. On my machine it worked 95% of the time!. We felt somehow the code wasn't providing a stable enough instruction, so we had to find something else as we couldn't settle with something so unreliable,
We tried others lingo including this suggested by Rob:
on exitFrame me
if the movieTime of sprite 2 < 2068 then
go to the frame
else if sprite(2).movieTime = 2068 then go "end"
end if
end
This Script tells the playhead to 'go to the frame', as long as the Video hasn't reached it's total number of 'ticks' (measurement of video length in Director), in this case 2068. When the video has reached this number, it's told to go to 'end'.
This worked within Director, however, after publishing onto the server, the Quicktime didn't play at all, it just showed a frozen image on and did not move.
I seached the Director Help file, google, several Director forums, Macromedia website etc, and found no suggestions to resolve this problem.
Eventually a collegue, Spiros, suggested we stretch the Quicktime clips, so they occupy more than one frame, and on the 1st frame add the Frame script:
on exitFrame me
go to the frame
sprite(2).movieRate = 1
if (sprite(2).movieRate = 1) then go to 16 (or the frame number/marker the last frame the Quicktime occupies)
end
And on the last frame, add the Frame script:
on exitFrame me
go to the frame
if (sprite(2).movieRate = 0) then go to frame "ani"
end if
end
This worked when published on the server, and also seemed to work for both Mac and PC (although I was by this time working on a Mac rather than a PC, which is perhaps more Quicktime friendly)
Q: To link multiple .dcr's
A: We thought it would be better for this to be connected to an 'on mouseUp' action, rather than trying to make it happen automatically from our 'disconnecting' Flash animation (which is the last frame of each .dcr). So we added 'connect' and a button below to link to the next .dcr with a cast script on the button:
on mouseUp
gotoNetMovie "http://maimm.linst.ac.uk/~nlna/dswmedia/abm2.dcr"
end