Zurück   Flashforum > Flash > ActionScript > ActionScript 1

Antwort
 
LinkBack Themen-Optionen Ansicht
Alt 17-12-2003, 10:51   #1 (permalink)
Neuer User
 
Registriert seit: Oct 2001
Beiträge: 154
Angry getTimer oder setInterval oder was anderes?

Hi,

ich benutze im Moment setInterval in einem Film um bei verschiedenen Movies eine Zeitverzögerung reinzubringen.
Funktioniert auf den ersten Blick ganz gut. Jetzt habe ich
das ganze auf einem schnellerern Rechner gestetet und alles
verschiebt sich zeitlich ein bißchen, wie kann ich das vermeiden?

Hir mein jetziger Aufruf:

ActionScript:
  1. pause3 =setInterval(function () {mc_fenster3.gotoandplay(2),

Geht das mit getTimer besser, wenn ja wie müßte das aussehen?


Ach noch was: hat jemand ein funktionierendes Script für: ein Bild hinter einer Maske endlos von rechts nach links laufen lassen. Hab schon einiges getestet aber nichts läuft flüssig. Zuerst habe ich selbst etwas gebaut, war nichts, das Bild ruckelt. Dann habe ich mir bei flashstar so ein Panorama teil geholt und es modifiziert.
die Mausgeschichte raus, aber auch das ruckelt, besonders an den stellen wo das bild zusammengesetzt wird.


Vielen Dank

Mfg Beetle
Beetle ist offline   Mit Zitat antworten
Alt 17-12-2003, 11:23   #2 (permalink)
HAY
Neuer User
 
Benutzerbild von HAY
 
Registriert seit: Aug 2002
Ort: Faust-Stadt
Beiträge: 2.577
hi
da setInterval und getTimer in millisekunden gerechnet wird sollte das auf jedem rechner gleich sein.
__________________
gruß Harry
HAY ist offline   Mit Zitat antworten
Alt 17-12-2003, 13:44   #3 (permalink)
Neuer User
 
Registriert seit: Sep 2003
Ort: Graz
Beiträge: 36
Aus ASDG2, Colin MOOCK:

An interval can run 10 times per frame at most. So, even in a movie with a frame rate of 1 frame per second, an interval can still run only 10 times per second (every 100ms) at most, even when a smaller interval values is specified. Theoretically, at 10 frames per second, an interval can run 100 times per second (10 times per frame x 10 frames per second), or every 10ms. To update the screen within an interval function that runs more often than the frame rate, call updateAfterEvent() from within the function or method that the interval executes. For example:

ActionScript:
  1. function movieClip(clip) {
  2. // Move the clip
  3. clip._x += 5;
  4. // Update the screen
  5. updateAfterEvent();
  6. }

When an interval is set to run less often than the duration of a tick of the frame rate, it will execute on the frame after the interval time has expired. For example, given an interval set to 400ms and a frame rate of 10 fps (1 frame per 100ms), the Table shows the frames on which the interval should execute:

ActionScript:
  1. Frame #    Total time (ms)    Interval executed?
  2. 0                000                     no
  3. 1                100                     no
  4. 2                200                     no
  5. 3                300                     no
  6. 4                400                     yes
  7. 5                500                     no
  8. 6                600                     no
  9. 7                700                     no
  10. 8                800                     yes
  11. 9                900                     no
  12. 10              1000                     no
However, wether an intervall runs more or less often than the frame rate of a movie, interval times are by no means guaranteed. In an actual test movie, the intervals in the Table above may execute at frames 5 and 9, or even at frames 4 and 9. Code execution, Player rendering, and available system resources can all affect the actual timing of intervals. Where time is an important factor in an application, functions should be written to account for variance in interval times.

Vielleicht hilft Dir das? Ich würde zumindest schauen, daß der Intervall und die Frame Rate zusammenpassen, damit die Abläufe möglichst synchron gehen.

Also z.B. 25 fps / Intervall = 40 ms
(1 Sekunde / 25 fps = 40 ms)

Eventuell auch meinen Hinweis bez. globaler/lokaler Variablen hier beachten.
__________________
Robert Niessner
LAUFBILDkommission

Geändert von rniessner (17-12-2003 um 16:08 Uhr)
rniessner 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 14:37 Uhr.

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


Copyright ©1999 – 2012 Marc Thiele