Professional Web Applications Themes

My first time with flex (how to scan a remote folder) - Macromedia Flex General Discussion

hi there I've taken a sample code and I'm trying to recode it to suit my needs As you can see images are defined in the array the problem is I don't want to recompile my flex application every time I add a image to the "img" folder is there a way I can scan the folder and have all file names added to my array every time the application is launched if not can someone show me how to code a loop that will search the destination for specific file names if they exist then add them to the ...

  1. #1

    Default My first time with flex (how to scan a remote folder)

    hi there I've taken a sample code and I'm trying to recode it to suit my needs



    As you can see images are defined in the array the problem is I don't want to
    recompile
    my flex application every time I add a image to the "img" folder is there a
    way I can
    scan the folder and have all file names added to my array every time the
    application is launched
    if not can someone show me how to code a loop that will search the
    destination for specific file names if they exist then add them to the array if
    they don't then don't add them to the array, thanks for your time

    <Array id="dataSet">
    <String>img/11.jpg</String>
    <String>img/12.jpg</String>
    </Array>


    <local:DisplayShelf id="shelf" horizontalCenter="0" verticalCenter="0"
    borderThickness="5" borderColor="#FFFFFF" dataProvider="{dataSet}"
    enableHistory="false" width="100%"/>

    dragonair1 Guest

  2. #2

    Default Re: My first time with flex (how to scan a remotefolder)

    take a look at the FileReference and the FileReferenceList
    laurent pinson Guest

  3. #3

    Default Re: My first time with flex (how to scan a remotefolder)

    I've had a quick look over those functions and they let the user select the
    files don't they? I'm looking for a way to list all files in that dir and
    populate my array with them if I'm wrong here can you quickly draw up an
    example of them in use? Could I just say FileReferenceList(myfolderurl) and
    populate my array with it?

    I have generated a php script that lists only images in the dir and it works
    ([url]http://dinogod.adrianhosting.com/smf/coverflow/list.php[/url]) I've set it to list
    file names per line

    but I don't know how to feed this into my array being completely new to this I
    do need a lot of guidance

    thanks for your reply mind

    dragonair1 Guest

  4. #4

    Default Re: My first time with flex (how to scan a remotefolder)

    bump :(
    dragonair1 Guest

  5. #5

    Default Re: My first time with flex (how to scan a remotefolder)

    The Flash Player (Flex) doesn't allow you to scan the file system the way you'd
    like. You'd have to use PHP as an intermediary to get info on any files within
    a directory, generate the XML from that and have Flex consume the XML.

    TS

    VarioPegged Guest

  6. #6

    Default Re: My first time with flex (how to scan a remotefolder)

    Thanks for your reply I'll have a look for some php forums having trouble adding my string with the filenames in to a xml file
    dragonair1 Guest

  7. #7

    Default Re: My first time with flex (how to scan a remotefolder)

    okay I have produced a php script that makes xml files
    out of what ever is in the image directory you can view it here
    [url]http://dinogod.adrianhosting.com/smf/coverflow/list.php[/url]
    now how do I import this into flex and put it into my data provider

    <local:DisplayShelf id="shelf" horizontalCenter="0" verticalCenter="0"
    borderThickness="5" borderColor="#FFFFFF" dataProvider="{}"
    enableHistory="false" width="100%"/>

    ?

    dragonair1 Guest

  8. #8

    Default Re: My first time with flex (how to scan a remotefolder)

    Use the HTTPService component to load the XML. See the
    [url]http://livedocs.adobe.com/flex/3/html/index.html[/url] for complete info.

    <mx:HTTPService id="service"
    url="http://dinogod.adrianhosting.com/smf/coverflow/list.php" useProxy="false"
    method="POST" resultFormat="e4x">

    Then you can either have a result handler where you assign the result to a
    variable or do something else with it, or you could just assign the service's
    lastRequest to the data provider.

    <local:DisplayShelf id="shelf" horizontalCenter="0" verticalCenter="0"
    borderThickness="5" borderColor="#FFFFFF"
    dataProvider="{service.lastResult.image.url}" enableHistory="false"
    width="100%"/>

    TS

    VarioPegged Guest

Similar Threads

  1. Defining a remote folder
    By Nik1035 in forum Dreamweaver AppDev
    Replies: 8
    Last Post: April 14th, 10:37 AM
  2. Ricoh IS430 & Adobe Acrobat 6.0 will only scan 2 pages at a time
    By Imhotep_Yakub@adobeforums.com in forum Adobe Acrobat Windows
    Replies: 0
    Last Post: April 6th, 02:53 PM
  3. Setting folder permissions on remote machine / remote domain
    By Tim Chandler in forum ASP.NET Security
    Replies: 0
    Last Post: October 7th, 04:17 PM
  4. Scan 4 at a time
    By P Gardner in forum Adobe Photoshop Elements
    Replies: 17
    Last Post: August 10th, 10:36 PM
  5. Folder not showing up in remote view
    By J Kettler webforumsuser@macromedia.com in forum Macromedia Dreamweaver
    Replies: 0
    Last Post: July 19th, 09:14 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139