Foros del Web » Creando para Internet » Flash y Actionscript »

como?

Estas en el tema de como? en el foro de Flash y Actionscript en Foros del Web. Hola como puedo poner la hora en mi web con flash?...
  #1 (permalink)  
Antiguo 05/05/2004, 11:14
Avatar de trivliani  
Fecha de Ingreso: enero-2004
Ubicación: Nicolas Romero. Edo. de México.
Mensajes: 336
Antigüedad: 20 años, 3 meses
Puntos: 0
Información como?

Hola como puedo poner la hora en mi web con flash?
__________________
un favor con otro y eso es todo..
  #2 (permalink)  
Antiguo 05/05/2004, 11:44
Avatar de Ludwingg  
Fecha de Ingreso: diciembre-2002
Ubicación: San Salvador
Mensajes: 951
Antigüedad: 21 años, 4 meses
Puntos: 5
es super facil, tienes que utilizar el objeto date() y sus metodos para obtener la demas informacion,

haz click en: http://www.talleresdelweb.com/index....os&id=4&acc=90

ese articulo funciona para flash 5, MX, MX-2004

suerte
  #3 (permalink)  
Antiguo 05/05/2004, 17:54
Avatar de roc2107
ɹopɐɹǝpoɯ
 
Fecha de Ingreso: febrero-2003
Ubicación: León Guanajuato
Mensajes: 4.834
Antigüedad: 21 años, 2 meses
Puntos: 109
Otro ejemplo muy bueno es este, solo pon estas acciones en el primer fotograma:


clockHeight = 50;
clockWidth = 50;
clockFromMouseY=0;
clockFromMouseX=100;

d = ["domingo", "lunes", "martes", "miercoles", "jueves", "viernes"];
m = ["enero", "febrero", "marzo", "abril", "mayo", "junio", "julio",
"agosto", "setiembre", "octubre", "noviembre", "diciembre"];
dia = new Date().getDate();
anio = new Date().getFullYear();
fechaHoy = " "+d[new Date().getDay()]+" "+dia+" "+m[new Date().getMonth()]+" "+anio;
d2 = fechaHoy.split("");
H = "...".split("");
M = "....".split("");
S = ".....".split("");
vel = 0.6;
tam = "1 2 3 4 5 6 7 8 9 10 11 12".split(" ");
split = 360/tam.length;
dsplit = 360/d2.length;
handHeight = clockHeight/4.5;
handWidth = clockWidth/4.5;
handY = -7;
handX = -2.5;
step = 0.06;
curStep = 0;
y = [];
x = [];
y2 = [];
x2 = [];
dy = [];
dx = [];
dy2 = [];
dx2 = [];
for(var i=0;i<tam.length;i++){
y.push(0);
x.push(0);
y2.push(0);
x2.push(0);
dy.push(0);
dx.push(0);
dy2.push(0);
dx2.push(0);
}
for(var i=0;i<d2.length;i++){
var tmp = createEmptyMovieClip("nsDate"+i, i);
with(tmp){
_x = _y = 0;
createTextField("texto", 0, 0, 0, null, null);
texto.autoSize = true;
texto.selectable = false;
texto.text = _parent.d2[i].toUpperCase();
}
}
for(var i=0;i<tam.length;i++){
var tmp = createEmptyMovieClip("nsFace"+i, (i+24));
with(tmp){
_x = _y = 0;
createTextField("texto", 0, 0, 0, null, null);
texto.autoSize = true;
texto.selectable = false;
texto.text = _parent.tam[i];
}
}
for(var i=0;i<S.length;i++){
var tmp = createEmptyMovieClip("nsSeconds"+i, (i+36));
with(tmp){
_x = _y = 0;
createTextField("texto", 0, 0, 0, null, null);
texto.autoSize = true;
texto.selectable = false;
texto.text = _parent.S[i];
}
}
for(var i=0;i<M.length;i++){
var tmp = createEmptyMovieClip("nsMinutes"+i, (i+41));
with(tmp){
_x = _y = 0;
createTextField("texto", 0, 0, 0, null, null);
texto.autoSize = true;
texto.selectable = false;
texto.text = _parent.M[i];
}
}
for(var i=0;i<H.length;i++){
var tmp = createEmptyMovieClip("nsHours"+i, (i+45));
with(tmp){
_x = _y = 0;
createTextField("texto", 0, 0, 0, null, null);
texto.autoSize = true;
texto.selectable = false;
texto.text = _parent.H[i];
}
}
function clockAndAssign(){
sec = -1.57 + Math.PI * new Date().getSeconds()/30;
min = -1.57 + Math.PI * new Date().getMinutes()/30;
hrs = -1.575 + Math.PI * new Date().getHours()/6+Math.PI*parseInt(new Date().getMinutes())/360;
for(var i=0;i<tam.length;i++){
this["nsFace"+i]._y = y[i] + clockHeight*Math.sin(-1.0471 + i*split*Math.PI/180);
this["nsFace"+i]._x = x[i] + clockWidth*Math.cos(-1.0471 + i*split*Math.PI/180);
}
for(var i=0;i<H.length;i++){
this["nsHours"+i]._y = y[i]+handY+(i*handHeight)*Math.sin(hrs);
this["nsHours"+i]._x = x[i]+handX+(i*handWidth)*Math.cos(hrs);
}
for(var i=0;i<M.length;i++){
this["nsMinutes"+i]._y = y[i]+handY+(i*handHeight)*Math.sin(min);
this["nsMinutes"+i]._x = x[i]+handX+(i*handWidth)*Math.cos(min);
}
for(var i=0;i<S.length;i++){
this["nsSeconds"+i]._y = y[i]+handY+(i*handHeight)*Math.sin(sec);
this["nsSeconds"+i]._x = x[i]+handX+(i*handWidth)*Math.cos(sec);
}
for(var i=0;i<d2.length;i++){
this["nsDate"+i]._y = dy[i] + clockHeight*1.5*Math.sin(curStep+i*dsplit*Math.PI/180);
this["nsDate"+i]._x = dx[i] + clockWidth*1.5*Math.cos(curStep+i*dsplit*Math.PI/180);
}
curStep -= step;
}
function delay(){
dy[0]= Math.round(dy2[0]+=((_ymouse+clockFromMouseY)-dy2[0])*vel);
dx[0]= Math.round(dx2[0]+=((_xmouse+clockFromMouseX)-dx2[0])*vel);
for (var i=1; i < d2.length; i++){
dy[i]= Math.round(dy2[i]+=(dy[i-1]-dy[i])*vel);
dx[i]= Math.round(dx2[i]+=(dx[i-1]-dx[i])*vel);
}
y[0]= Math.round(y2[0]+=((_ymouse+clockFromMouseY)-y2[0])*vel);
x[0]= Math.round(x2[0]+=((_xmouse+clockFromMouseX)-x2[0])*vel);
for (i=1; i < tam.length; i++){
y[i]= Math.round(y2[i]+=(y[i-1]-y2[i])*vel);
x[i]= Math.round(x2[i]+=(x[i-1]-x2[i])*vel);
}
clockAndAssign();
}
clockAndAssign();
delay();
setInterval(delay, 20);
__________________
Blog de Diseño Gráfico roc21.com ||

