Comunidad de diseño web y desarrollo en internet online

Ajusto imagen a pantalla pero...

Citar            
MensajeEscrito el 29 Oct 2008 05:41 pm
Que tal pues raza! pues aqui dandole machin al flash ni modo no ay de otra es el pan de cada dia jeje. Tengo aqui un problemita ya que por fin me salio el comando de ajustar imagen a pantalla y swf a resolucion de ventana estoy mas que feliz :love: pero por desgracia me di cuenta que al momento de quererlo aplicar dentro de un boton de fade in y fade out la imagen no funciona en el MC y solo se pone asi sin efecto como los otros que vienen abajo. Les dejo el link www.martegrafica.com/tajimapisos asi como el codigo mas abajo para que lo chequen. Gracias!!

ESTE ES EL CODIGO DE AJUSTAR IMAGEN A RESOLUCION

// this tells Flash NOT to allow the assets to be scaled
Stage.scaleMode = "noScale";
Stage.align = "TL";



// need to set up a listener object to say when the stage is resized.
var stageListener:Object = new Object();
Stage.addListener(stageListener);

setBackground();

// called when the stage is resized
stageListener.onResize = function() {
setBackground();
}


function setBackground() {

// determine middle
var middleX = Stage.width/-30;
var middleY = Stage.height/-3.07;

// reposition the bkgd to middle
back1._x = middleX;
back1._y = middleY;

// scale background to fit width and height
back1._width = Stage.width;
back1._height = Stage.height;

// see if it grew bigger horizontally or vertically and adjust other to match
// to maintain aspect ratio
back1._xscale > back1._yscale ? back1._yscale = back1._xscale : back1._xscale = back1._yscale;

}


ESTE ES EL CODIGO DE LOS BOTONES FADE IN Y FADE OUT


on (rollOver) {
mc_animado.onEnterFrame = function() {
if (this._currentframe != 20) {
this.nextFrame();
} else {
this.stop();
delete this["onEnterFrame"];
}
};
}
on (rollOut) {
mc_animado.onEnterFrame = function () {
if (this._currentframe != 1) {
this.prevFrame();
}
else {
this.stop();
delete this["onEnterFrame"];
}
};

}
on(release) {
_root.gotoAndPlay("inicio1");
}

Por alexstorm

45 de clabLevel



Genero:Masculino  

firefox
Citar            
MensajeEscrito el 29 Oct 2008 05:58 pm
Te olvidaste de darle formato a tu code

Jorge

Por solisarg

BOFH

13669 de clabLevel

4 tutoriales
5 articulos

Genero:Masculino   Bastard Operators From Hell Premio_Secretos

Argentina

firefox
Citar            
MensajeEscrito el 29 Oct 2008 06:11 pm
Que tal pues raza! pues aqui dandole machin al flash ni modo no ay de otra es el pan de cada dia jeje. Tengo aqui un problemita ya que por fin me salio el comando de ajustar imagen a pantalla y swf a resolucion de ventana estoy mas que feliz Amor pero por desgracia me di cuenta que al momento de quererlo aplicar dentro de un boton de fade in y fade out la imagen no funciona en el MC y solo se pone asi sin efecto como los otros que vienen abajo. Les dejo el link www.martegrafica.com/tajimapisos asi como el codigo mas abajo para que lo chequen. Gracias!!

ESTE ES EL CODIGO DE AJUSTAR IMAGEN A RESOLUCION

[ as ]
// this tells Flash NOT to allow the assets to be scaled
Stage.scaleMode = "noScale";
Stage.align = "TL";



// need to set up a listener object to say when the stage is resized.
var stageListener:Object = new Object();
Stage.addListener(stageListener);

setBackground();

// called when the stage is resized
stageListener.onResize = function() {
setBackground();
}


function setBackground() {

// determine middle
var middleX = Stage.width/-30;
var middleY = Stage.height/-3.07;

// reposition the bkgd to middle
back1._x = middleX;
back1._y = middleY;

// scale background to fit width and height
back1._width = Stage.width;
back1._height = Stage.height;

// see if it grew bigger horizontally or vertically and adjust other to match
// to maintain aspect ratio
back1._xscale > back1._yscale ? back1._yscale = back1._xscale : back1._xscale = back1._yscale;

}
[ /as ]

[ as ]

ESTE ES EL CODIGO DE LOS BOTONES FADE IN Y FADE OUT


on (rollOver) {
mc_animado.onEnterFrame = function() {
if (this._currentframe != 20) {
this.nextFrame();
} else {
this.stop();
delete this["onEnterFrame"];
}
};
}
on (rollOut) {
mc_animado.onEnterFrame = function () {
if (this._currentframe != 1) {
this.prevFrame();
}
else {
this.stop();
delete this["onEnterFrame"];
}
};

}
on(release) {
_root.gotoAndPlay("inicio1");
}
[ /as ]



asi salisarg? perdon pero nunca habia subido codigo como tu dices, lo siento

Por alexstorm

45 de clabLevel



Genero:Masculino  

firefox
Citar            
MensajeEscrito el 29 Oct 2008 06:21 pm
Dejaste espacio entre la llave y las letras as ... y mira como quedó ;)

Jorge

Por solisarg

BOFH

13669 de clabLevel

4 tutoriales
5 articulos

Genero:Masculino   Bastard Operators From Hell Premio_Secretos

