13 Replies Latest reply on Sep 1, 2009 6:14 PM by babo_ya

    Simple Task - Syntax Question (how do you pass variables from one component to another component - databinding)?

    DeyBwah Level 1

      Hi all,


      I'm trying to pass some width/height/URLs from a Video Player component to a Social Bookmarking component's embed text input field. (for people to grab and share videos).


      I know this is a simple task, but it's the end of the day and I seem to be having a brain failure... What's the syntax to achieve this? Do I have to import the video player component? These widths/heights/URLs are all being dynamically generated from an XML... should I be pulling it from the XML or just reuse the variables that already exist in the Video Player component?


      Here's my code...


      Video Player:




      public var source:String = "";


      public var autoPlay:Boolean = false;


      public var fullScreenMode:Boolean = false;


      public var clipTag:String = "_movie";


      public var iag_code:String = "";


      public var officialURL:String = "http://www.movies.com/";


      public var referer:String = "unknown";


      public var gID:String;


      public var starterImageURL:String = 'http://www.movies.com/jazzmaster/images/default_starter_image.


      public var oldWidth:Number;


      public var oldHeight:Number;



      Sharing Component:







        <mx:Text text="Embed Code:" paddingTop="1" color="#FFFFFF" fontSize="12"/>

        <mx:TextInput  text="{oldWidth}"/>




      The code above throws an error... "Attempted access of inaccessible property oldWidth through a reference with a static type com:SharingBookmarks."


      Thanks all!