Flash CS3 - Flash CS4

Free tutorials and scripts for all.
Actionscript 3.0

Problema Countdown - conto Rovescia

This is a discussion on Problema Countdown - conto Rovescia within the AIUTO utilità free forums, part of the Flash CS3 generale category; Ciao a tutti sono nuovo del forum e vorrei sottoporvi un mio problema nella realizzazione di un countdown, il conto ...


Go Back   Forum Flash CS3 Flash CS4 > Flash CS3 e Actionscript 3.0 > Flash CS3 generale > AIUTO utilità free

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 29-09-08, 12:25
Junior Member
 
Join Date: Sep 2008
Posts: 1
Rep Power: 0
Mestriotes is on a distinguished road
Problema Countdown - conto Rovescia

Ciao a tutti sono nuovo del forum e vorrei sottoporvi un mio problema nella realizzazione di un countdown, il conto alla rovescia funziona perfettamente, ma non riesco ad agganciare allo scorrere del tempo l'animazione di una maschera che dovrebbe muoversi al trascorrere del tempo, ogni volta che aggiorno la pagina, l'animazione della maschera parte dall'inizio

grazie per qualsiasi delucidazione

Il Codice qui sotto del primo frame:

Code:
stop();
import mx.transitions.Tween;
import mx.transitions.easing.*;
Stage.showMenu = false;
_quality = "BEST";
var anno = "2009";
var mese = "12";
var giorno = "19";
currentDate = new Date();
thisYear = currentDate.getFullYear();
scadenza.text = "Scadenza: "+_root.giorno+"/"+_root.mese+"/"+_root.anno;
eventDate = new Date(_root.anno, _root.mese-1, _root.giorno);
eventMillisecs = eventDate.getTime();
counter.onEnterFrame = function() {
var maskmove:Tween=new Tween(maskera,"_y", Strong.easeOut, maskera._y, 193, ?????, true)
currentDate = new Date();
currentMillisecs = currentDate.getTime();
this.msecs = eventMillisecs-currentMillisecs;
if (this.msecs<=0) {
 play();
 return;
}
trace(this.hours);
this.secs = Math.floor(this.msecs/1000);
this.mins = Math.floor(this.secs/60);
this.hours = Math.floor(this.mins/60);
this.days = Math.floor(this.hours/24);
this.msecs = String(this.msecs%1000);
this.secs = String(this.secs%60);
this.mins = String(this.mins%60);
this.hours = String(this.hours%24);
this.days = String(this.days);
while (this.msecs.length<3) {
 this.msecs = "0"+this.msecs;
}
if (this.secs.length<2) {
 this.secs = "0"+this.secs;
}
if (this.mins.length<2) {
 this.mins = "0"+this.mins;
}
if (this.hours.length<2) {
 this.hours = "0"+this.hours;
}
while (this.days.length<3) {
 this.days = "0"+this.days;
}
for (movie in this) {
 if (this[movie]._parent == this) {
  this[movie].evaluateFrameFrom(this);
 }
}
};

MovieClip.prototype.evaluateFrameFrom = function(variableClip) {
var nameArray = this._name.split("_");
var numberSet = variableClip[nameArray[0]];
var character = Number(nameArray[1]);
var frame = 1+Number(numberSet.charAt(character));
if (this._currentframe != frame) {
 this.gotoAndStop(frame);
}
};
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads

Thread Thread Starter Forum Replies Last Post
Flash CS3 CountDown Flep FlepStudio utilities 20 18-11-08 14:32
Conto alla rovescia per Flash CS3 Flep Utilità di FlepStudio 13 21-10-08 16:23


All times are GMT. The time now is 21:52.


Powered by vBulletin versione 3.7.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC4
Forum SiteMap


FlepStudio
by Filippo Lughi
P.IVA 03605860406