Zurück   Flashforum > Flash > ActionScript > ActionScript 1

Antwort
 
LinkBack Themen-Optionen Ansicht
Alt 29-06-2005, 11:25   #1 (permalink)
killed the cop
 
Benutzerbild von mr_blonde
 
Registriert seit: Apr 2005
Ort: Ruhrpott
Beiträge: 39
AS Problem bei Bilderschau Komponente

hallo zusammen, ich bin quasi kurz vor der fertigstellung meiner ersten komplexen Flashpage.
Doch das einzigste wo ich absolut nicht weiter komme ist folgendes:
Bei dieser Bilderschau Komponent möchte ich, das diese Diashow direkt startet und nicht erst wenn man auf den Button klick.
Man soll sie eher austellen können, wenn man bei einem Punkt stehen bleiben will. Anbei ist auch der AS Code.
Ich müsste doch nur irgend wo angeben, das der von Anfang an auf "autoplayStatus = 0" steht,oder?
Würd mich sehr über eine Ratschlag freuen. Danke!

ActionScript:
  1. function updateFrame (inc) {
  2.     // send slides to new frame
  3.     newFrame = _root._currentFrame + inc;
  4.     _root.gotoAndStop(newFrame);
  5.  
  6.     updateStatus();
  7.  
  8.     if (_root._currentFrame == 1) {
  9.         prevBtn.gotoAndStop(2);
  10.     } else {
  11.         prevBtn.gotoAndStop(1);
  12.     }
  13.     if (_root._currentFrame == _root._totalFrames) {
  14.         nextBtn.gotoAndStop(2);
  15.     } else {
  16.         nextBtn.gotoAndStop(1);
  17.     }
  18. }
  19.  
  20. function updateStatus () {
  21.     _root.statusField = _root._currentFrame + " of " + _root._totalFrames;
  22. }
  23.  
  24. function autoplayInit () {
  25.     startTime = getTimer();
  26.     hideControls();
  27.     updateStatus();
  28. }
  29.  
  30. function autoplay () {
  31.     if (autoplayStatus != 0) {
  32.         // get the current time and elapsed time
  33.         curTime = getTimer();
  34.         elapsedTime = curTime-startTime;
  35.  
  36.         // update timer indicator
  37.         indicatorFrame = int(4/(delay/(elapsedTime/700)));
  38.         indicator.gotoAndStop(indicatorFrame+1);
  39.  
  40.         // if delay time if met, goto next photo
  41.         if (elapsedTime >= (delay*700)) {
  42.             if (_root._currentframe == _root._totalframes) {
  43.                 _root.gotoAndStop(1);
  44.             } else {
  45.                 _root.nextFrame();
  46.             }
  47.             autoplayInit();
  48.         }
  49.     }
  50. }
  51.  
  52. function hideControls () {
  53.     nextBtn.gotoAndStop(2);
  54.     prevBtn.gotoAndStop(2);
  55. }
  56.  
  57. updateFrame();
  58. autoplayStatus = 0;
mr_blonde ist offline   Mit Zitat antworten
Antwort

Lesezeichen

Themen-Optionen
Ansicht

Forumregeln
Es ist Ihnen nicht erlaubt, neue Themen zu verfassen.
Es ist Ihnen nicht erlaubt, auf Beiträge zu antworten.
Es ist Ihnen nicht erlaubt, Anhänge hochzuladen.
Es ist Ihnen nicht erlaubt, Ihre Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks sind an
Pingbacks sind an
Refbacks sind an



Alle Zeitangaben in WEZ +1. Es ist jetzt 04:49 Uhr.

Domains, Webhosting & Vserver von Host Europe
Unterstützt das Flashforum!
Adobe User Group


Copyright ©1999 – 2012 Marc Thiele