Flash is complaining about XML? Im using AS3 why are there XML errors? Unknown syntax errors.

Sorry to keep spamming these forums with my stupid errors, but I am trying really hard to learn Flash/AS3 and when I have got to grips with it, I will return the love.
I am a flash rookie trying to make a simple calculation device and I am getting a whole world of errors I have never seen before.
My Code (I apologise but it may be my bad syntax):
import flash.ui.Mouse;
var Hnum:String;
var PCnum:String;
var calc:Number = 25;
var Total:Number;
num1.restrict = "0-9";
num2.restrict = "0-9";
Est_btn.addEventListener(MouseEvent.CLICK, calculate);
function PartCount(event:MouseEvent):void{
    PCnum = num2.text;
    if (PCnum > 0 && < 10){
        parseInt(PCnum) * 10;
    or if (PCnum > 11 && < 20){
        parseInt(PCnum) * 5;
    or if (PCnum > 21){
        parseInt(PCnum) * 1;
Est_btn.addEventListener(MouseEvent.CLICK, calculate);
function calculate(event:MouseEvent):void{
    Hnum = num1.text;
    PCnum = num2.text;
    Total = parseInt(Hnum) * calc + parseInt(PCnum);
    Total.toString();
    Total_txt.text = String(Total);
I had everything working when I was only calculating Hnum by 25. But when I try to intergrate  the if or statement everything goes wrong and I get these 5 errors.
Scene 1, Layer 'Actions', Frame 1, Line 15
1104: invalid xml name
Scene 1, Layer 'Actions', Frame 1
1084: Syntax error: expecting xmltagendend before end of program.
Scene 1, Layer 'Actions', Frame 1
1084: Syntax error: expecting rightparen before end of program.
Scene 1, Layer 'Actions', Frame 1
1084: Syntax error: expecting identifier before end of program.
Scene 1, Layer 'Actions', Frame 1
1084: Syntax error: expecting rightbrace before end of program.
I dont understand what these errors are pointing out? Why XML? is it my variable names?
Here is the code I had before the second function that worked fine:
var Hnum:String;
var PCnum:String;
var calc:Number = 25;
var Total:Number;
num1.restrict = "0-9";
num2.restrict = "0-9";
Est_btn.addEventListener(MouseEvent.CLICK, calculate);
function calculate(event:MouseEvent):void{
     Hnum = num1.text;
     PCnum = num2.text;
     Total = parseInt(Hnum) * calc;
     Total.toString();
     Total_txt.text = String(Total);
Any help would be greatly appreciated! I will get the hang of this!
MrB

Thanks guys you were right it was parse problem with the var type.
I have changed the code adding parseInt where necessary.
I have also added the other functions. But now after it was working fine with just the one function it is doing the strangest thing.
There are no errors, it is running fine but it is outputting the letter "a" instead of any numbers? Is this something to do with the strings? It is most odd.
Any help would be greatly appreciated.
Here is the new code:
import flash.ui.Mouse;
var Hnum:String;
var PCnum:String;
var PCcalc:Number;
var Pmath:Number;
var calc:Number = 25;
var Total:Number;
num1.restrict = "0-9";
num2.restrict = "0-9";
Est_btn.addEventListener(MouseEvent.CLICK, calculate);
function PartCount(event:MouseEvent):void{
    if (parseInt(PCnum) > 0 && parseInt(PCnum)< 10){
        PCcalc == 1;
    if (parseInt(PCnum) > 11 && parseInt(PCnum)< 20){
        PCcalc == 2;
    if (parseInt(PCnum) > 21 && parseInt(PCnum)<200){
        PCcalc == 3;
Est_btn.addEventListener(MouseEvent.CLICK, calculate);
function PartCalc(event:MouseEvent):void{
    if (PCcalc == 1){
        Pmath * 10;
    if (PCcalc == 2){
        Pmath * 5;
    if (PCcalc == 3){
        Pmath * 1;
Est_btn.addEventListener(MouseEvent.CLICK, calculate);
function calculate(event:MouseEvent):void{
    Hnum = num1.text;
    PCnum = num2.text;
    Total = parseInt(Hnum) * calc + Pmath;
    Total.toString();
    Total_txt.text = String(Total);
Thanks
MrB

Similar Messages

  • How do i complain about having no use of iphone whilst transferring data therefore to find out if eligable for compensation?

    How do i complain about having no use of iphone whilst transferring data & waiting for updates and used a big chunk of my mobile intenet allowance as had it plugged into laptop all day!-therefore to find out if eligable for compensation?.

    Nothing is ever as easy as it should be, though I've no idea what you were doing that took so long. Takes at most 5 mins to insert a SIM card, choose a language and activate the phone. At that point it is working. Another 5-10 mins should get you connected to your email account. You can add media & apps when you're not busy doing something else, and the phone can still make & receive calls while you're doing that!
    The web is geared towards always on all you can eat broadband. If you run mobile broadband with a data cap or escalating charges then you need to manage the usage carefully, it is nobody else's problem.
    Sorry if I've come over a trifle harsh on your first visit here, but these forums are for users to help each other resolve technical issues. However badly your first day setting things up went there is nothing to be done about it now, A little research, or a chat with a knowledgeable friend or colleague, or getting the phone set up at the store would have made it easy. Chalk it up to experience and move on.
    tt2

  • Why are there so many flash updates?

    Why are there so many Flash updates… I have had two in the last week and at least one more since the start of the year. It seems to have really got silly this last 12 months, is Flash really that unsecure and unstable that it needs this many fixes and updates?
    I know you can tick the install in background box when updating but I like to know what is going onto my computer and given Adobe's knack of crashing my system when using PS and AI I don't really want them silently installing anything.

    99% of the time the update gets prompted by Youtube or BBC when videos won't play on there sites and I follow the links through them. You would like to think that big sites like these would not allow false links to malware to crop up, but it isn't out of the question. Next stop, up to date anti virus…..
    As far as Youtube goes I thought they had adopted HTML 5 now as standard and didn't rely on Flash?

  • Why Are There Two Sets of Current Flash Releases, 10.3.x and 11.2.x?

    Why are there two sets of current Flash releases, 10.3.x and 11.2.x?

    As Pat mentioned, our current policy is to support the last major version of Flash Player with security related fixes.

  • Very excited about the new update - Thanks Apple for the keyboard update with new emojis! But why are there no ethnicity options for the families?

    Very excited about the new update - Thanks Apple for the keyboard update with new emojis! But why are there no ethnicity options for the families?

    D.p.middleton the Adobe Application Manager has been available for quite some time.  It not only allows Creative Cloud users to install their applications but also downloads and applies applicable updates.  In addition it is also responsible for the licensing and managing your agreement to the terms and conditions of the EULA.
    2. this could be due to you selecting a trial subscription to the Creative Cloud?  If you go to one of the Adobe Creative products and select Help>Updates it will launch the update portion of the Adobe Application Manager which I believe is the portion you are looking for?
    #3 I believe this was already mostly covered in the answer to #2.
    #4 the Adobe Application Manager also receives periodic updates which affects both perpetual and Creative Cloud subscription users.
    I hope this provides you many of the answers you are looking for?  If not please feel free to respond back with any additional inquiries which you have.  Also if you are experiencing any difficulties with the update process please post this as well.  It may not be necessary to have a full understanding of the inner workings of the Adobe Application Manager to help you resolve your difficulties.

  • How can I use the Creative Cloud without having a Credit Card? Why are there no other possibilities?

    How can I use the Creative Cloud without having a Credit Card? Why are there no other possibilities?

    Hi @DRB1961, 
    I do not think the Zeen will work if you no longer have the C510 printer. The printer is necessary to ensure the Zeen is up to date. The Zeen is simply not a standalone device, it is a component of the printer.   I can not say this with certainty that it will not work, so it is worth trying to reset the Zeen to finding out for sure.
    When you see this message, "must dock the Zeen to the printer to continue", can you access the settings using the 3rd icon above the touch screen? If so we can do a factory reset, if not there is no other way I can think of to bypass this message.
    I just tried a reset on a Zeen I have access to, after the initialization, it prompts me to attach the Zeen to the printer to continue with product setup. it appears my original speculation was correct. No, you can not use the Zeen without the printer.
    Clicking the thumbs up below helps show me that you are grateful of my efforts   If you have any additional questions, I am happy to help.
    Please click the Thumbs up icon below to thank me for responding.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Please click “Accept as Solution” if you feel my post solved your issue, it will help others find the solution.
    Sunshyn2005 - I work on behalf of HP

  • 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

  • Cant read a part of  xml file using AS3

    Hi
    i can read everything from my xml file except a part that i can always get teh first items of each category (it will make more sence in a sec)
    So here is my xml
    [HTML]<?xml version="1.0" encoding="UTF-8"?>
    <flashxml>
      <second_page>
        <sp text="ss ptextj"/>
        <ss text="sptext"/>
        <clas text="clas"/>
      </second_page>
      <third_page>
        <ss>
          <category name="categor">
            <item>3333</item>
            <item>H4444</item>
            <item>etc etc etc </item>
          </category>
          <category name="security ">
            <item>SSL</item>
            <item>Hacke</item>
            <item>etc etc etc </item>
          </category>
        </ss>
        <sp>
          <category name="security a">
            <item>SSL lallalala</item>
            <item>Hacker</item>
            <item>etc etc etc </item>
          </category>
          <category name="onlin">
            <item>Hussle free</item>
            <item>Diafore</item>
            <item>etc etc 2 </item>
          </category>
        </sp>
        <classifieds>
          <category name="Best">
            <item>Additem1</item>
            <item>Additem2</item>
            <item>Additem3 </item>
          </category>
        </classifieds>
      </third_page>
    </flashxml>[/HTML]
    I am trying for each category in the xml to get the relevant items ...
    The problem is that if i try to read for e.g the second set of items for the second category of <sp> using a counter it throws a type error
    TypeError: Error #1010: A term is undefined and has no properties.
    at MethodInfo-1()
    at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at flash.net::URLLoader/flash.net:URLLoader::onComplete()
    so the following works
    var itemslist:XMLList = xml.third_page.ss.category[0].item;  (it will always display the first items of the first category for all the categories
    so for instance for sp will always return even for the second category
    <item>SSL lallalala</item>
            <item>Hacker</item>
            <item>etc etc etc </item>
    but when i am using
    var itemslist:XMLList = xml.third_page.ss.category[i].item;
    i am getting the type error above TypeError: Error #1010 .. (no idea why)
    Any help will be much appreciated
    complete code ::
    pp.buttonMode = true;
    pp.addEventListener(MouseEvent.ROLL_OVER, onButtonOver);
    pp.addEventListener(MouseEvent.CLICK, onButtonOut);
    function onButtonOver(e:MouseEvent):void
    e.currentTarget.gotoAndPlay("a");
    var xmlString:URLRequest = new URLRequest("ev.xml");
    var xmlLoader:URLLoader = new URLLoader(xmlString);
    xmlLoader.addEventListener("complete", init);
    function init(event:Event):void{
      var xDoc:XMLDocument = new XMLDocument();
      xDoc.ignoreWhite = true;
      var animalsXML:XML = XML(xmlLoader.data);
       //var list:XML = XML(xml Loader.data);
    // trace (animalsXML);  //prints the xml
      //edooooooooooooooooooooooooooooooooooo
    var  xml = XML(xmlLoader.data); 
               trace ("XML File");  
           trace ("===================");  
               trace (xml.second_page.sp.attribute("text"));   
          trace (xml.second_page.ss.attribute("text"));   
          trace (xml.second_page.clas.attribute("text"));   
      //edoooooooooooooooooooooooooooooooooooooooooooooooooooo
    // Third page ss
       var i = 0;
       var categorylist:XMLList = xml.third_page.ss.category;  
              for each (var captionElement:XML in categorylist)  
         i++;
                   trace (captionElement.attribute("name")); 
        //trace (captionElement.item);
        var itemslist:XMLList = xml.third_page.ss.category[0].item;
        for each (var captionElement:XML in itemslist)  
                    trace(captionElement);
      // trace (valueOf(captionElement.item));
    // Third page sp
       var i = 0;
       var categorylist:XMLList = xml.third_page.sp.category;  
              for each (var captionElement:XML in categorylist)  
         i++;
                   trace (captionElement.attribute("name")); 
        //trace (captionElement.item);
        var itemslist:XMLList = xml.third_page.sp.category[0].item;
        for each (var captionElement:XML in itemslist)  
                    trace(captionElement);
      // trace (valueOf(captionElement.item));
    // Third page clas
      var i = 0;
       var categorylist:XMLList = xml.third_page.classifieds.category;  
              for each (var captionElement:XML in categorylist)  
    i++;
               trace (i);
         trace (captionElement.attribute("name"));
        //   trace (captionElement.item);
      // trace (valueOf(captionElement.item));
        //var hi= captionElement.attribute("name");
    var itemslist:XMLList = xml.third_page.classifieds.category[0].item;
        for each (var captionElement:XML in itemslist)  
                    trace(captionElement);
      // trace (valueOf(captionElement.item));
      for each(var itemData:XML in animalsXML.elements()) {
    //  trace(itemData.elements().attribute("text")); //DOULEUI
    //third page
    //itemData.thirdpage.elements()[0].@patty
      xDoc.parseXML(animalsXML.toXMLString());
    // trace(xDoc.firstChild.childNodes[0]); //Riverside
      //trace(xDoc.firstChild.childNodes[0].nodeValue);
    //trace(xDoc.valueOf(.getElementsByTagName("item")[0].childNodes[0].nodeValue);
    function onButtonOut(e:MouseEvent):void
    e.currentTarget.gotoAndPlay("b");
    pb.gotoAndPlay("a");

    use
    var itemslist:XMLList = captionElement.item;
    instead of
    var itemslist:XMLList = xml.third_page.sp.category[0].item;
    that should work. You already got the category node in your captionElement variable, why not just use it instead of looking it up again in the document tree?

  • When or should XML be used and why for this situation?

    I am developing a 3-tiered web application (database, server, browser) that will use JSP to display a form where the user will enter their name and address information, JDBC for the connection to a mySQL database.
    When the user enters their name and address information on the JSP displayed using the broswer, the data when submitted will be placed in the database.
    How could I use XML for this situation? Is it really needed at all since I know it can all be done using only JSP? I am just wondering how using XML could help?
    Please give me any feedback you can...if you need more detail to what I am trying to do, let me know....
    Thank you so much in advance!!!

    Hi,
    XML is really useful for representing data from different resources. E.g. it can take a database and represent it as an xml document or it could be an xml document hosted on an external server. By using XML in the jsps, the jsp is completed oblivious to where the xml data came from i.e. either a database or an xml doc. Using XML provides a level of abstraction so that the jsp only needs to know the methods to access/retrieve data not how to access the data i.e. it doesn't have to worry about how to connect to the database, and create sql statements.
    In the situation described if you can be sure that the information that the jsp retrieves will be only from a database then you do not need to use xml, otherwise by using xml you adhere to good-old object design principles.
    There is a paper on using xml and jsp see:
    http://java.sun.com/products/jsp/html/JSPXML.html
    Hope this helps.

  • Xml parsing using java DefaultHandler of org.xml.sax.helpers.DefaultHandler

    i am using
    org.xml.sax.helpers.DefaultHandler api for parsing xml file ,while parsing i am getting exception sometimes ,
    i am using code below to parse the element and then store it to vectore
    parser truncate the charaacters sometimes like parsing string
    " NJ-HealthCare " i am getting only " NJ-HealthCare " and remaing characters are added in new element
    public void characters(char ch[], int start, int length) {
    try{
    ElementVal="";
    System.out.println(" start "+start+" ength :: "+length);
    String ElementVal = new String(ch,start,length);
    v.addElement( ElementVal );
    }catch(Exception ex){
    System.out.println("Exception in vector::"+ex);
    System.out.println(""+ex.getMessage());
    ex.printStackTrace();
    }

    This is an FAQ in the XML forum. The characters() method is not required to give you an entire text node all at once. The parser is free to split up the text node and call characters() several times if it likes. Your program will have to account for that possibility.

  • Using Mail, why are several versions of sent messages ending up in Trash?

    Bought the Pro a month or so ago and recently has an operating system update to 10.9.2.  Am using Mail to pick up mail from Server - and all appears to be working fine.  But, when I send a message, several versions of it and appearing in Trash.  A copy does go into Sent Items and th emessages are getting to addressees - but why are several versions of messages appearing in Trash.
    The versions appear to be at different levels of 'editing' - just very strange an dnever seen it before.
    Any ideas please
    Tony

    The only thing I can find in the preferences that refers to drafts is this:
    Perhaps untick Store draft messages on the server. But I'm not sure if that will definately work or not. Either way, it's shouldn't be too much of an issue.

  • RTE, how to use it? Are there step by step instructions to make a runnable file for a SBC, load it and run it?

    How to use RTE? I need to run my CVI code on a SBC that has its OS on CompactFlash (CF). I have done the Build»Distributions command and made a cds file but don't know if I did it correctly. I have downloaded and installed CVI RTE on my desktop PC, but what to do next to get my CVI code on my SBC's CF? The CF has WindowsEmbedded and so it has the usual Windows folders. So what files do I load on the CF and where do they go?
    Help please! And thanks in advance!
    Solved!
    Go to Solution.

    John,
    I dont know a huge amount about deploying to windows embedded targets, but I would assume you would just install the RTE like you would any other program, then throw the distribution wherever you like to run it from. 
    Regards,
    Kyle Mozdzyn
    Applications Engineering
    National Instruments
    Regards,
    Kyle M.
    Applications Engineering
    National Instruments

  • Why are there two versions of flash player on my laptop?

    I'm running 64 bit Windows 7 Professional which seems to handle both 32 and 64 bit software.  I use Firefox as my default browser and use MSIE only when I must. 
    A Flash update failed so I checked the uninstall programs list thinking I'll just uninstall and reinstall the latest.
    Huh?  I found both "Flash Player 10 Active X" and "Flash Player 11 Plugin 64 bit."  Now I've no clue what failed to upgrade nor why there are two versions.  Why 10 AND 11 and why is one called "Active X" while the other is called "Plugin". 
    And, to confuse me further, there is also Adobe AIR.  I don't know what or why or how to deal with all of these.  Would somebody kindly explain?
    And, how do I figure out what update to which failed?
    frustratedfrequently

    The ActiveX Flash Player is used by Internet Explorer and the plug-in Flash Player is used by Firefox.
    Download the following files:
    Uninstaller for 64 bit Operating Systems
    Flash Player for Internet Explorer
    Flash Player for other browsers
    Close the browser and disconnect from the Internet.  Run the uninstaller and restart Windows.
    Delete all remaining files and folders located in the following directories. (tip: copy and paste these paths into the path bar in an Windows Explorer window) 
    C:\Windows\system32\Macromed\Flash 
    C:\Windows\SysWOW64\Macromed\Flash 
    %appdata%\Adobe\Flash Player 
    %appdata%\Macromedia\Flash Player
    Verify that the file “FlashPlayerCPLApp.cpl” in C:\Windows\SysWOW64\ system, has been deleted.
    Run both installers.

  • Why are there so many problems with flash?

    I cannot play any vidoes on my PC with flash - it cuts up the video and sound and its very frustarting to watch anything - I can't! Went thru all the steps to fix - have windows 7 - and ltest flash. should I jsut load an earlier version?

    Hi Pat -
    I use mostly chrome, but sometimes firefox
    and I did the disable last night but it is still breaking up videos (starting and stopping audio and video). Maybe the problem is my video card??? - Allison

  • When I'm streaming photos to ipad from my PC, those will be in a streamed area. They do not show up in "pictures", and I'm not able to put them into an album. I'm using icloud. Are there any solutions of my problem?

    I would like to make an album at my Ipad. The first pictures I transfered, did get into "pictures", and I could make a photo album. Later I did get them into streamed areas, but they did not get any ways to make an album. They did not apply to "pictures", and when I make an album and tries to import the pictures, the streamed pictures do not show up. What can be done?

    The links below have instructions for deleting photos.
    iOS and iPod: Syncing photos using iTunes
    http://support.apple.com/kb/HT4236
    iPad Tip: How to Delete Photos from Your iPad in the Photos App
    http://ipadacademy.com/2011/08/ipad-tip-how-to-delete-photos-from-your-ipad-in-t he-photos-app
    Another Way to Quickly Delete Photos from Your iPad (Mac Only)
    http://ipadacademy.com/2011/09/another-way-to-quickly-delete-photos-from-your-ip ad-mac-only
    How to Delete Photos from iPad
    http://www.wondershare.com/apple-idevice/how-to-delete-photos-from-ipad.html
    How to: Batch Delete Photos on the iPad
    http://www.lifeisaprayer.com/blog/2010/how-batch-delete-photos-ipad
    (With iOS 5.1, use 2 fingers)
    How to Delete Photos from iCloud’s Photo Stream
    http://www.cultofmac.com/124235/how-to-delete-photos-from-iclouds-photo-stream/
     Cheers, Tom

Maybe you are looking for

  • Tcode FILE problem

    I am trying to use the Direct Input method in the LSMW (It is my first time using the Direct Input method) but I encounter a problem during the Specify File step saying that No Logical Path was specified. I look into the forums and they told me that

  • New to Sun and Solaris

    Hello all. I am currently a Sr. System Administrator right now for IBM AIX and SCO UNIX OS systems and I am wanting to start learning the Sun Solaris OS and getting familiar with that in hopes to become a System Administrator for those OS as well. I

  • Double-click intermittently accepted in Finder and most apps

    since upgrading to Lion, I've experienced intermittent (though frequent) problems with double-clicking being accepted (e.g. to launch an app, open a folder, or to select a word in an application - basically it takes quadruple-click, or more). The fir

  • Friends help please

    friends i have implemented a simple browser . i have used JEditorPAne and the setPage method in it. The problem i am getting is : some pages get displayed whereas some they don't. in some of the web pages when i try to display them, i get some javasc

  • Hand me down iPod

    I searched but didn't find this listed question listed...I bought a 60 gig iPod and am giving my wife my old 30 gig one. is it better to delete the music on the old iPod that she doesn't like or is it better to delete it all and start over? Intel iMa