PDA

Click to See Complete Forum and Search --> : mac or pc test in standalones!



autoplayer
08-16-2000, 11:57 PM
Im sure someone has already figured this out, but I was so excited I had to share...
Find out if you're swf standalone is running on a pc or a mac:
Simply put a text file in a folder that does not have the originating swf inside it(myfolder\test.txt), then put pc=true in it.
Then, just outside that folder, put your ostest.swf file with this code:

LoadVariables("myfolder\test.txt",0)
If pc eq "true"
Set Variable "os"="pc"
Else
Set Variable "os"="mac"
end if

Note, it is very important that you use the backslash "\" as opposed to the forward slash, macs and pcs can both deal with the forward slash, but only pc's will load a file in an adjacent folder if you use a backslash...
Also, I have only tested this with OS 8.1 and Windows98 so far.

Anyway, hopefully that will help someone..
Ryan Cameron
http://www.northeastmagic.com
free flas:
http://www.autoplayer.com/avma