A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: Query string with flash lite, possible?

  1. #1
    Junior Member
    Join Date
    Mar 2010
    Posts
    3

    Query string with flash lite, possible?

    I searched the net and Adobe website and couldn't find any information on the subject. I'm trying to figure out if this is something specific to the Japanese market or all flash lite player react the same way. I will explain the issue.

    In flash, you can pass variables as a query string like this:

    http://www.mysite.com/myFlashFile.swf?val=1&val2=2 (etc)

    Those variables will end up on the root time line. After doing some testing, I cannot receive any of those variables if the version of flash lite is lower than 3.0. It happens for Docomo, AU, Softbank carrier, all japanese ones. If I test with the Docomo emulator, I can reproduce this behavior.

    Does this behavior is by design?

    Thank you for any information on the subject.

  2. #2
    Moderator
    Join Date
    Apr 2001
    Location
    Akron OH, USA
    Posts
    4,841
    For whatever reason, the parsing of query strings in the url of an embedded Flash player did not work on these older FL versions in the Japanese market. Though it sounds as if they fixed this with FL3.
    aviarts.com - web development and flash development

  3. #3
    Junior Member
    Join Date
    Mar 2010
    Posts
    3
    So this is specific to Japan then. If I figure out the cause, I will update this thread. Thank you for the comment.

  4. #4
    Member
    Join Date
    Nov 2000
    Location
    South East UK
    Posts
    91
    This got changed in one of the later Flash Player releases as it was deemed a security risk - I used this method years ago to make a nice web-page text title module that took params in so I wasn't stuck using crap browser fonts all the time on a page.

    What you can do Banashaku is send the query to a normal web-server instead via your application as it runs using PHP or .NET
    e.g. http://www.domain.com/feedname.php?val=1&val=2

    This acts as an intermediate layer enabling you to act on the params, for example you might use this to build a query to interrogate the database and return values to the above to do something in your movie.

    This is basically conventional web POST / GET methodology - you can even use this method to return XML data that even Flash 2.1 will understand easily.

    Don't forget that a lot of devices are still Flash Lite 1.1 and 2.1 - not many devices are Flash Lite 3 yet, as Adobe have been slack in making functional .CAB installers for devices recently - even though FL3 has been out quite a while now!

  5. #5
    Junior Member
    Join Date
    Mar 2010
    Posts
    3
    I'm not sure how your approach give back the information to the flash file. Could you elaborate on the subject?

    I will try to elaborate on what I did to the extend I have the right to disclose about the project. We do web analytic in Japan. Customers want to do it for flash but there is no easy solution for mobile for static content (lack of javascript, cookie etc). This mean a server without php, just pure html. So a module on the server re-write the url with a session id when accessing flash content, same thing for links inside html pages.

    The flash file must receive those parameters in some way. In fl2.0 and higher, I'm now parsing the _url so I can extract all the information I need. This fixed the issue. But for 1.1, there is no such thing as _url object (unless you play 1.1 content on a newer player but that's another story...).

    For now we're dropping 1.1 support because I couldn't find a way to give back that generated information to the flash file. Maybe I should change my question to: Is there any other way to give 1.1 flash content information from the beginning? If I request information from the flash file, for a landing page it could be fine because I will receive a new id but if I come from a html file, the id will differ and it will cut the current session.

    The current market trend for flash 1.1 in Japan is very low but still, if I can support all customer, the better.

  6. #6
    Member
    Join Date
    Nov 2000
    Location
    South East UK
    Posts
    91
    Data comms in Flash lite is the same as POST/GET HTML forms - have a look at some online tutorials about those first before attempting it in Actionscript, then it will make more sense. Basically the app captures the data, sends it to the server, then the server sends a relevant response to the app.

    Flash Lite 1.1 really is a very basic early version of Full Flash, so you'll be lucky to do anything "Web 2.0" with it. I'd say it would be hard to do anything more than games and basic self contained apps.

    Versions 2.0+ as you found are more suitable for complex applications that talk to a server.

  7. #7
    Member
    Join Date
    Nov 2000
    Location
    South East UK
    Posts
    91
    Flash Lite 1.1 is basically Flash 4
    Flash Lite 2.0 is based on Flash 7
    Flash Lite 3 is based on Flash 8

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