Argentina

firefox
Citar            
MensajeEscrito el 29 Oct 2008 06:27 pm
Que tal pues raza! pues aqui dandole machin al flash ni modo no ay de otra es el pan de cada dia jeje. Tengo aqui un problemita ya que por fin me salio el comando de ajustar imagen a pantalla y swf a resolucion de ventana estoy mas que feliz Amor pero por desgracia me di cuenta que al momento de quererlo aplicar dentro de un boton de fade in y fade out la imagen no funciona en el MC y solo se pone asi sin efecto como los otros que vienen abajo. Les dejo el link www.martegrafica.com/tajimapisos asi como el codigo mas abajo para que lo chequen. Gracias!!

ESTE ES EL CODIGO DE AJUSTAR IMAGEN A RESOLUCION

Código :

// this tells Flash NOT to allow the assets to be scaled
Stage.scaleMode = "noScale";
Stage.align = "TL";



// need to set up a listener object to say when the stage is resized.
var stageListener:Object = new Object();
Stage.addListener(stageListener);

setBackground();

// called when the stage is resized
stageListener.onResize = function() {
setBackground();
}


function setBackground() {

// determine middle
var middleX = Stage.width/-30;
var middleY = Stage.height/-3.07;

// reposition the bkgd to middle
back1._x = middleX;
back1._y = middleY;

// scale background to fit width and height
back1._width = Stage.width;
back1._height = Stage.height;

// see if it grew bigger horizontally or vertically and adjust other to match
// to maintain aspect ratio
back1._xscale > back1._yscale ? back1._yscale = back1._xscale : back1._xscale = back1._yscale;

}




ESTE ES EL CODIGO DE LOS BOTONES FADE IN Y FADE OUT



Código :

on (rollOver) {
mc_animado.onEnterFrame = function() {
if (this._currentframe != 20) {
this.nextFrame();
} else {
this.stop();
delete this["onEnterFrame"];
}
};
}
on (rollOut) {
mc_animado.onEnterFrame = function () {
if (this._currentframe != 1) {
this.prevFrame();
}
else {
this.stop();
delete this["onEnterFrame"];
}
};

}
on(release) {
_root.gotoAndPlay("inicio1");
}

Por alexstorm

45 de clabLevel



Genero:Masculino  

firefox
Citar            
MensajeEscrito el 29 Oct 2008 06:28 pm
ahora si me pueden ayudar? :(

Por alexstorm

45 de clabLevel



Genero:Masculino  

firefox
Citar            
MensajeEscrito el 29 Oct 2008 08:07 pm
mmm genial solo me contestan los temas para andarme corrijiendo :S

Por alexstorm

45 de clabLevel



Genero:Masculino  

firefox
Citar            
MensajeEscrito el 29 Oct 2008 08:08 pm
Te quejas mucho ¿no te parece? Un foro no es el mejor sitio para andarse con prisas ¬¬

Por The Fricky!

Presidente

6168 de clabLevel

3 tutoriales
8 articulos

Genero:Masculino   Bastard Operators From Hell Héroes

Piccola Venezia...

firefox
Citar            
MensajeEscrito el 29 Oct 2008 08:10 pm
Mmm ... te veo un poco quejoso ... quizás tengas que esperar hasta mañana

Jorge

Por solisarg

BOFH

13669 de clabLevel

4 tutoriales
5 articulos

Genero:Masculino   Bastard Operators From Hell Premio_Secretos

Argentina

firefox
Citar            
MensajeEscrito el 29 Oct 2008 08:17 pm
No entiendo bien qué es lo que quieres decir, además el sitio se tardaba mucho en cargar, así que no pude verlo ¿dices que lso botones no hacen fade, que la imagen no lo hace? Tómate tu tiempo y explícalo con calma.

Por The Fricky!

Presidente

6168 de clabLevel

3 tutoriales
8 articulos

Genero:Masculino   Bastard Operators From Hell Héroes

Piccola Venezia...

firefox
Citar            
MensajeEscrito el 29 Oct 2008 09:36 pm
jeje sorry guys lo hice a drede para que me pelaran ay disculpas. Mira lo que pasa es que tengo el swf que genere muy pesado y mejor emplee un codigo (el primer codigo que postee) para hacer ajustable la imagen de fondo con la resolucion de la pantalla o depende como hagas grande la ventana del explorador, porque lo que tenia antes era unas imagenes muy grandes que solo se iban mostrando lo que fueras haciendo la ventana mas grande o mas chica. Ok hasta alli es el primer paso.

El segundo, es que tengo unos botones en fade in y fade out que funcionaban con el segundo paso mencionado arriba que es el de la imagen gigantesca mostrandola segun lo grande que tengas la ventana (alli les puse el codigo, es el segundo). Y el problema que tengo es que quiero emplear el primer proceso que les comento en los botones de fade in y fade out pero no me aparece el efecto, solo me aparece estatica la imagen de fondo que quiero que cambiar cuando le dan fade in y fade out. El primer boton es claro ejemplo de que no me da el efecto pero en los otros si porque tienen el segundo metodo. Espero ser claro y muchisimas gracias por la atencion guys.

Alex

Por alexstorm

45 de clabLevel



Genero:Masculino  

firefox

 

Cristalab BabyBlue v4 + V4 © 2011 Cristalab
Powered by ClabEngines v4, HTML5, love and ponies.