Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    Senior Coder Spudhead's Avatar
    Join Date
    Jun 2002
    Location
    London, UK
    Posts
    1,856
    Thanks
    8
    Thanked 110 Times in 109 Posts

    passing asp data to flash

    Hi,

    Apologies for cross-posting in ASP and Flash forums, but I'm trying to pass some data from ASP, back to a Flash movie.

    I'm aware that by calling LoadVariables() in actionscript , I can get an asp file to write out a querystring that flash will then load.

    I can't do that, though, because the asp page itself needs to have something passed to it in the querystring; specifically a database record id number. Obviously I can't put this in a LoadVariables() call as it's gonna change each time the page is loaded.

    I was under the impression that I could do this:

    Load an asp page that gets the database row id out of the querystring, queries the database as usual, then writes out the Flash embedding html tags:

    <PARAM NAME=movie VALUE="flashFile.swf?myVar1=<%=databaseField1%>&myVar2=<%=databaseField2%>">

    ...which flash will then automatically use to popuplate its variables.

    But that doesn't appear to be working; the Flash file hangs in loading. It may well just be a syntax error, but could someone just confirm that it's possible to do what I'm trying to do, and if so where I might be doing it wrong?

    Thanks.

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Location
    Cincinnati, OH
    Posts
    545
    Thanks
    0
    Thanked 0 Times in 0 Posts

  • #3
    Senior Coder Spudhead's Avatar
    Join Date
    Jun 2002
    Location
    London, UK
    Posts
    1,856
    Thanks
    8
    Thanked 110 Times in 109 Posts
    Yeah, I've seen that article; that method is ok when you don't have to pass the asp any parameters, or if you can start with a default. I can't do that; the asp page that I use to drop variables into flash has to recieve a parameter; specifically, a database row id number, in order to know what to set the variables to.

    Maybe I can make my request more specific - have a look here:

    http://www.aspalliance.com/chrisg/to...-santa.asp.asp

    The asp page is sent a variable to use; which it then drops into the Flash by writing it directly into the html <param> tags, as part of the .swf url.

    My understanding is that if you call a .swf with something in the querystring, Flash will automatically read that and turn it into variables.

    It doesn't appear to be working; I'm not a Flash person and I have no idea if there's something else I need to do within the Flash file in order to get it to pick up those variables.

    Can anyone point me in the right direction?

  • #4
    Senior Coder
    Join Date
    Jun 2002
    Location
    41° 8' 52" N -95° 53' 31" W
    Posts
    3,660
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Well, if you can perhaps response.write out whatever is getting passed the the parameter (in addition to appending it to the querystring), then you can be sure you are receiving the ASP variable.

    As for how to get it to work with Flash, that's something I still need to learn (Flash, that is...)
    Former ASP Forum Moderator - I'm back!

    If you can teach yourself how to learn, you can learn anything. ;)

  • #5
    Senior Coder Morgoth's Avatar
    Join Date
    Jun 2002
    Location
    Ontario, Canada Remaining Brain Cells: 6
    Posts
    1,402
    Thanks
    2
    Thanked 1 Time in 1 Post
    Originally posted by whammy
    As for how to get it to work with Flash, that's something I still need to learn (Flash, that is...)
    Your not missing anything but poorly done websites and stickmen flash movies.

    <edit>
    Opinion
    </edit>


  •  

    Posting Permissions

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