A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: ASP integration

  1. #1
    Junior Member
    Join Date
    Apr 2004
    Posts
    3

    ASP integration

    I need to find a way to pull an .asp page into flash. I am trying to display a picture gallery that is set up in a list format on the .asp page. Any suggestions? I guess I just need help in finding out how to display this stuff because I think I've successfully had Flash upload the info. right now, this is what I've tried:

    clubShots.onRelease = function() {
    getGallery();
    };
    var galleryURL:String = "gallery.asp";
    var gallery:LoadVars = new LoadVars();
    function galleryLoaded() {
    gotoAndStop("clubShots");
    }
    gallery.onLoad = galleryLoaded;
    function getGallery(){
    gallery.load(galleryURL);
    gotoAndStop("loading");
    }

  2. #2
    Member
    Join Date
    Mar 2003
    Location
    UK
    Posts
    63
    You cant format an asp page in flash. You can call an asp page and have it return XML for example, and then get flash to read the XML and format your images from the XML.

  3. #3
    Junior Member
    Join Date
    Apr 2004
    Posts
    3
    so my code is all bad then?

  4. #4
    Member
    Join Date
    Mar 2003
    Location
    UK
    Posts
    63
    You will have to find an alternative solution to preview your images.

    Do a search for XML and flash and how flash reads XML. You will have to get asp to format the XML with your image entries from your database, return an XML object and get flash to read it.

  5. #5
    Junior Member scudsucker's Avatar
    Join Date
    Feb 2003
    Location
    Cape Town, RSA
    Posts
    1,509
    XML is not really necessary, and will actually complicate it a bit.

    I'd just get the ASP page to loop through the db, presenting the variables in the form
    Code:
    '' assuming your list is in an array names aResults
    For i=0 to Ubound(aResults)
    Response.Write("&image" & i & "=" & aResults(i) & "&")
    Next
    ''
    Response.Write("&i=" & i & "&")
    You now know how many ( i ) images there are, and each is accessible in the flash using the variable "image2.jpg" etc etc
    Hariyemadzisawira nhaka yedu! Down the SCUD and win!
    I'm too lazy to read Private Messages.

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center