Critter’s Code

This is a picture of a bridge and a city. I like bridges and cities. They make me smile.

Jan-15-2008

I need AIR / Actionscript assistance

I have a TileList in my AIR application. Previously, I was including the itemRender directly in the tag like:

<mx:TileList itemRenderer="Timeline" >
<mx:itemRenderer>
   <mx:Component>
    <mx:HBox verticalGap="0" backgroundColor="{outerDocument.checkUser(data.publisher.value)}">
       <mx:Image click="outerDocument.PlaySeesmicVideo(data.flv.value,data.videoUri.value)" />
       <mx:VBox width="100%" height="100%" verticalGap="0" verticalScrollPolicy="off">
       <mx:Label buttonMode="true" width="100%" textAlign="left" />
       <mx:Label text="({data.language.value})" fontSize="9" />
       <mx:Text fontSize="10" text="{outerDocument.StripRE(data.title.value)}"  />
       </mx:VBox>
     </mx:HBox>
   </mx:Component>
</mx:itemRenderer>
</mx:TileList>

I need to move the itemRenderer into it’s own component, but as soon as I do that I get errors on my functions that are fired from within the component. "outerDocument" no longer works.

So, my question, is, how do I reference a function in "main.mxml" from "timeline.mxml" ?

VN:F [1.7.5_995]
Rating: 0.0/10 (0 votes cast)
VN:F [1.7.5_995]
Rating: 0 (from 0 votes)
Posted under AIR, ActionScript
  • Denis
    Did you find a solution?
  • I did, but it's been ages. I could probably dig up the code if it is something you need assistance with... ?
  • I remember I have had similar problem and I used parentDocument in the itemRenderer to access functions in the "main.mxml"
  • Aye. Now that you mention it... that does sound familiar.. and is possibly what I used to sort the issue.
blog comments powered by Disqus