Asgining Xml url in  as3

Hey guys im trying to load some http url from an xml file into an actionscript function..
Its xml gallery i was successfull in loading the pics the description but im stuck at the url....
The XML file is structured this way....
<Node
myURL="images/cow.jpg"
myTitle="Cow"
myDesc=" libero sed dapibus aliquet, quam risus luctus lacus, vitae tincidunt dui diam dictum mauris. Morbi tempor,  Nunc eleifend sapien ut odio pharetra eu aliquet eros fermentum. Proin et nisi vel risus eleifend pulvinar. "
myThumb="images/thumbs/cow_thumb.jpg"
onlinelink="http://vaughntucker.com/exflowers/"
offlinelink="projects/web.swf"
/>
I need to place the on and offline links into a onclick button fuction in flash.
so i imported the xml data it works fine for the title so i used the same code for the url
here it is...
allOnlinelink.push(element .@onlinelink);
        allOfflinelink.push(element .@offlinelink);
the next function pulls the url of the current index
var currentWeb:String = allOnlinelink[currentIndex];
    var currentCD:String = allOfflinelink[currentIndex];
then i create a url request
    var Weblink:URLRequest = new URLRequest(currentWeb);
    var Cdlink:URLRequest = new URLRequest(currentCD);
then i attach it to the onclick function
function WebUrl(event:MouseEvent):void
var req:URLRequest = new URLRequest(currentCD);
navigateToURL(req);
I got error undefined Property currentCDim confused....help

Attached is the entire script if you need it....
thanks...

