24-07-2005, 22:42
|
|
מנהל פורום פלאש
|
|
חבר מתאריך: 04.03.05
הודעות: 5,834
|
|
קוד:
onClipEvent (load) {
fps = 12
totaltime = 1
distime = 2
!done
timeup = 0
screenWidth = 550
screenHeight = 400
this._visible = false
}
onClipEvent (enterFrame) {
avilable = _totalframes
timeup += 1
timer = Math.round(timeup / fps)
Math.round(timermin = timer/60)
if (timermin >= totaltime && !done) {
this._visible = true
this._x = Math.random()*screenWidth/(this._width*2)
this._y = Math.random()*screenHeight/(this._height*2)
this.gotoAndStop(Math.round(Math.random()*avilable ))
done = true
}
if (timermin >= totaltime + distime) {
this._visible = false
this._x = Math.random()*screenWidth/(this._width*2)
this._y = Math.random()*screenHeight/(this._height*2)
timeup = 0
!done
}
}
הנה הקוד, שנה את
fps
למה שיש לך, פריימים בשנייה
totaltime
למתי שזה יופיע
ו
distime
לכמה זמן זה ייעלם אחרי שזה יופיע
נערך לאחרונה ע"י coolroy בתאריך 24-07-2005 בשעה 22:46.
|