How to get this PHP list in Flash AS3?

Hi,
I have the following PHP code (downloaded from net) which builds a list of all the files in a "MyPics" folders:
PS php can build a list of all the files in a folder so you don't have to type them all out like that, plus it makes updating a sinch all you have to do is put a pic in the folder and it will be added to the list.
PHP Code:
<CODE>
<?
//this function goes through the defined directory and makes a list of all the files
function parse_dir($dir,$level){
    $dp=opendir($dir); //opens the directory for reading
    while (false!=($file=readdir($dp))){  //runs until no more files
        if ($file!="." && $file!=".." && $file!=".htaccess"){  //so you don't get all the default folders
            $countervar=$countervar+1;  //just a counter for numbering the path names
            if (is_dir($dir."/".$file)) parse_dir  //recurses the subdirectories
($dir."/".$file,$level+1);
            else print "&path".$countervar."=".$dir."/".$file;  //pieces together something flash can read
$start_dir="pathToMyPics";  //put the name of the folder with all the pics here
$level=1;
parse_dir($start_dir,$level);
?>
<CODE/>
The above php will output something like this
&path1=pathToMyPics/pic1.jpg&path2=pathToMyPics/wowWhatAWierdPicName.jpg
call the php in flash( loadVariables("fileListPHP.php") ) and viola you get easy to use paths to all you pictures.
I am not able to understand the code to write on FLASH AS3 frame. Please help.
Thanks.

In AS3 you want to use the URLVariables class.  Search Google using "AS3 URLVariables tutorial" and you should find what you need to get going.  Here's one result from that search...
http://www.metah.ch/blog/2008/01/using-urlvariables/

Similar Messages

  • How to use this example code in Flash AS3?

    Hi,
    How can I use this AS3 code in my Flash CS4 document? The following code is in the below link:
    http://pv3d.org/2009/12/18/tweenmax-tweening-a-timeline-advanced-tweening/#
    Please help.
    Thanks.

    Hi,
    It is working quite nice. I want to use the same code but instead of as "Document Class" I want to put that code in a first key frame of my project. I tried the following but gets an error:
    The error is : 1131: Classes must not be nested.
    And the following code  I tried is:
        import com.greensock.TimelineMax;
        import com.greensock.TweenMax;
        import com.greensock.easing.Linear;
        import com.greensock.easing.Quart;
        import flash.display.Sprite;
         * @author John Lindquist
        [SWF(width="900", height="480", frameRate="31")]
        class EasingATimeline extends Sprite
            private var square:Sprite;
            private static const STEP_DURATION:Number = 1;
            public function EasingATimeline()
                square = new Sprite();
                square.graphics.beginFill(0xcc0000);
                square.graphics.drawRect(0, 0, 50, 50);
                square.graphics.endFill();
                square.x = 100;
                square.y = 50;
                addChild(square);
                //set all the eases of your steps to Linear.easeNone
                var step1:TweenMax = TweenMax.to(square, STEP_DURATION, {x: 700, y: 50, ease: Linear.easeNone});
                var step2:TweenMax = TweenMax.to(square, STEP_DURATION, {x: 700, y: 350, ease: Linear.easeNone});
                var step3:TweenMax = TweenMax.to(square, STEP_DURATION, {x: 100, y: 350, ease: Linear.easeNone});
                var step4:TweenMax = TweenMax.to(square, STEP_DURATION, {x: 100, y: 50, ease: Linear.easeNone});
                var timeline:TimelineMax = new TimelineMax();
                timeline.append(step1);
                timeline.append(step2);
                timeline.append(step3);
                timeline.append(step4);
                //pause your timeline
                timeline.pause();
                //tween your timeline with whatever ease you want
                TweenMax.to(timeline, timeline.totalDuration, {currentTime: timeline.totalDuration, ease: Quart.easeInOut, repeat: -1});
    Please help me to solve this problem.
    Thanks.

  • How to get the last version of flash in MSI format automatically?

    How to get the last version of flash in MSI format automatically?
    Roberto Neigenfind
    Bravo Tecnologia
    www.bravotecnologia.com.br

    Hi Barbara,
    Flash Professional CS5.5 is a 32-bit application which can be installed on computers with either 32-bit or 64-bit operating systems.
    You can purchase this by Adobe's backward Licensing policy :
    " Adobe allows program members to order a current-version license but use a prior version. These members can contact Adobe Customer Service to request a serial number for the earlier version if they do not already have one. Prior-version software is available via ESD and can be purchased through standard resellers. The program member must follow all guidelines of the current-version EULA. "
    Please check the doc : http://www.adobe.com/volume-licensing/policies.html

  • How to get Active users list in Essbase 6.5.6

    Hi Gurus,
    How to get Active users list in Essbase 6.5.6 version
    I dont find any Esscmd to find active users list....
    i used LISTLOGINS command in ESSCMD but its not helping me out....
    pls suggest me some approach to find active users list.
    Thanks in advance....

    Hi  ,
    Display sessions will give only active users details which are currently connected to the ESSBASE .
    if you need this list ? or  you need the  total list of   security  active users list ?
    if you need the currently connected to the ESSBASE
    if you check  one server  At a time  or you can check the application level also
    1)server level
    display  session all;
    2)application level
    display session on application  'application name ';
    go for the  run command ---> essmsh----->  login;----->enter user name ----> enter password----->enter host (like server name )  then you need to you   above  1 &2  commands
    Thanks,
    suresh

  • How to get the user list under role

    Hi Gurus,
    in mdm console, if you select a role, you will see the users who are assigned to this role.
    how can I get this user list through java api.
    Ouser server is  MDM7.1SP5
    Best regards,
    John

    Hello John
    you cann't get users list.
    you can get user roles information since SAP MDM 7.1 SP3:
    com.sap.mdm.security.commands GetUserRoles Command
    A command to retrieve the array of roles for the specified user
    more about api  you can read here(What's New in MDM Java and .NET API - part):
    http://help.sap.com/saphelp_nwmdm71/helpdata/en/13/041975d8ce4d4287d5205816ea955a/frameset.htm
    Regards
    Kanstantsin Chernichenka
    Edited by: Kanstantsin Chernichenka on Mar 11, 2011 3:10 PM

  • How to get Saved Selection list in javascript?

    Hello!
    Recently I met a little problem about save selection. I want to get saved selection list so that I can used in javascript. Now I have no ideals. Hope you tell me some useful information about how to get Saved Selection list in javascript!

    Mark is right, it's not possible.
    But do you know you can assign selection to a variable, and get back to it simply like this?
    var sel = app.selection;
    app.selection = null;
    /* your codes here
    app.selection = sel;

  • HT1589 This doesn't work in Windows 8. Anybody know how to get this dialog box in Windows 8?

    This doesn't work in Windows 8. Anybody know how to get this dialog box in Windows 8?

    Hello,
    Try disabling graphics hardware acceleration. Since this feature was added to Firefox, it has gradually improved, but there still are a few glitches.
    You might need to restart Firefox in order for this to take effect, so save all work first (e.g., mail you are composing, online documents you're editing, etc.).
    Then perform these steps:
    *Click the orange Firefox button at the top left, then select the "Options" button, or, if there is no Firefox button at the top, go to Tools > Options.
    *In the Firefox options window click the ''Advanced'' tab, then select "General".
    *In the settings list, you should find the ''Use hardware acceleration when available'' checkbox. Uncheck this checkbox.
    *Now, restart Firefox and see if the problems persist.
    Additionally, please check for updates for your graphics driver by following the steps mentioned in the following Knowledge base articles:
    * [[Troubleshoot extensions, themes and hardware acceleration issues to solve common Firefox problems]]
    * [[Upgrade your graphics drivers to use hardware acceleration and WebGL]]
    Did this fix your problems? Please report back to us!
    Thank you.

  • HOW TO GET THIS STOP MOTION LOOK

    TRYING TO FIND OUT HOW TO GET THIS STOP MOTION LOOK. IS IT DONE WITH EDITS OR PLUGIN
    EXAPLE AT THIS SITE
    http://www.brothersstrause.com/vide...h.php?work_id=1

    I think a lot of that was achieved in camera by manipulating frame rates and so forth.
    Also it looked like some of the awkward jerkiness was achieved by filming the talent actually moving backwads and then reversing it in post. I saw a behind the scenes for a movie that used that technique to get that look. I think it was the grudge or the ring.

  • I have purchased itunes match but the cloud will not load on my ipad 4.the only music that will show up is stuff that i bought from the itunes store.any ideas on how to get this to work?

    i have purchased itunes match but the cloud will not load on my ipad 4.it works on my iphone 5 & it originally worked on my ipad.the only music that will show up is stuff that i bought from the itunes store.any ideas on how to get this to work?

    On the MBP, in iTunes, switch to Song view and enable the iCloud Status column by pulling down View > View options and selecting the option for "iCloud Status." Close the small window. Look for any tracks that have a status of "waiting." If you see several of them disable iTunes Match while holding down the Option key. Quit iTunes, wait a few seconds, then open it again and turn iTM back on. Let it compelete the scan. Wait until all tracks that are "waiting" have a status of either "matched" or "uploaded."
    On the iPad, turn off iTunes Match then launch the Music app and let the contents clear out. Power cycle the iPad for good measure, then re-enable the service once all the tracks in iTunes have been processed.

  • How to get this look in photoshop?

    How to get this look in Photoshop or by any other online application?

    if its just black and white then can i suggest one of many tutorials on youtube
    http://www.youtube.com/watch?v=9KGBIeGFvsY
    or if you wanted a more rugged look
    http://www.youtube.com/watch?v=LpHdlQRaflg

  • How to get value from list item

    Hi all,
    How to get value from list item?
    I have a problem with the List Item object
    in the Oracle forms.
    How can I retrieve the selected item from
    a list ?
    I didn't find any function like 'list.GET_
    SELECTED_ITEM()'...
    thanks
    Bala

    Hello,
    You get the value as for any other Forms item:
    :value := :block.list_tem ;Francois

  • Facebook like button is not working, I have used the muse widget and created code from facebook. Does anyone know how to get this to work?

    Facebook like button is not working, I have used the muse widget and created code from facebook. Does anyone know how to get this to work?

    Hi connally25,
    Below is a link to a video tutorial on how to add a Facebook Log button, please check if you have followed the same steps to add the video.
    http://tv.adobe.com/watch/learn-adobe-muse-cc/adding-a-facebook-like-button/
    If you have followed the steps correctly and the button still does not work; here is a link to a forum thread which might help solving the issue:
    Facebook Follow Widget not working
    Regards
    Sonam

  • I have a 4s iPhone which I loaded the new Os on last night. Now I can not connect to iTunes. A message comes up saying i need 10.6.3 or later but I am running 10.6.1 as I have an older Mac. Anyone have ideas how to get this to work?

    I have a 4s iPhone which I loaded the new Os on last night. Now I can not connect to iTunes. A message comes up saying i need 10.6.3 or later but I am running 10.6.1 as I have an older Mac. Anyone have ideas how to get this to work?

    Its not telling you to update your iPad, its telling you you need to download a recent version itunes on your computer.
    Go here to download the newest version of iTunes.
    http://www.apple.com/itunes/?cid=OAS-US-DOMAINS-itunes.com

  • How to get the users list that can Add/Remove or modify Vendors in Oracle?

    How to get the users list that can Add/Remove or modify Vendors in Oracle?
    I need to generate a report like name and responsibility. Thanks

    That query gives the Supplier information.
    But what i would be needing is to find out the USERS in oracle who can Add/Modify or Remove Vendors.
    I assume it should be based on the Responsibility.

  • HT4929 I have (or had?) 2 alias  I followed the instructions to go from MobileMe to iCloud. But the alias stayed on MobileMe server (?) How to get this to iCloud?

    I have (or had?) 2 alias My main account is on iCloud. I followed the instructions to go from MobileMe to iCloud. But the alias stayed on MobileMe server (?) How to get this to iCloud? Not possible to put them into icloud as alias. How to keep  it working?HELP HELP because people sending me things to this email and since today no excess any more to the mobile me server? And how to move this?????
    <Emails Edited by Host>

    Firstly, I note that your profile states that you are using OS X 10.5.8, in order to use iCloud on your computer you need OS X 10.7.2 or better.
    Secondly, I have asked for your email address to be edited out. Post your address in an open thread is a sure way to be bombarded by unwanted email, remember it will be here long after you have resolved your problem, for automated detection software to find.
    If you want people to contact you, enable others to see your email address in your profile.
    Finally, are you sure that these additional addresses are aliases and not sub accounts on a family pack, aliases from MobileMe should transfer to an iCloud when you migrate.

Maybe you are looking for