Similar Messages

  • Loading xml url throws error

    Hello,
    I'm trying to create iphone app.
    When I try to load xml url from desktop emulator it works like a charm.
    But when I debug on the iphone device it throws error.
    Error #2032
    I have setup a crossdomain.xml file but that doesn't fix the issue.
    I have no idea what to do from now?
    I'm using the latest flash builder 4.5.1 and air 2.7 sdk i think.
    Hope someone knows what to do
    Thanks.

    Sorry everyone.
    I pointed to the wrong url.
    I was pointing to my local ip and not external url
    Thanks again for trying to help me.

  • Create an XML object with AS3

    I want to create a basic XML object in AS3, but don't know
    how to do this.
    I first tried creating a string that represented my XML
    elements and their values, but then I don't know how to convert
    this string into an XML object.
    Secondly, I believe there are other ways of creating XML
    objects in AS without doing anything with strings.
    Can somebody please recommend to me a way to do this?
    An XML example to create with AS3 is:

    I've figured out the solution to my problem. For anyone
    interested, see me code below (the xml element names are different,
    but the concept is the same).

  • Xml url - ASAP

    Hi,
    I am trying to pass some parameters to xml url in xml component build. I am not able to see these parameters in bind variables...
    How can i do this?
    Thanks,
    Samir

    Hi
    The Patch Set For 3.0.9.8.1 has been installed. The issue of the Time out error has been minimized but I am still getting it from time to time.
    As per the patchset , two new parameters can be accepted by the Parallel Page Engine :
    minStall and minTimeiout. My questions are as follows :
    1 - It is assumed that these two parameters
    have default values? Isn't it ?
    2 - Shall I need to add entries regarding
    these parameters in the zone.properties
    file or the PPE will take it by default?
    3 - What is the difference between the
    minTimeout and the requestTime
    parameters.
    Regards

  • XML URL Component

    Hi
    I am running Oracle Portal 3.0.9.8 under NT 4.0 Environment Accessing Oracle 8.1.7.1.1.
    The capacity of the server is 512 MB RAM and 750 MHZ.
    I am using the XML component in an effort to access an external content provider (Web site) and capture the required information in XML Format for further processing through the XSL.
    My questions are as follows :
    1 - I am publishing the XML Component as a portlet inside a page. 50% of the time, I am getting the Portlet timeout error and 50% I am getting the required information. I Increase the timeout of the application provider which contains this XML Component from 20 to 30 Second. Even though , I am still getting this "timeout" error. Moreover, I am also checking the Bandwidth of the network to ensure that the response time of the Requested Web site is quite acceptable (< 4 second). Meanwhile, could you please help me in providing hints that helps me To solve this issue.
    2 - In the XML URL , I am mentionning the URL address of the External Web site (Content provider). Unfortunately, a part of this URL address is changing on daily basis. Is there a way , to cature this "part" from a table inside the database. Please advise.
    Thanks in advance for your support
    null

    Hi
    The Patch Set For 3.0.9.8.1 has been installed. The issue of the Time out error has been minimized but I am still getting it from time to time.
    As per the patchset , two new parameters can be accepted by the Parallel Page Engine :
    minStall and minTimeiout. My questions are as follows :
    1 - It is assumed that these two parameters
    have default values? Isn't it ?
    2 - Shall I need to add entries regarding
    these parameters in the zone.properties
    file or the PPE will take it by default?
    3 - What is the difference between the
    minTimeout and the requestTime
    parameters.
    Regards

  • Creating AIR/Web Apps. with XML & E4X using AS3

    Needing tips using AS3 with XML/E4X to make my project work over the server:
    1) Here I'm having trouble trying to create a component with a 'GOOGLE MAP' with the user being able to input their location for directions with once submitting the get directions button that it generates the directions in the datagrid automatically.
    2) Including a 'DATAGRID'  for customers to be able to retain their info in a datagrid that has been updated by office personnel from an 'AIR APPLICATION' with a XML file that holds the customers info
    /**the Component*/
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" xmlns:s="library://ns.adobe.com/flex/spark" width="1400" backgroundColor="#666666" xmlns:mx2="library://ns.adobe.com/flex/mx" creationComplete="initApp(event)">
        <mx:Style source="map_1.css"/>
        <mx:XML id="customer_info.xml" source="Assets/customer_info.xml" />
    <mx:Script>
            <![CDATA[
                /**Google Map Code API:http://code.google.com/apis/maps/documentation/flash/tutorial-flexbuilder.html#DeclaringMa ps_&
                 _http://www.adobe.com/devnet/flex/articles/googlemaps_api.html */
                import com.google.maps.LatLng;
                import com.google.maps.Map;
                import com.google.maps.MapEvent;
                import com.google.maps.MapType;
                private function onMapReady(event:Event):void {
                        this.map.setCenter(new LatLng(31.683952973286058, -97.09904551506042), 14, MapType.NORMAL_MAP_TYPE);
                            click="processForm(event);"
                            private function processForm(event:Event):void { trace(from.text + " " + to.text); }
                [Bindable]
                    public var directionsSteps:ArrayCollection = new ArrayCollection();
                    dataProvider="{directionsSteps}"
                    var directions:Directions = new Directions(); directions.addEventListener(DirectionsEvent.DIRECTIONS_SUCCESS, onDirectionsSuccess);
                    directions.addEventListener(DirectionsEvent.DIRECTIONS_FAILURE, onDirectionsFail);directions.load("from: " + from.text + " to: " + to.text);
                    Alert.show("Status:" + event.directions.status);
                    map.clearOverlays(); var directions:Directions = event.directions; var directionsPolyline:IPolyline = directions.createPolyline(); map.addOverlay(directionsPolyline);
                                var directionsBounds:LatLngBounds = directionsPolyline.getLatLngBounds(); map.setCenter(directionsBounds.getCenter()); map.setZoom(map.getBoundsZoomLevel(directionsBounds));
                                var startLatLng:LatLng = dir.getRoute(0).getStep(0).latLng;
                                var endLatLng:LatLng = dir.getRoute(directions.numRoutes-1).endLatLng; map.addOverlay(new Marker(startLatLng)); map.addOverlay(new Marker(endLatLng));
                    for (var r:Number = 0 ; r < directions.numRoutes; r++ ) { var route:Route = directions.getRoute(r); for (var s:Number = 0 ; s < route.numSteps; s++ )
                    { var step:Step = route.getStep(s); directionsSteps.addItem(step);
                                    directionsSteps.removeAll();
                                    itemClick="onGridClick(event)"
                                    privatefunction onGridClick(event:Event):void { var latLng:LatLng = directionsGrid.selectedItem.latLng;
                                        var opts:InfoWindowOptions = new InfoWindowOptions(); opts.contentHTML = directionsGrid.selectedItem.descriptionHtml; map.openInfoWindow(latLng, opts);
                                        var ServerPath:String = "http://www.sometext.com/";
                                        var ServerPage:String = serverPath + "getCountries";
                                                dataProvider="{directionsSteps}"
                                                var directions:Directions = new Directions(); directions.addEventListener(DirectionsEvent.DIRECTIONS_SUCCESS, onDirectionsSuccess); directions.addEventListener(DirectionsEvent.DIRECTIONS_FAILURE, onDirectionsFail);
                                                directions.load("from: " + from.text + " to: " + to.text);
                                                Alert.show("Status:" + event.directions.status);
                                                map.clearOverlays(); var directions:Directions = event.directions; var directionsPolyline:IPolyline = directions.createPolyline();
                                                map.addOverlay(directionsPolyline);
                                                var directionsBounds:LatLngBounds = directionsPolyline.getLatLngBounds(); map.setCenter(directionsBounds.getCenter());
                                                map.setZoom(map.getBoundsZoomLevel(directionsBounds));
                                                var startLatLng:LatLng = dir.getRoute(0).getStep(0).latLng; var endLatLng:LatLng = dir.getRoute(directions.numRoutes-1).endLatLng; map.addOverlay(new Marker(startLatLng));
                                                map.addOverlay(new Marker(endLatLng));
                                                for (var r:Number = 0 ; r < directions.numRoutes; r++ ) { var route:Route = directions.getRoute(r); for (var s:Number = 0 ; s < route.numSteps; s++ )
                                                { var step:Step = route.getStep(s); directionsSteps.addItem(step); } }
                                                directionsSteps.removeAll();
                                                itemClick="onGridClick(event)"
                        import flash.events.IOErrorEvent;
                        import flash.events.SecurityErrorEvent;
                                    var sender:URLLoader;
                                    var sendPage:URLRequest;
                                    var sendVars:URLVariables;
                                         initApp;
                                        function initApp:void {
                                    var ServerPath:String = "http://localhost/silverfoxcc/";
                                    var url:String = serverPath + "login.aspx";
                                    sender = new URLLoader();
                                    sendPage = new URLRequest(url);
                                    sendPage.method = URLRequest.POST;
                                    sendvars = new URLVariables();
                                    SUBMIT.btn.addEventListener(MouseEvent.CLICK, clickHandler);
                                    sender.addEventListener(Event.COMPLETE, completeHandler);
                                    sender.addEventListener(IOErrorEvent.SECURITY_ERROR, securityErrorhandler);
                                                function clickhandler(e:MouseEvent:void{
                                                    var suppSUBMIT:String = username_txt.text;
                                                    var suppRESET:String = reset_txt.text;
                                                    if (suppSUBMIT.length > 0 && suppRESET.length > 0) {
                                                        message_txt.text = "";
                                                        sendVars.submit = suppSUBMIT;
                                                        sendVars.reset = suppRESET;
                                                        sendPage.data = sendVars;
                                                        sender.load(sendPage);
                                                    else{
                                                        message_txt.text ="You must enter a last name and customer identification before clicking the submit button."
                                                  function completeHandler(e:Event):void{
                                                      var xmlResponse:XML = XML(e.target.data;
                                                          var userMessage:String;
                                                          if (xmlResponse.text().toString() == "true") {
                                                              userMessage = "Congratulations, information is retrieved"'';
                                                          else {
                                                              usermessage = "Information to be retrieved failed. Please try again";
                                                                              message_txt.text =userMessage;
                                                                      function ioErrorHandler(e:IOErrorEvent):void{
                                                                          message_txt.text = e.text;
                                                                      function securityErrorHandler(e:SecurityErrorEvent):void {
                                                                          message_txt.text = e.text;
                                                             /**Foundation for Ed: XML & E4X-Chapter 9: COMMUNICATION WITH THE SERVER*/
                                                              import mx.events.FlexEvent;
                                                              import xmlUtilities.XMLLoader;
                                                              import flash.events.IOErrorEvent;
                                                              import flash.events.SecurityErrorEvent
                                                              private var serverPath:String = "http://localhost/FOE/";
                                                              private function initApp(e:FlexEvent):void {
                                                                  myXMLLoader = new XMLLoader();
                                                                  myXMLLoader.addEventListener(Event.COMPLETE, completeHandler);
                                                                  myXMLLoader.addEventListener(IOErrorEvent.IO_Error, IOErrorHandler);
                                                                  SUBMIT.btn.addEventListener(MouseEvent.CLICK, clickHandler);
                                                                          private function completeHandler(e:Event):void{
                                                                              var userMessage:String;
                                                                              var response:String =myXMLLoader.response().toString();
                                                                              if (response:String = myXMLLoader.response().toString();
                                                                                  if (response == true"){
                                                                                         usermessage = "Congratualtions. You were successful";
                                                                                              else{
                                                                                            userMessage = Login failed. Please try again";
                                                                                      message_txt.text = userMessage;
                                                                                  private function clickHandler(e:MouseEvent):void{
                                                                                      var SUBMIT:String = submit_txt.text;
                                                                                      var RESET:String = reset_txt.text;
                                                                                      vars myVars:URLVariables = new URLVariables();
                                                                                      if (username.length > 0 && password.length > 0) {
                                                                                          myVars.SUBMIT = submit;
                                                                                          myVars.CUSTMER ID = customerid;
                                                                                          myXMLLOADER.loafxml("login.aspx, myVars);
                                                                                            else {
                                                                                             message_txt.text = "You must enter a last name and customer id before clicking the submit button"
                                                                                  private function IOErrorHandler(e:IOErrorEvent):void{
                                                                                      message_txt.text = e.text;
                                                                                  private function securityErrorHandler(e:SecurityErrorEvent):void{
                                                                                      message_txt.text = e.text;
                                                                            /**Foundation for Ed: XML & E4X-Chapter 8: MODIFYING XML CONTENT WITH ACTIONSCRIPT 3.0*/
                                                                                import mx.events.FlexEvent;
                                                                                import mx.events.ListEvent;
                                                                                import mx.collections.XMLListCollection;
                                                                                import xmlUtilities.MyXMLLoaderHelper;
                                                                                import mx.events.FlexEvent;
                                                                                import mx.events.DataGridEvent;
                                                                                private function initApp(e:Event):void {
                                                                                /add testing lines here
                                                                                            private var myXMLLoader:MyXMLLoaderHelper;
                                                                                            private function initApp(e:FlexEvent):void {
                                                                                                 myXMLLoader = new MyXMLLoaderHelper();
                                                                                                 myXMLLoader.addEventListener(Event.COMPLETE, completeHandler);
                                                                                                 myXMLLoader.addEventListener("xmlUpdated", xmlUpdatedHandler);
                                                                                                 authors_cbo.addEventListener(ListEvent.CHANGE, changeHandler);
                                                                                                 addRow_btn.addEventListener(MouseEvent.CLICK, addClickHandler);
                                                                                                 delete_btn.addEventListener(MouseEvent.CLICK, deleteClickHandler);
                                                                                                 books_dg.addEventListener(DataGridEvent.ITEM_EDIT_END, itemEditEndHandler);
                                                                                                 authors_cbo.labelFunction = getFullName;
                                                                                                 myXMLLoader.loadXML("Assets/customer_info.xml", "lastname");
                                                                                            private function completeHandler(e:Event):void {
                                                                                                 authors_cbo.dataProvider = myXMLLoader.getChildElements("author");
                                                                                                 tree_txt.text = myXMLLoader.getXML().toXMLString();
                                                                                                 books_dg.dataProvider = myXMLLoader.getBooks(0);
                                                                                            private function getFullName(item:Object):String {
                                                                                              return item.authorFirstName + " " + item.customerLastName;
                                                                                            private function changeHandler(e:Event):void {
                                                                                                 books_dg.dataProvider = myXMLLoader.getBooks(e.target.selectedIndex);
                                                                                            private function addClickHandler(e:MouseEvent):void {
                                                                                              var newBookName:String = name_txt.text;
                                                                                              var newPublishYear:String = year_txt.text;
                                                                                              var newBookCost:String = cost_txt.text;
                                                                                              var authorIndex:int = authors_cbo.selectedIndex;
                                                                                              if(newBookName.length > 0 && newPublishYear.length > 0 && newBookCost.length > 0) {
                                                                                                 myXMLLoader.addBook(authorIndex, newBookName, newPublishYear, newBookCost);
                                                                                            private function deleteClickHandler(e:MouseEvent):void {
                                                                                              var bookIndex:int = books_dg.selectedIndex;
                                                                                              var authorIndex:int = authors_cbo.selectedIndex;;
                                                                                              if (books_dg.selectedIndex != -1) {
                                                                                                 myXMLLoader.deleteBook(authorIndex, bookIndex);
                                                                                            private function itemEditEndHandler(e:DataGridEvent):void {
                                                                                              var authorIndex:int = authors_cbo.selectedIndex;
                                                                                              var dg:DataGrid = e.target as DataGrid;
                                                                                              var field:String = e.dataField;
                                                                                              var row:int = e.rowIndex;
                                                                                              var col:int = e.columnIndex;
                                                                                              var oldVal:String = e.itemRenderer.data[field];
                                                                                              var newVal:String = dg.itemEditorInstance[dg.columns[col].editorDataField];
                                                                                              if (oldVal != newVal) {
                                                                                                   myXMLLoader.modifyXMLTree(authorIndex, dg.columns[col].dataField, row, newVal)
                                                                                            private function xmlUpdatedHandler(e:Event):void {
                                                                                                 books_dg.dataProvider = myXMLLoader.getBooks(authors_cbo.selectedIndex);
                                                                                                 tree_txt.text = myXMLLoader.getXML().toXMLString();
            ]]>
        </mx:Script>
        <s:Panel x="9" y="257" width="459" height="383" contentBackgroundColor="#666666" backgroundColor="#666666" chromeColor="#FCF6F6" title="DIRECTIONS TO SILVER FOX COLLISION CENTER:" fontSize="14">
            <s:TextInput x="55" y="7" contentBackgroundColor="#030000" height="17" width="392"/>
            <mx:Label x="3" y="6" text="FROM:" fontSize="14" color="#FDF9F9"/>
            <s:TextInput x="1114" y="637" contentBackgroundColor="#FCF7F7" height="17" width="213"/>
            <s:Button x="1337" y="634" label="GET DIRECTIONS" focusColor="#FBFCFD" chromeColor="#666666" color="#FEFEFE" width="141" fontSize="14"/>
            <mx:Label x="1088" y="637" text="TO:" fontSize="12" color="#FDFBFB"/>
            <s:Button x="295" y="56" label="GET DIRECTIONS" focusColor="#FBFCFD" chromeColor="#666666" color="#FEFEFE" width="157" fontSize="12"/>
            <s:TextInput x="55" y="31" contentBackgroundColor="#070000" height="17" width="392"/>
            <mx:Label x="25" y="30" text="TO:" fontSize="14" color="#FDFBFB"/>
        </s:Panel>
        <mx2:DataGrid x="10" y="54" width="458" height="104" color="#666666" contentBackgroundColor="#060000" borderColor="#030000" fontSize="8" focusColor="#666666" chromeColor="#030000" selectionColor="#666666" dropShadowVisible="true" rollOverColor="#FFFFFF">
            <mx2:columns>
                <mx2:DataGridColumn headerText="LAST NAME:" dataField="col1"/>
                <mx2:DataGridColumn headerText="DESIGNATED DUE DATE:" dataField="col2"/>
                <mx2:DataGridColumn headerText="STATUS UPDATED:" dataField="col3"/>
                <mx2:DataGridColumn headerText="CUSTOMER ID:" dataField="col3"/>
            </mx2:columns>
        </mx2:DataGrid>
        <mx:Text id="directionsSummary" width="100%"/> <mx:DataGrid id="directionsGrid" dataProvider="{directionsSteps}" width="100%" height="100%" sortableColumns="false" />
        <mx:Text id="directionsCopyright" width="100%"/>
        <mx:HBox> <mx:Label text="From: " width="70"/> <mx:TextInput id="from" text="San Francisco, CA" width="100%"/> </mx:HBox>
        <mx:HBox> <mx:Label text="To: " width="70"/> <mx:TextInput id="to" text="Mountain View, CA" width="100%"/> </mx:HBox>
        <s:Label x="11" y="38" text="LAST NAME:" color="#FCFBFB" fontSize="14" verticalAlign="top"/>
        <s:TextArea x="96" y="32" width="145" height="18" focusColor="#FCFAFA" color="#010000" contentBackgroundColor="#000000" id="message_txt" text="{xmlService.lastResult.toString()}>
        <s:Label x="273" y="37" text="CUSTOMER ID;" fontSize="14" color="#FDFBFB"/>
        <s:TextInput x="376" y="32" width="89" height="18" focusColor="#FCF9F9" color="#FAF8F8" contentBackgroundColor="#040000"/>
        <s:Button x="318" y="212" label="RESET" focusColor="#F8FAFB" color="#FEFBFB" chromeColor="#666666" fontSize="12"/>
        <s:Button x="393" y="212" label="SUBMIT" focusColor="#F8F9FA" color="#FFFBFB" chromeColor="#666666" fontSize="12"/>
        <s:TextArea x="10" y="160" width="458" height="48" color="#FEF8F8" contentBackgroundColor="#050000"/>
        <mx:Panel x="483" y="31" width="750" height="609" layout="absolute" backgroundColor="#666666" borderVisible="true" dropShadowVisible="true" chromeColor="#FDF9F9">
            <mx:VBox x="26" y="7" height="559" width="708">
                <maps:Map xmlns:maps="com.google.maps.*" id="map" mapevent_mapready="onMapReady(event)" x="500" y="25" width="700" height="550" key="ABQIAAAA9YXHa-b0xqHBMiooUNYUbhRpa9TAnukyOWjhoGl3Y9H2BJoi9xSrm6cnM0lBZ4lCtqRLxKpQK_eb Rg" sensor="true"/>
            </mx:VBox>
        </mx:Panel>
    </mx:Application>
    /**the AIR APPLICATION*/
    <?xml version="1.0" encoding="utf-8"?>
    <s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
                           xmlns:s="library://ns.adobe.com/flex/spark"
                           xmlns:mx="library://ns.adobe.com/flex/mx" backgroundColor="#666666" width="854" height="348" creationComplete="initApp(event)">
        <s:HTTPService id="customer_info" url="data/customer_info.xml" resultFormat="e4x" result="resultHandler(event)"/>
        <mx:Script>
            <![CDATA[
            /**FLEX 4 Bible: Chapter 24- Managing XML w/ E4X*/
            private var xmlData:XML;
            private function resultHandler(event:ResultEvent):void
                xmlData = event.result as XML:
            ]]>
        </mx:Script>
        <fx:Declarations>
            <!-- Place non-visual elements (e.g., services, value objects) here -->
        </fx:Declarations>
        <mx:Image source="@Embed('Assets/logo.png')" x="1" y="0" width="760" height="168"/>
        <s:Label x="96" y="126" text="Last Name:&#xd;" color="#FFFFFF" fontSize="20" fontFamily="Times New Roman"/>
        <s:Label x="13" y="218" text="Designated Due Date:&#xd;" fontSize="20" fontFamily="Times New Roman" color="#FBF8F8"/>
        <s:Label x="63" y="186" text="Status Updated:&#xd;" color="#FCF5F5" fontSize="20" fontFamily="Times New Roman"/>
        <s:TextInput x="192" y="125" width="196"/>
        <s:TextInput x="193" y="215" width="195"/>
        <s:TextInput x="193" y="185" width="195"/>
        <s:Label x="80" y="158" text="Customer ID:" color="#FDFCFC" fontSize="20" fontFamily="Times New Roman"/>
        <s:TextInput x="192" y="155" width="196"/>
        <s:Button x="243" y="241" label="RESET"/>
        <s:Button x="317" y="241" label="UPDATE" focusColor="#666666"/>
    </s:WindowedApplication>
    /**the Customer Information XML*/
    <?xml version="1.0" encoding="utf-8"?>
        <allNames>
            <name namesID="1">
                <nameLastName>Ambrose</nameLastName>
                <customerids>
                    <customerid customerID="1">
                        <customerID>777777</customerID>
                    </customerid>
                </customerids>

    Hi All,
    please note that we found the problem. The problem was that we didn't configure under:
    "Configuration-> Security -> Message Security -> SOAP" the voprrect provider to handle the security.
    After that was done (extract of domain.xml) the message was understood.
    <provider-config class-name="com.sun.identity.agents.jsr196.as9soap.AMServerAuthModule" provider-id="AMServerProvider-UserNameToken-Plain" provider-type="server">
                <request-policy auth-source="content"/>
                <response-policy auth-source="content"/>
                <property name="providername" value="UserNameToken-Plain"/>
              </provider-config>unfortunately the next problem occured I will post in a new thread.
    Edited by: rankin_ut on Jan 26, 2009 4:43 AM

  • How to replace back slash ( / ) from xml url path

    Hi,
    I got an xml file from other site that generate url starting
    with back slash ( / ) . I want to replace that trialing slash. How
    do I replace through as3.
    I tried the replace() method no luck with the /
    Here is what I'm tiring to do:
    Look at the code
    Anybody know how can i generate
    http://www.domain.com/images/image1.jpg

    The as3corelib contains a URI class you can use for this type
    operation.
    http://code.google.com/p/as3corelib/downloads/list

  • Hard-coded playlist XML url into Flashvar?

    Hey All,
    So right now, I have a video player that pulls in all sorts
    of info (flv url, caption file url, video title, description,
    preview image, etc.) through an external xml file (playlist.xml).
    It works great, but I need to change the coding so it's not
    hard-coded into the FLA, rather from the embed code for the swf.
    Any idea how I can do this?
    Here's the chunk of AS3 code that's involved in the original
    loading of the XML data as well as the html text too.
    Thanks!
    Joe

    I tried the solution here:
    http://www.actionscript.org/forums/showthread.php3?t=185370
    But couldn't get it to work... Still looking.
    Joe

  • Xml URL to an input stream

    Hi Guys,
    Would appreciate any help here. Basically my web application recieved XML from a URL, and transforming it straight from the URL was causing problems. So I've found a way around it but its too cpu intensive for my liking.
    I now convert the URL to a string, convert the string to a byte array, and then stream the byte array.
    So basically I'm asking, is there a better way of converting the URL to an input stream than my code below...
          URL source = null;
          SAXBuilder builder;
          org.jdom.Document doc;
          source = new URL(xslFile);
          builder = new SAXBuilder();
          doc = builder.build(source);
          String xslData = Xml.getRawString(doc);
          byte [] barrBt = xslData.getBytes();
          ByteArrayInputStream barrInputStream2 = new ByteArrayInputStream(barrBt);
          processor.process(xmlDomSource, 
                            new StreamSource(barrInputStream2),
                            _request,
                            _response,
                            _xslParameters,
                            thisSessionInfo);  

    Seems to me a better way to do it would be to solve the problems associated with parsing directly from the URL. They should be solvable since if your code can read from the URL then so can the parser.
    However if you want to save some processing time, don't convert the XML from bytes to String and then back to bytes again. (You also run the risk of damaging the XML because you may not be doing those conversions with the encoding declared in the XML, but that's a separate problem.)

  • How to: Display Specific Xml Entry in AS3

    I have a very simple line of code that i'm trying to modify to display a specific entry in a xml file:
    AS3 Code:
    // The first step is to activate the XML object
    AmbientSettingsXML = new XML();
    With the XML Object now active you must now load an XML foramtted document.
    Any DTD or XLS formatting will be ignored.
    AmbientSettingsXML.onLoad = myLoad;
    AmbientSettingsXML.load("settings.xml");
    // Before proceeding to far into the program, make sure the XML document has loaded
    // Extract information from the XML file
    function myLoad(ok) {
    if (ok == true) {
    trace("ok");
    trace(AmbientSettingsXML);
    The Trace Displays:
    ok
    <?xml version="1.0"?>
    <settings>
    <appearance>
    <event_title>Streaming Demo 1</event_title>
    </appearance>
    </settings>
    So the question is, how do I display the "event_title" entry only? (String)
    Any help is appreciated,
    Thanks!

    var loader:URLLoader = new URLLoader();
    loader.addEventListener(Event.COMPLETE, completeHandler);
    var request:URLRequest = new URLRequest("yourxmlfile.xml");
    loader.load(request);
    function completeHandler(event:Event):void {
    var loader:URLLoader = URLLoader(event.target);
    var xml:XML = XML(loader.data);
    //xml.child("appearance")[0].child("event_title")[0];

  • Returning the SWF url in AS3

    Hello. In as 2.0 there was a simple code like trace(_root._url) that would return the url of the actual swf file. What is the equivalent in AS3?
    The samples I found were all realted to window.location and other things, is there no simple code for this like in as 2?
    Thank you.

    Thank you. I found that it was this.loaderInfo.url
    It didnt work at first because I was trying with capital (Loader).

  • XML URL Links - Issue diff to pervious post!

    Please can someone help. I'm new to xml and flash and have worked through the following tutorial: http://www.kirupa.com/developer/actionscript/xmldataflash2.htm
    I now want to add a link so for example I want <name>Thomas Edison</name>  the name to be the link how do I do this. I've looked at links which give solutions like <name>&lt;a href="item/01.html"&gt; Thomas Edison &lt;/a&gt;</name> but none of this has worked.
    I'm using MX pro 04. Thanks

    erm, this is an AS3 forum, and I don't think MX 04 supports that...

  • JDev 10g - Security - web.xml - URL pattern matching

    Hello,
    I use JDeveloper 10.1.3.4. It's 4 hours I try to figure out what is going on:
    I set security constraint in web.xml:
    &lt;security-constraint&gt;
    &lt;web-resource-collection&gt;
    &lt;web-resource-name&gt;books&lt;/web-resource-name&gt;
    &lt;url-pattern&gt;faces/app/books/*&lt;/url-pattern&gt;
    &lt;url-pattern&gt;faces/*/app/books/*&lt;/url-pattern&gt;
    &lt;/web-resource-collection&gt;
    &lt;auth-constraint&gt;
    &lt;role-name&gt;books&lt;/role-name&gt;
    &lt;/auth-constraint&gt;
    &lt;/security-constraint&gt;
    User is logged in with role "books" for sure.
    http://192.168.0.109:8988/lib/faces/app/books/page.jspx can be seen
    but dialogs can't be seen, url is : http://192.168.0.109:8988/lib/faces/__ADFv__?_afPfm=1.5&_t=fred&_vir=/app/books/Search.jspx&loc=en&_rtrnId=2it redirects to login page.
    Another thing, when I set only one url pattern : faces/app/books/*.jspx
    I can't even see faces/app/books/page.jspx page!
    It's very curious, have to be something else somewhere to set, because in SRDemo app this 2 cases don't cause problems.
    Bart
    snowface.net - snowboard equipement reviews

    Hi,
    dialogs are not opened by a GET request, which is what container managed authorization looks at. It basically bypasses this kind of security, which means that developers should check manually on teh command component that launches teh dialog if the authenticated user is allowed to do this. Also note that the default JSfnavigation is by postback which means you have to set all navigation to use the redirect flag to make it work with container managed security
    Frank

  • Problems using XML URL data service on Jdev

    Not sure if this is the right forum for this but couldn't find specific forum on XML.
    I"m using Jdev Studio Edition Version 11.1.1.4.0 (Win 2008 Server). I'm followng the tutorial (http://www.oracle.com/technetwork/developer-tools/jdev/ccset10-all-091120.html) which treaches how to create a URL service to read RSS feeds.
    My real question is about any guidance in creating proper XML schemas. I've read the documentation from wr.org but I"m still not sure about any key rules to follow for creating XML schemas and if XML schemas are a muust for using XML DB to read content from the internet.
    Following the instructions I created the following XML schema:
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns="http://www.example.org"
    targetNamespace="http://www.example.org"
    elementFormDefault="qualified">
    <xsd:element name="rss">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="channel" type="channel"></xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:complexType name="channel">
    <xsd:sequence>
    <xsd:element name="lastBuildDate" type="xsd:string"></xsd:element>
    <xsd:element name="title" type="xsd:string"></xsd:element>
    <xsd:element name="link" type="xsd:string"></xsd:element>
    <xsd:element name="description" type="xsd:string"></xsd:element>
    <xsd:element name="managingEditor" type="xsd:string"></xsd:element>
    <xsd:element name="language" type="xsd:string"></xsd:element>
    <xsd:element name="item" type="item" minOccurs="0" maxOccurs="100"></xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="item">
    <xsd:sequence>
    <xsd:element name="title" type="xsd:string"></xsd:element>
    <xsd:element name="link" type="xsd:string"></xsd:element>
    <xsd:element name="description" type="xsd:string"></xsd:element>
    <xsd:element name="pubDate" type="xsd:string"></xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:schema>
    When trying to run the page I get the following trace:
    Target URL -- http://127.0.0.1:7101/Application1-Project1-context-root/faces/newsPage.jspx
    Tag: Definition
    <XMLHandler> <parseDataStream> Failed to create the DOM tree for the source. Resaon: Expected '>'.
    <XMLHandler> <parseDataStream> Failed to create the DOM tree for the source. Resaon: Expected '>'.
    <XMLHandler> <parseDataStream> Failed to create the DOM tree for the source. Resaon: Expected '>'.
    <XMLHandler> <parseDataStream> Failed to create the DOM tree for the source. Resaon: Expected '>'.
    <XMLHandler> <parseDataStream> Failed to create the DOM tree for the source. Resaon: Expected '>'.
    <XMLHandler> <parseDataStream> Failed to create the DOM tree for the source. Resaon: Expected '>'.
    <XMLHandler> <parseDataStream> Failed to create the DOM tree for the source. Resaon: Expected '>'.
    <XMLHandler> <parseDataStream> Failed to create the DOM tree for the source. Resaon: Expected '>'.
    Any idea what I am doing wrong? Thanks, J

    Hi Jay,
    Most of XML parsers mainly support UTF-8 encoding by default. So if the source is Windows 1252 encoded, the parser might fail.
    There are two potential solutions (including but not limited to):
    1) Use encoding tools/functions to translate the source with UTF-8 encoded.
    2) Change ADF configurations to see if ADF can deal with Windows 1252 encoded source. Also people in ADF forum may have suggestions from their point of view.
    Best regards,
    Rucong Zhao
    Oracle Berkeley DB XML

  • UpdateConfig.xml URL: How to predict it?

    Hey there,
    I'm writing a tool that builds AIR files server-side. The apps UI are generic but their content change from app to app. To do so I have to create unique app.xml files for each, and I also have to create unique updateConfig.xml files for each (to use with the Licencing Service).
    My problem is I can't seem to understand how to determine the <url> value to use:
    This page says we have to use a specific format: http://apprepo.adobe.com/updates/[your.appid.here]/update.xml
    When I upload an app using this format I get an error saying I should rather use this format: http://apprepo.adobe.com/apprepo/201011/updates/[your.appid.here]/update.xml?version=2.5
    Since my apps (AIR 2.5) are compiled server-side I'd like, as much as possible, not to have to write those updateConfig.xml files manually.
    So here are my questions:
    What is the format to use?
    Is the /201011/ part of the URL some kind of date code?
    Will it change in the future?
    Are the docs up-to-date?
    Thanks in advance for your help!

    1. What is the format to use?
         Since your applications are built using AIR 2.5 then you should use this format:
    http://apprepo.adobe.com/apprepo/201011/updates/[your.appid.here]/update.xml?version=2.5
    IMPORTANT: replace [your.appid.here] with your application id.
    2. Is the
    /201011/ part of the URL some kind of date code?
    This is an internal value which you a user need not be concerned about.  Please do not change it.  It must be 201011.
    3. Will it change in the future?
    NO.
    4. Are the docs up-to-date?
    YES.

Maybe you are looking for

  • IPod Touch 3rd gen 32 GB stuck in recovery mode. iTunes won't restore. When I plug it into iTunes, it calls it an iPhone.

    My husband plugged his iPod Touch into the USB port on the computer and, once it charged some, iTunes didn't recognize it as his iPod (calling it an "iPhone" rather than "Ed's iPod"). It said that iTunes had detected an iPhone in recovery mode and th

  • How to find the special character in a give string/sentance

    Hi All, I have one task to complete with in the give time. Since i am not very good in PL/SQL i need your your help. Requirement is : I have to come up with the SQL or PL/SQL code which should return and find the special or hidden character in the da

  • GET/SET parameter

    Hi , I have a very basic question.What does the following mean ? SET PARAMETER ID '/ORGIT/PAM_TY' FIELD space.Thanks for your time in advance.

  • Zen Micro Installation issu

    Ok, so I put the disk in and chose Full installation and stuff, but eventually when it gets to 39% is freezes and this error message comes up saying DoInstall fails to launch D:\CDRipwiz\Setup.inx DoInstall return error code is -2472332. Then I click

  • Error in Configuration and End to end monitoring

    Hi all, I am getting error in RWB  under configuration and end to end  monitoring. End to end monitoring iam getting "Neither the messager server nor the application server can be reached for system pirdev.titan.co.in" and under Configuration "Cannot