Flasher Archive

[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]


Subject: flash and asp (was FLASH: 4.0r26 HAS AUDIO PROBLEMS NOW . . . .)
From: Matt Wobensmith
Date: Thu, 27 Jan 2000 02:15:05 GMT

Hello redstar and all,

Thanks for the tips on this issue.

Just for discussion.... you wrote:

>Now using the same decoding principal what should :
>// http://www.domain.com/page.asp?&name=john&status=single
>parse to ?
>Well the correct answer is a set of three pairs of (variable name,
>variable value). The first group is an empty pair the second is
>(name,john) and the third is (status,single).

I'm not an ASP or CGI expert, but my tests on this actually make this *two*
name/value pairs as far as ASP is concerned. I would normally agree with
your statement (3 pairs), but my findings have showed me something else.

You can set up an ASP page with a For/Each loop that can return every value
passed from a Flash movie. With the r20/r25 player, you'll see that the
first variable name includes the ampersand first. It is not treated as a
seperate name/value pair, but as part of the first variable name.

A good example of this (and the bug in general) is the Flash Chat that ships
with every copy of Flash 4. It's in the Flash 4:Sample Pages: Chat folder on
your hard drive. It includes the SWF, HTML and an ASP page - straight off of
your HD and onto an IIS server, it will work as a real-time chat program
would. With the ampersand bug, you'll notice that typing in your user name
and sending comments to the chat, your name gets cut off. Your comments,
however, will post. This is because the ASP page is expecting a name/value
for the user, and it's getting the &'d variable instead. The user's name has
not been defined in the ASP page.

Again, I'm not an expert, but I've seen very simple workarounds for this.
CGI, as I understand it, can be more sensitive. Perhaps it *does* treat the
ampersand as a new name/value pair? I dunno. This stuff is not easy... the
solutions in the TechNote are meant for people who are obviously high-level
enough to make these kinds of changes.

Regardless, thanks for sending this!

-Matt



---------------
Matt Wobensmith
Macromedia Tech Support
Flash Team Lead

----------
>From: RedStar <redstaratclix [dot] pt>
>To: flasheratchinwag [dot] com
>Subject: Re: FLASH: 4.0r26 HAS AUDIO PROBLEMS NOW . . . .
>Date: Wed, Jan 26, 2000, 6:21 PM
>

>Matt,
>
>I did start out with a clear 'troll' warning.
>Anyway to follow your suggestion :
>"please send responses to the list for the benefit of all.
>do not write to this address for technical support."
>and as it has to do with recent discussions I would like to bring up a
>few points if I may.
>Referring to tech note 14234 and clarifying some things for the benefit
>of this lists subscribers.
>Flash when sending data with the get or post method encodes this data in
>what is know as urlencoded form. The variant used is the one that
>defines the '&' (ampersand) as a separator so if we have in the case of
>a get :
>// http://www.domain.com/page.asp?name=john&status=single
>this should be parsed as two groups of name value pairs with the
>ampersand acting as the separator.
>Now using the same decoding principal what should :
>// http://www.domain.com/page.asp?&name=john&status=single
>parse to ?
>Well the correct answer is a set of three pairs of (variable name,
>variable value). The first group is an empty pair the second is
>(name,john) and the third is (status,single).
>If you try parsing a query like the one above with perl you will get
>these results as would be expected from something as stable and reliable
>as perl.
>Now sending this type of query to asp is something else.
>ASP decides that this is a group of two pairs the first one (&name,john)
>the second (status,single).
>Notice how ASP chokes while parsing the first '&'. But this is something
>that should be considered quite normal, after all ASP originates from
>Microsoft...
>Enough on this...
>The same tech note also states :
>"...Therefore, a "dummy" variable could be created in the Flash movie
>whose name would be prefixed by the extra ampersand when passed...."
>and "...this should be experimented with, due to the complexity of some
>Flash projects and some server-side scripts. ...".
>This advice is very good and should be given in a more positive way.
>Why the alert ? Let's see when would this not work...
>OK let's say the asp script counts the number of variables passed ok
>this could be a problem , but it is easily solved and if the scripter
>knows enough asp to implement a variable count routine he also should
>know how to adapt it...
>Sometimes it's not what's said it's the way it's said.
>
>.redstar.
>
>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> To unsubscribe or change your list settings go to
>http://www.chinwag.com/flasher or email helpatchinwag [dot] com
>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpatchinwag [dot] com


Replies
  Re: flash and asp (was FLASH: 4.0r26 HAS, Cheri Harder

[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]