Comunidad de diseño web y desarrollo en internet online

CLIPS (FLASH FLEX) COMUNICACION CON FUNCIONES

Citar            
MensajeEscrito el 21 Dic 2009 06:03 pm
Holas Espero me resuelvan esta duda porfa

private function handlerClick(event:MouseEvent)
:void{
trace(MovieClip(this.parent).work());
}

<mx:Button x="362" y="206" label="Button" width="121" height="26" id="button"/>

BOTON CON ACCION QUE LLAMA A FUNCION DE OBJETO PADRE

Luego he creado un Archivo FLA y agrege el componente con loader.contentLoaderInfo y todo bien esta ahi ..
y cree una funcion en la clase de FLA

private function init(event:Event)
:void{
trace("goo");
addChild(new LoaderSWF("componentsLaserDisc/menu.swf"));
}
public function work()
:void{
trace("clicked");
}

Cuando presiono en el boton que esta en Movie de FLEx

me sale este error
ReferenceError: Error #1069: Property work not found on _menu_mx_managers_SystemManager and there is no default value.
at menu/handlerClick()[C:\Documents and Settings\Administrator\My Documents\Flex Builder 3\LaserDiscLib\src\menu.mxml:18]

Ahora pense que el contenedor al que estaba llamando no era el FLA asi que hice esto
trace(MovieClip(this.parent).MovieClip(this.parent).work());

y dice que no se encuentra la referencia
que estoy haciendo mal solo quiero invocar una funcion desde el objeto Flex cargado dentro del FLA

Gracias Agradecere su ayuda

Por redhat

16 de clabLevel



 

firefox
Citar            
MensajeEscrito el 21 Dic 2009 06:19 pm

Por solisarg

BOFH

13669 de clabLevel

4 tutoriales
5 articulos

Genero:Masculino   Bastard Operators From Hell Premio_Secretos

Argentina

firefox
Citar            
MensajeEscrito el 21 Dic 2009 08:49 pm
Great !!!!!
trace(MovieClip(this.parent.parent.parent.parent).work());
gracias gracias ! :cool:

Por redhat

16 de clabLevel



 

firefox

 

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