Comunidad de diseño web y desarrollo en internet online

Problemas con llamada a funcion dentro de un M controller2

Citar            
MensajeEscrito el 06 Ene 2010 04:45 pm
Tengo un problema si me pueden ayudar, anduve buscando pero no hay nada parecido en el foro.

Tengo un swf externo en AS2, lo llamo con un Media Controller, el mismo es una galería con efecto tween, anda perfecto, tiene dos botones que controlan el carrusel o como se llame, para adelante y para atrás.

tiene una función function change_item(command)

y utiliza estos parametros para los botones.

Código ActionScript :

fm_previous.onRelease = function()
{
change_item("previous");
}
fm_next.onRelease = function()
{
change_item("next");
}



EL PROBLEMA ES

de afuera del MController "contenedor", quiero replicar estos botones pero no puedo, he probado varias formas, porque la función esta dentro de un movie clip, que tiene otro movie clip.


Código ActionScript :

on (release) {

contenedor.loadMovie ("flashmo_107_slider.swf", _root.flashmo_item_list.fm_next)

}



Código ActionScript :

on (release) {

contenedor.loadMovie ("flashmo_107_slider.swf", _root.flashmo_slider.flashmo_item_list.fm_next) //son 2 movie clip uno dentro de otro

}



tambien


Código ActionScript :

on (release) {

_root.flashmo_item_list.loadMovie ("flashmo_107_slider.swf")
_root.onEnterFrame = function () {
if(_root.flashmo_item_list.fm_next){
_root.flashmo_item_list.fm_next(this.id);
delete(this.onEnterFrame);
}
}
}



ALGUIEN ME PUEDE AYUDAR

Por narq

4 de clabLevel



 

firefox
Citar            
MensajeEscrito el 07 Ene 2010 02:50 am
¿Que es lo que sucede exactamente cuando lo cargas? ¿Que te pasa?

Saludos, Hernán . -

Por Hernán

BOFH

6148 de clabLevel

19 tutoriales
23 articulos

Genero:Masculino   REC Desarrollador de GAIA

Marketing & IT

firefox
Citar            
MensajeEscrito el 07 Ene 2010 01:46 pm
Gracias por contestar hernán, lo único que hace es solo cargar la pelicula, no levanta la función

Por narq

4 de clabLevel



 

firefox
Citar            
MensajeEscrito el 08 Ene 2010 01:47 am
¿Que función? Sino tienes ninguna función definida.

Saludos, Hernán . -

Por Hernán

BOFH

6148 de clabLevel

19 tutoriales
23 articulos

Genero:Masculino   REC Desarrollador de GAIA

Marketing & IT

firefox
Citar            
MensajeEscrito el 12 Ene 2010 01:37 pm
La función de la que te he hablado es esta, y está dentro de un swf externo incrustado en un media controller, y no puedo llegar a ejecutarla desde afuera, esta dentro de 2 movie clips tambien:

function change_item(command)
{
fm_previous.enabled = fm_next.enabled = false;
old_number = current;

if( command == "previous" )
current--;
else
current++;

if( current < 0 )
current = total - 1;
if( current >= total )
current = 0;

old_item = this["fm_item" + old_number];
new_item = this["fm_item" + current];

if( command == "previous" )
{
var fm_tween = new Tween(old_item, "_x", Strong.easeInOut, 0, 722, tween_duration, true);
new Tween(new_item, "_x", Strong.easeInOut, -722, 0, tween_duration, true);
}
else
{
var fm_tween = new Tween(old_item, "_x", Strong.easeInOut, 0, -722, tween_duration, true);
new Tween(new_item, "_x", Strong.easeInOut, 722, -0, tween_duration, true);
}
fm_tween.onMotionFinished = function()
{
fm_previous.enabled = fm_next.enabled = true;
}
}

Por narq

4 de clabLevel



 

firefox
Citar            
MensajeEscrito el 12 Ene 2010 01:49 pm
lo que te envie anteriormente son 2 botones de control, que ejecutan la función desde dentro del movie clip.

gracias nicolás

Por narq

4 de clabLevel



 

firefox
Citar            
MensajeEscrito el 13 Ene 2010 04:33 pm
Logre llamar la función, pero aún no puedo controlarla, es decir me queda colgada el movimiento

on (release) {

this.onEnterFrame = function() {
contenedor.flashmo_slider.flashmo_item_list.change_item(command);
}
}


no logro aún poder mover exactamente el efecto tween a las cordenadas que yo quiero


probe con algo asi pero no logro establecer la cadena

on (release) {

this.onEnterFrame = function() {
contenedor.flashmo_slider.flashmo_item_list.change_item()
{
change_item("next");
}
}
}

soy novato gracias

Por narq

4 de clabLevel



 

firefox

 

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