View Full Version : passing vars to a script on a mac?????

04-05-2001, 08:53 PM
I'm implementing a tracking system for our flash website. Everytime a movie clip (menu item) gets loaded, it increments a number in the database corresponding to that menu item (as well as tracking ip, date, time, browser.)

My problem is that it just doesn't work on a mac, but works fine on pc (both NS and IE).

in flash:
tracking = "news";
loadvariablenum ("http://blah/track.asp", 0, POST")

result - IE and NS on pc work fine, but both on Mac get a "HTTP ERROR 405 method not allowed"

in flash:
loadvariablenum ("http://blah/track.asp?tracking=news", 0)

result - PC - IE/NS work fine. Mac - NS - directory listing denied, IE - opens new window with the main flash piece (and neither update the db)

I've tried every combination of loadvariablesnum, loadvariables (which DOES NOT work on PC interestingly enough), GetURL, sending via POST, sending via GET, and putting the "?tracking=news" on the end of the url (and not sending vars)

most combinations work on the PC (although some cause IE to go to a blank browser window (the track.asp file). All combinations (except the following one) DO NOT work at all on the mac (do not update the db), and either produce a "dir listing denied" screen, a "HTTP error 405" screen, open a new window, or just do nothing.

The only combination that works across on both browsers and both platforms is (and the only combination that works, period, on the mac):

in flash:
GetURL ("http://blah/track.asp?tracking=news")

this works and updates the db like it should, but in IE on both Mac and PC, it goes to a blank browser window (the track.asp file).

Does anyone have any idea how this can be done (so that it doesn't open a new window, or change to a different url (ie, it needs to stay in the flash movie that was loaded.)

Is it something about macs? Is another way of passing the variables needed?


04-08-2001, 10:44 AM
By first, I apologize for my ugly english.
I'm writing from Italy. (but it's not a good reason I guess)
I have had the same problem some time ago, looking for a suggestion on macromedia.com I find a 'note' that explain thath strange Mac's behavior.
I don't repeat the long boring 'note'...in few words it says you must use loadVariablesNum (like on pc) but you must send variables with GET, because POST doesn't work with Flash in both browsers on Mac.
Is it all'right? Does everithing works fine now?
I don think so, if you know how 'GET' works, you know the troubles you'll find using it.
I stop writing now. I amaze if you'll understand just the 20% i wrote.


04-09-2001, 03:35 AM
using post does work in mac (atleats using the latest flash plugin) the problem lies in using IE vers <= 5 with mac. there is a known issue passing external vars between the two but, like i said, i have had alot of luck using the lastest plugin. and the passing vars issue works fine using post with NS on Mac. you can test my stuff on mac if you like @ http://www.aspalliance.com/bellis . i tested all my examples last week and they all worked on mac.
good luck

04-09-2001, 09:36 PM
Makkox - understood 100%! unfortunately, for me at least, the LoadvariableNum and Get combination still doesn't work on Mac.

Edeveloper - I went to your page (on the mac) and with both IE and Netscape got a page saying "if you see this then either you need to update your flash plugin or you're on a mac".......

so I guess what I have to do is check the platform and browser, and then not call the asp if it's a mac with an older plugin version....?
Any idea what version number (and higher) is ok?
I read you can get the version number in Flash from the (hidden) variable "version".

Is there ANY other way to get info out of a flash file to some destination that will work 100% of the time on all browsers/platforms/plugin versions?
- writing to a text file?
- passing vars to javascript on the page in which the flash is embedded? (but then how to pass these to asp without opening a new window or changing the current window)?
- the flash XML functions?
- anything else?????

04-09-2001, 09:40 PM
i guess you didn't look past the opening message. you get the ugly page cause you are on a mac or you need the plugin. underneath the examples are listed and you can try them.