El secreto de la creatividad es saber esconder tus fuentes.
  #4 (permalink)  
Antiguo 06/05/2004, 21:36
Avatar de trivliani  
Fecha de Ingreso: enero-2004
Ubicación: Nicolas Romero. Edo. de México.
Mensajes: 336
Antigüedad: 20 años, 3 meses
Puntos: 0
ya lo ice de las dos formas y me salió gracias pero soy nuevo en esto y tengo otro problema; estoy haciendo un botón el cual no me sale como integrar el script _blank y como lo puedo integrar a este

on (release) {
getURL("http://wwww.pagina.com");
}

me confundí mucho me seria de gran ayuda su respuesta ....
__________________
un favor con otro y eso es todo..
  #5 (permalink)  
Antiguo 06/05/2004, 21:46
Avatar de roc2107
ɹopɐɹǝpoɯ
 
Fecha de Ingreso: febrero-2003
Ubicación: León Guanajuato
Mensajes: 4.834
Antigüedad: 21 años, 2 meses
Puntos: 109
De esta forma:


on (release) {
getURL("http://www.tupagina.com", "_blank");
}
__________________
Blog de Diseño Gráfico roc21.com ||

El secreto de la creatividad es saber esconder tus fuentes.
  #6 (permalink)  
Antiguo 07/05/2004, 21:45
Avatar de trivliani  
Fecha de Ingreso: enero-2004
Ubicación: Nicolas Romero. Edo. de México.
Mensajes: 336
Antigüedad: 20 años, 3 meses
Puntos: 0
Gracia otra molestia no me sale un menú desplegable como lo hago algun ejemplo como el de Talleres del web? que me diste de el reloj por que hay mismo tienen un ejemplo de un menú pero no me sale alguno otro gracias....
__________________
un favor con otro y eso es todo..
  #7 (permalink)  
Antiguo 07/05/2004, 22:18
Avatar de Abelius  
Fecha de Ingreso: mayo-2004
Ubicación: Miami, FL, USA
Mensajes: 248
Antigüedad: 19 años, 11 meses
Puntos: 0
roc2107: Hey! Tienes 1000 posts! Congrats!!! :)

Ademas, me encanta este forum, se lo estoy recomendando a todos mis alumnos de habla hispana aqui en Miami... :)
__________________
Cordialmente,
Abel K
Miami, FL, USA
World Kit
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 01:34.