Wow, you are a life saver, thank you so much!!!!!!!!! -Hoi
--- In [email protected], Sherif Abdou <[EMAIL PROTECTED]> wrote: > > All Right so here is what you need to do > > <?xml version="1.0" encoding="utf-8"?> > <mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" width="900" height="900"> > <mx:Model id="products"> > <node> > <bottle> > <brand>10 Cane</brand> > <type>Rum</type> > <subtype>White</subtype> > <description> the description</description> > <image>assets/ pictures/ 10cane_rum. png</image> > <tier>1</tier> > </bottle> > </node> > </mx:Model> > <mx:Script> > <![CDATA[ > import mx.managers.PopUpManager; > import mx.core.IFlexDisplayObject; > public var popUpWindow:IFlexDisplayObject; > public function showPopUp(): void > { > popUpWindow = PopUpManager.createPopUp( this, TileListItemRenderer, true); > //The Data Passed > popUpWindow["data"]=List.selectedItem; > } > ]]> > </mx:Script> > <mx:Panel > id="mainPanel1" > width="700" height="100% " > layout="horizontal" > headerHeight= "0" borderStyle= "solid" > shadowDistance= "0" borderThickness= "1" cornerRadius= "0" alpha="1" > borderColor= "#000000" > > <mx:TileList > id="List" > width="100%" height="100% " > rowHeight="200" columnWidth= "85" > verticalAlign= "middle" horizontalCenter= "5" > rollOverColor= "#000000" selectionColor= "#FFFFFF" > dataProvider= "{products.bottle}" > <!--You Can do The Item Renderer Still here but that is only for the List for Formatting the Way it looks--> > itemClick="showPopUp();" > /> > </mx:Panel> > </mx:WindowedApplication> > <?xml version="1.0"?> > <mx:TitleWindow > xmlns:mx="http://www.adobe.com/2006/mxml" > creationComplete= "popUpCenter( );" showCloseButton= "true" > close="PopUpManager .removePopUp( this)" > width="200" height="450" > title="{data.brand}"> > <mx:Script> > <![CDATA[ > /**************************************************************************************************************************************** > * > * Remove All the SelectedItem stuff so it becomes staright data.propertyName > * **************************************************************************************************************************************/ > import mx.managers. PopUpManager; > private function popUpCenter( ):void > { > PopUpManager. centerPopUp( this); > } > ]]> > </mx:Script> > <mx:VBox width="100%" verticalCenter= "0"> > </mx:VBox> > </mx:TitleWindow> > > > > ----- Original Message ---- > From: Ben Dover <[EMAIL PROTECTED]> > To: [email protected] > Sent: Saturday, February 9, 2008 5:44:03 PM > Subject: [flexcoders] Re: Getting values from a tileList to appear on a popup > > My xml file looks like this: > > <bottle> > <brand>10 Cane</brand> > <type>Rum</type> > <subtype>White< /subtype> > <description> the description< /description> > <image>assets/ pictures/ 10cane_rum. png</image> > <tier>1</tier> > </bottle> > > Basically, i have a lot of <bottle> tags with all their relevant > information stored in the same manner, and the image appears on the > tileList, so when I click on each image I want it to open up a popup > with the description etc. > > --- In [EMAIL PROTECTED] ups.com, Sherif Abdou <sherif626@ ..> wrote: > > > > what does ur xml look like > > > > > > ----- Original Message ---- > > From: Ben Dover <sonicboy3@ ..> > > To: [EMAIL PROTECTED] ups.com > > Sent: Saturday, February 9, 2008 12:50:56 AM > > Subject: [flexcoders] Getting values from a tileList to appear on a > popup > > > > Hello, I'm very new to flex, and I'm trying to develop an application > > that acts lik an online store. In my program I am laying out my items > > using tileList, and what I want it to do is that when I click each > > object in the tileList, I want a pop up window to show up with > > information about the product. > > > > I'm having trouble understanding how to bind the selectedItem and > > passing values from that to the popup window, pointing me in the right > > direction or some form of an example would be extremely helpful. > > > > Thanks in advance!! > > > > -Hoi > > > > -- > > > > Code for my main application "Test.mxml": > > > > <mx:Application > > xmlns:mx="http://www.adobe. com/2006/ mxml" > > horizontalAlign= "center" verticalAlign= "middle" > > width="960" height="540" > > layout="absolute" > > backgroundColor= "white" > > > > > > > <mx:Model id="products" source="products. xml"/> > > > > <mx:Script> > > <![CDATA[ > > > > import mx.managers. PopUpManager; > > import mx.core.IFlexDispla yObject; > > > > public var popUpWindow: IFlexDisplayObje ct; > > > > public function showPopUp(): void > > { > > popUpWindow = PopUpManager. createPopUp( this, ViewWindow, true); > > } > > > > ]]> > > </mx:Script> > > > > <mx:Panel > > id="mainPanel1" > > width="700" height="100% " > > layout="horizontal" > > headerHeight= "0" borderStyle= "solid" > > shadowDistance= "0" borderThickness= "1" cornerRadius= "0" alpha="1" > > borderColor= "#000000" > > > > > > > <mx:TileList > > id="List" > > > > width="100%" height="100% " > > rowHeight="200" columnWidth= "85" > > verticalAlign= "middle" horizontalCenter= "5" > > rollOverColor= "#000000" selectionColor= "#FFFFFF" > > > > dataProvider= "{products. bottle}" > > itemRenderer= "TileListItemRen derer" > > itemClick="showPopU p();" > > /> > > > > </mx:Panel> > > > > </mx:Application> > > > > Code for my pop up window "ViewWindow. mxml": > > > > <?xml version="1.0" ?> > > <mx:TitleWindow > > xmlns:mx="http://www.adobe. com/2006/ mxml" > > creationComplete= "popUpCenter( );" showCloseButton= "true" > > close="PopUpManager .removePopUp( this)" > > width="800" height="450" > > title="{data. selectedItem. brand}"> > > <mx:Script> > > <![CDATA[ > > import mx.managers. PopUpManager; > > > > private function popUpCenter( ):void > > { > > PopUpManager. centerPopUp( this); > > } > > ]]> > > </mx:Script> > > > > <mx:VBox width="100%" verticalCenter= "0"> > > <mx:Image source="{data. selectedItem. thumb}"/> > > </mx:VBox> > > > > > > </mx:TitleWindow> > > > > > > > > > > > > > ____________ _________ _________ _________ _________ _________ _ > > Be a better friend, newshound, and > > know-it-all with Yahoo! Mobile. Try it now. > http://mobile. yahoo.com/ ;_ylt=Ahu06i62sR 8HDtDypao8Wcj9tA cJ > > > > > > > > ____________________________________________________________________________________ > Be a better friend, newshound, and > know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ >

