Flash 4 panorama sample
the sample: this sample starts off using the "Pan and Zoom" file from the Help>Samples in Flash 4 and modifies it in away that the movement is triggered by rolling over the buttons rather than clicking on them. download my sample and compare it with "Pan and Zoom" to see the difference. the steps: the following changes are probably most easily to spot if you use the frame/object inspector: - i set labels for frame 2, 3 and 5 to keep it simpler. all scripts in the file refer to the labels, in the description i use the framenumbers. i think this is easier to imagine. the changes on the scripts
are as follows: - i copied the "Set Property" etc actions from the buttons to keyframes 4 and 6 and added the actions "GoTo and Play (3)" and "GoTo and Play (5)" (respective label names). the button scripts were changed
as follows: the whole thing works as follows: when the movie starts first of all the variables are initialized and the panorama movieclip is set to its initial position (script frame 1). on frame two the animation is simply stopped. if the mouse is moved over the arrow to the right you jump to frame 3 in the timeline where nothing yet is happening. on frame 4 the position of the movieclip is changed, you loop back to 3 from where you get to 4 again and the position is changed again etc until you roll away from the button which brings you back to frame 2... the zoom function still works like before. i took out the buttons that move the object up and down but you can create them in the same way.
|
deutsche beschreibung
die vorgehensweise: ich habe
zuerst einmal 6 weitere frames eingefuegt, dann auf den controls und backgroundlayers am einfachsten koennen sie
die aenderungen nachvollziehen, wenn sie den ich habe dann der einfachheit
halber labels fuer frame 2,3 und 5 gesetzt die aenderungen an den skripts
sind folgende: -dann habe ich die "Set Property"
etc aktionen von den buttonskripts in - die buttonskripts wurden
wie folgt geaendert: die ganze geschichte funktioniert
fogendermassen: wenn der film beginnt, die zoom optionen funktionieren
wie gehabt. die pfeile nach oben und |