I don't know what's wrong it worked fine in the flex 1.5. My httpservice is placed on the same machine as the application and i'm accessing in by the local ip adress. But when trying to access the application from internet nothing is working no data is loaded and it tryes to load it from the local ip adress why's that. I paste here my source code. can anybody please help me?
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" horizontalAlign="center" verticalAlign="middle" backgroundGradientColors="[#000000, #000000]" width="100%" height="100%" creationComplete="movieService.send()" viewSourceURL="srcview/index.html" xmlns:ns1="*"> <mx:HTTPService id="movieService" url="http://192.168.25.200/PHP/katalog.php" useProxy="false" result="srv_results(event)"/> <mx:Style source="katalog2main.css"/> <mx:Script> <![CDATA[ import mx.rpc.events.ResultEvent; import mx.collections.ArrayCollection; import mx.events.ItemClickEvent; import mx.controls.Alert; import mx.events.CloseEvent; import flash.events.Event; import flash.net.URLRequest; public function srv_results(event:ResultEvent):void { //Alert.show(ObjectUtil.toString (event.result) ); movieCollection = event.result.helakatalog.katalog as ArrayCollection; movieCollection.filterFunction=processFilter; } [Bindable] private var movieCollection:ArrayCollection; [Bindable] public var selectedItem:Object; // Filter function public function processFilter (item:Object):Boolean { var result:Boolean=false; if (!item.title.length || item.title.toUpperCase().indexOf (filterInput.text.toUpperCase()) >= 0) if (!item.genres.length || item.genres.toUpperCase().indexOf (genresInput.text.toUpperCase()) >= 0) result=true; return result; } private function textChange():void { movieCollection.refresh(); } public var u:URLRequest; // Event listener to open URL using the navigateToURL() method. private function dgMovieListClick (eventObj:Event):void { u = new URLRequest ("http://192.168.25.200/Movies/" + dgMovieList.selectedItem.link); navigateToURL(u); Alert.show("Nerladdnings sida öppnad...", "Nerladdnings sidan", Alert.OK); } // Event listener to open URL using the navigateToURL() method. private function dgTileListClick (eventObj:Event):void { u = new URLRequest ("http://192.168.25.200/Movies/" + tilelist1.selectedItem.link); navigateToURL(u); Alert.show("Nerladdnings sida öppnad...", "Nerladdnings sidan", Alert.OK); } ]]> </mx:Script> <!-- An ArrayCollection with an array of objects. --> <mx:ArrayCollection id="genres"> <mx:Array> <mx:Object label="" data=""/> <mx:Object label="Action" data="Action"/> <mx:Object label="Animerat" data="Animerat"/> <mx:Object label="Drama" data="Drama"/> <mx:Object label="Komedi" data="Komedi"/> <mx:Object label="Thriller" data="Thriller"/> </mx:Array> </mx:ArrayCollection> <mx:states> <mx:State name="Grid"> <mx:RemoveChild target="{tilelist1}"/> <mx:RemoveChild target="{dockedBar}"/> <mx:AddChild relativeTo="{mainVbox}" position="lastChild" target="{dockedBar}"/> <mx:SetEventHandler target="{stchange}" name="click" handler="currentState=''"/> <mx:AddChild relativeTo="{tilecanvas}" position="lastChild"> <mx:DataGrid id="dgMovieList" width="100%" height="100%" dataProvider="{movieCollection}" doubleClickEnabled="true" itemDoubleClick="dgMovieListClick(event);" editable="false" borderStyle="none" y="0"> <mx:columns> <mx:DataGridColumn headerText="Titel" dataField="title"/> <mx:DataGridColumn headerText="Kategori" dataField="genres"/> <mx:DataGridColumn headerText="År" dataField="year"/> <mx:DataGridColumn headerText="Utgivare" dataField="publisher"/> </mx:columns> </mx:DataGrid> </mx:AddChild> </mx:State> </mx:states> <!-- Define the effects for the transitions between states -- > <mx:transitions> <!-- Define the transition from the base state to the Grid state.--> <mx:Transition id="toGrid" fromState="*" toState="Grid"> <mx:Sequence target="{tilecanvas}" > <mx:Parallel target="{tilecanvas}"> <mx:Fade alphaFrom="0" alphaTo="1" duration="1500"/> <mx:Move yFrom="1500" yBy="-1500" duration="1000"/> </mx:Parallel> </mx:Sequence> </mx:Transition> <!-- Define the transition from the Grid state to the base state.--> <mx:Transition id="toDefault" fromState="Grid" toState="*"> <mx:Sequence target="{tilecanvas}" > <mx:Parallel target="{tilecanvas}"> <mx:Fade alphaFrom="0" alphaTo="1" duration="1500"/> <mx:Move yFrom="1500" yBy="-1500" duration="1000"/> </mx:Parallel> </mx:Sequence> </mx:Transition> </mx:transitions> <!-- Transition effects END --> <mx:VBox width="85%" height="100%" verticalCenter="20" id="mainVbox" horizontalCenter="0" horizontalAlign="center" verticalAlign="middle"> <mx:Canvas width="100%" height="80%" id="tilecanvas" > <mx:TileList id="tilelist1" width="100%" height="100%" itemRenderer="thumbnail" dataProvider="{movieCollection}" horizontalScrollPolicy="off" borderStyle="none" top="19" doubleClickEnabled="true" itemDoubleClick="dgTileListClick(event);" allowMultipleSelection="false" horizontalCenter="0"/> </mx:Canvas> <mx:ApplicationControlBar id="dockedBar" dock="true" width="100%"> <mx:HBox horizontalAlign="right" paddingBottom="5" paddingTop="5"> <mx:Image source="assets/zoom.png" autoLoad="true" height="100%" verticalAlign="middle" scaleContent="false"/> <mx:TextInput id="filterInput" text="" change="textChange ()" width="166" toolTip="Skriv.."/> <mx:Spacer width="100%"/> <mx:Image source="assets/color_swatch.png" autoLoad="true" height="100%" verticalAlign="middle" scaleContent="false"/> <mx:Text text="Kategori" color="#ffffff" fontSize="12" fontFamily="Arial" fontWeight="bold" textAlign="left"/> <mx:ComboBox id="genresInput" dataProvider="{genres}" enabled="true" color="#ffffff" change="textChange()"/> </mx:HBox> <mx:HBox horizontalAlign="right" width="100%" paddingBottom="5" paddingTop="5"> <mx:LinkButton id="intlink" label="Download" /> <mx:LinkButton id="stchange" label="Change State" click="currentState='Grid'"/> <mx:Text text="FilmKatalog Ver.2 BETA" color="#ffffff" fontWeight="bold" fontSize="12" fontFamily="Arial"/> </mx:HBox> </mx:ApplicationControlBar> </mx:VBox> </mx:Application> -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

