Olá, pessoal

Tenho duas applications, Fotos.mxml e Galeria.mxml. Galeria só tem um state
que chama Fotos.mxml

O fotos.mxml sozinho roda  mas como um estado de Galeria.mxml , da um erro
de que falta um método (que existe em fotos.mxml). Ambas aplicações são
derivadas do FancyGallery (aplicação opensource que eu baixei da internet).
Segue os códigos e o erro

 

ReferenceError: Error #1069: Property resetter not found on Galeria and
there is no default value.

                at imagePop/showEffect()

                at imagePop/__panel_mouseOver()

 

FOTOS.MXML

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";
creationComplete="init()" pageTitle="Fancy Gallery"
horizontalScrollPolicy="off" verticalScrollPolicy="off" 

                xmlns:reflector="com.rictus.reflector.*" layout="absolute"
xmlns = "*">

 

                <mx:Script>

                               <![CDATA[

                                               import
mx.collections.ArrayCollection;

                                               import mx.controls.Alert; 

                                               import
flash.net.NetConnection;  

                                               import
flash.net.ObjectEncoding; 

                                               import flash.net.Responder;

                

                                               [Bindable]

                                               public var
dataProvider:ArrayCollection;

                                               [Bindable]

                                               public var errorMsg:String;

                                               [Bindable]

                                               public var dir:String;

                                               private var
conexao:NetConnection;  

                                               import mx.utils.ObjectUtil;

                                               import
flash.events.MouseEvent;

                                               

                                               private var goLeft:Boolean =
false;

                                               private var goRight:Boolean =
false;

                                               

                                               private function init():void
{

                                                               this.conexao
= new NetConnection; 

 
this.conexao.objectEncoding = ObjectEncoding.AMF0;  

 
this.conexao.connect("admin/amfphp/gateway.php");              

                                                               getFotos();

 
createTimer();

                                               }

                                               public function
getResult(result:Array ):void {

                                                               dataProvider
= new ArrayCollection(result as Array);

                                               }

 

                                               public function
onFault(fault:String ):void {

                                                               errorMsg =
fault;

                                                               trace(fault);

                                               }


                                               public function
getFotos():void {

 
conexao.call("galerias.getFotos", new Responder(getResult, onFault), dir);

                                               }


                                               //take the filename and make
it a title

                                               private function
createName(filename:String):String {

                                                               var
myPattern:RegExp = /_/g; 

                                                               var
myString:String = filename.replace(myPattern, ' ');

                                                               var
myarray:Array = myString.split('.');

                                                               

                                                               return
myarray[0];

                                               }

                                               

                                               //make a timer for moving the
gallery left and right

                                               public function
createTimer():void {

                            var myTimer:Timer = new Timer(10);

                            myTimer.addEventListener("timer", timerHandler);

                            myTimer.start();

                        }

                

                                               //does the moving

                        public function timerHandler(event:TimerEvent):void
{

                            if(goLeft){

                                moveRight();

                                }

                                if(goRight){

                                moveLeft();

                                }

                        }

                                               

                                               //move left

                                               private function
moveLeft():void{

                                                               gallery.x =
gallery.x - 10;

                                               }

                                               

                                               //move right

                                               private function
moveRight():void{

                                                               gallery.x =
gallery.x + 10;

                                               } 

                                               

                                               //reset the images to small

                                               public function
resetter(theurl:String):void{

                                                               for (var
i:int = 0; i < imagePops.length; i++){

                                               imagePops[i].myReset();


                                                               }

                                               }


                                               

                                               //handle fault

                                private function
httpfault(event:Object):void{

 
mx.controls.Alert.show(mx.utils.ObjectUtil.toString(event));

                                }

                               ]]>

    </mx:Script>

                

                <mx:HBox id="gallery" verticalAlign="middle" height="100%"
width="100%" horizontalAlign="center">

                               

                               <mx:Repeater id="pageItems"
dataProvider="{dataProvider}">

                               

                                               <imagePop id="imagePops"
imgSource="{pageItems.currentItem.imageURL.toString()}"
imgLink="{pageItems.currentItem.imageLink.toString()}"
imgTip="{createName(pageItems.currentItem.imageTip.toString())}"
imgTitle="{createName(pageItems.currentItem.imageName.toString())}"
maximize="false"/>

                        

                        <mx:Spacer width="10"/>

                        

                               </mx:Repeater>

                               

                </mx:HBox>

                

                <mx:VBox id="leftbox" left="0" top="0" height="100%"
width="25" borderStyle="none" mouseOver="goLeft=true;"
mouseOut="goLeft=false;" verticalAlign="middle">

                               

                               <mx:Spacer height="10"/>

                               

                               <mx:Image source="icons/left.png"/>

 

                </mx:VBox>

                

                <mx:VBox id="rightbox" right="0" top="0" height="100%"
width="25" borderStyle="none" mouseOver="goRight=true;"
mouseOut="goRight=false;" verticalAlign="middle">      

                               

                               <mx:Spacer height="10"/>

                               

                               <mx:Image source="icons/right.png"/>

 

                </mx:VBox>

                

</mx:Application>

 

GALERIA.MXML

<?xml version="1.0" encoding="utf-8"?>

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"; layout="absolute"
currentState="Fotos" xmlns:local="*" >

                <mx:states>

                               <mx:State name="Fotos">

                                               <mx:AddChild>

                                                               <local:Fotos
dir="teste" width="100%" height="100%"/>

                                               </mx:AddChild>

                               </mx:State>

                </mx:states>

                

</mx:Application>

 

 

logosi

André Tapxure Gabriel, Ms.

email:[EMAIL PROTECTED]

msn:[EMAIL PROTECTED]

(62)8405-4960

 


--~--~---------~--~----~------------~-------~--~----~
Recebeu esta mensagem porque está inscrito em Grupo "Mailing List da Comunidade 
Portuguesa de Desenvolvimento de RIAs - www.riapt.org" do Grupos Google.
 Para enviar mensagens para este grupo, envie um email para 
[email protected]
 Para anular a inscrição neste grupo, envie um email para [EMAIL PROTECTED]
 Para mais opções, visite este grupo em 
http://groups.google.com/group/riapt?hl=pt-PT
-~----------~----~----~----~------~----~------~--~---

<<attachment: image001.gif>>

Responder a