Adobe Flex

 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me



Go Back   Tutorialized ForumsWeb Design & DevelopmentAdobe Flex

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Tutorialized Forums Sponsor:
  #1  
Old May 31st, 2012, 10:00 PM
Mulraid Mulraid is offline
Registered User
Tutorialized Newbie (0 - 499 posts)
 
Join Date: May 2012
Posts: 1 Mulraid User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 45 m 56 sec
Reputation Power: 0
Preset Organized Data | XmL | Matching

O.k First I will like to thank anybody who will be reading this in the first place

The whole goal of this is to have a "Cleaner list"

Let me explain all the elements to this issue first.

1.
I have a list of cards; for example sake I will use 4 rows.
it can be in any format; Xml is pref but what ever will work.
Quote:
Card Name__________________Set
Stinging Swordsman_________________Photon Shockwave
Galaxy-Eyes Photon Dragon___________Photon Shockwave
Photon Veil_________________________Photon Shockwave
Number 83: Galaxy Queen____________Photon Shockwave

The underscores are just to show a row seperation in an excel doc sorry on this one.


2.
I have a amazon wish list. I have converted this list into
a Xml file.
Amazon Wish list
Quote:
<row>
<Set>Upper Deck/Konami</Set>
<Card>YuGiOh Zexal Photon Shockwave Single Card Number 83: Galaxy Queen PHSW-EN039 Super Rare</Card>
<Buy>$2.51</Buy>
</row>
<row>
<Set>Konami</Set>
<Card>Yu-Gi-Oh! - Galaxy-Eyes Photon Dragon - Photon Shockwave - 1st Edition - Ghost Rare</Card>
<Buy>$10.19</Buy>
</row>
<row>
<Set>Upper Deck/Konami</Set>
<Card>YuGiOh Zexal Photon Shockwave Single Card Photon Veil PHSW-EN050 Ultra Rare</Card>
<Buy>$1.90</Buy>
</row>
<row>
<Set>Konami</Set>
<Card>Yu-Gi-Oh! - Stinging Swordsman - Photon Shockwave - 1st Edition - Common</Card>
<Buy>$1.54</Buy>
</row>
<row>



3.
This is the code I have atm to load the #2 Example information

PHP Code:
<?xml version="1.0" encoding="utf-8"?>
<s:View fontSize="20"
        xmlns:fx="http://ns. adobe.com/mxml/2009"
        xmlns:s="library://ns. adobe.com/flex/spark"
        creationComplete="init()">
    
    <fx:Script>
        <![CDATA[
            
            import mx.events.FlexEvent;
            import mx.collections.XMLListCollection;
            import mx.rpc.events.ResultEvent;
            import mx.rpc.http.HTTPService;
            
            [Bindable]
            public var myData2:XMLListCollection;
            private function init():void
                
            {
                
                this.removeEventListener(FlexEvent.CREATION_COMPLE  TE,init);
                var myLoader:URLLoader = new URLLoader();
                myLoader.dataFormat = "XML";
                myLoader.addEventListener(Event.COMPLETE, loadDataResult);
                myLoader.load(new URLRequest(" CANT POST URL BECUASE OF NEW MEMBER "));
                
            }
            
            private function loadDataResult(event:Event):void
                
            {
                
                var myXML:XML = new XML(event.target.data);
                var myXMLList:XMLList = myXML.row;
                myData2 = new XMLListCollection(myXMLList);
                myData2.filterFunction = myFilterFunction;
                
            }
            
            private function search():void
                
            {
                myData2.refresh();
            }
            
            private function myFilterFunction(obj:XML):Boolean
                
            {
                
                if(String(obj.Card).toLowerCase().indexOf(tbSearch  .text.toLowerCase()) > -1)
                    
                {
                    return true;
                }
                return false;
            }
            private function goBack(event:MouseEvent):void {
                navigator.popView();
            }

        ]]>
    </fx:Script>
    <fx:Declarations>
    </fx:Declarations>
    
    <s:titleContent>
        <s:TextInput id="tbSearch" width="392" text="" change="search();">
        </s:TextInput>
    </s:titleContent>
    
    <s:DataGrid id="dgResults" left="0" right="0" top="0" bottom="0" dataProvider="{myData2}"
                horizontalCenter="0">
        <s:columns>
            <s:ArrayList>
                <!--     <s:GridColumn width="200" headerText="Set" dataField="Set"/> -->
                <s:GridColumn width="200" headerText="Card" dataField="Card"/>
                <s:GridColumn width="75" headerText="Buy" dataField="Buy"/>
            </s:ArrayList>
        </s:columns>
    </s:DataGrid>
</s:View>

IMPORTANT; TAKE THE SPACE OUT BETWEEN THE NS. Adobe.
http://ns. adobe.com/mxml/2009
library://ns. adobe.com/flex/spark
Also replace
Quote:
CANT POST URL BECUASE OF NEW MEMBER
With where ever your linking the xml sheet too.


My goal is to have the "1#" example pull up. And have a blank third row named "Price".
Then Pull a Price off of "#2" buy matching the names up partially.

So the outcome would look something like
Quote:
Name_____________Set______________Price
Stinging Swordsman_Photon Shockwave_$1.54



Thank you again for reading through this and I am very eager to hear your thoughts.

Reply With Quote
Reply

Viewing: Tutorialized ForumsWeb Design & DevelopmentAdobe Flex > Preset Organized Data | XmL | Matching


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.

© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap