<mx:component . creates its own scope.  To reach the parent scope, use
outerDocument.

 

Tracy Spratt,

Lariat Services, development services available

  _____  

From: [email protected] [mailto:[email protected]] On
Behalf Of Ben Densmore
Sent: Monday, June 15, 2009 12:45 AM
To: [email protected]
Subject: [flexcoders] Issue with TileList

 






I am using a TileList to pull in some profile info for an app I'm building.
Inside the TileList I have a few Text Components that I'm trying to add a
click event to. For some reason when I build the project I get an error that
the method I'm trying to call does not exist, even though it does.

Is it not possible to call a method on a component inside a TileList other
than using the itemClick event on the TileList itself?

The TileList is below.

Thanks,
Ben

    <mx:TileList id="searchList"
                 dataProvider="{searchAryCol}"
                 paddingTop="25" left="10" borderStyle="none" 
                 allowMultipleSelection="false" direction="horizontal"
                 top="56" right="10"
                 selectable="false" verticalScrollPolicy="auto" height="404"
columnCount="1">
        <mx:itemRenderer>
            <mx:Component>
                <mx:VBox width="90%" height="100%"
                    paddingRight="5" paddingLeft="5"
                    horizontalAlign="center">

                    <mx:HBox width="100%" height="100%">
                        <mx:Image
                        height="200" width="100"
 
source="/profile_pics/{data.ProfileID}/{data.userPicture}" />
                        <mx:VBox width="100%" height="100%">
                        <mx:Label  id="friendName" text="{data.FirstName}
{data.LastName}"/>
                        <mx:Label  id="friendLocation"
text="{data.ProfileCity}, {data.ProfileState}" />
                        <mx:Label  id="friendStatus" text="{data.status}" />
                        </mx:VBox>
                         
                         <mx:VBox verticalGap="0.1">
                          <mx:Text x="500" y="0" text="Add as Friend"
                                 useHandCursor="true" buttonMode="true" 
                                 mouseChildren="false" id="txtAddFriend"
                                  click="addFriend();"  />
                          <mx:HRule />    
                          <mx:Text x="500" y="5" text="Send a Message"  />
                          <mx:HRule />
                          <mx:Text x="500" y="10" text="View Profile" />
                          <mx:HRule />
                        </mx:VBox>
                    </mx:HBox>
                    
                 
                </mx:VBox>
            </mx:Component>
        </mx:itemRenderer>
    </mx:TileList>



Reply via email to