Hear Ye! Since 1998.
Please note: This post is at least 3 years old. Links may be broken, information may be out of date, and the views expressed in the post may no longer be held.
5
Aug 03
Tue

Flash Question

Asking on behalf of a friend: Anyone know Flash? Does anyone know how to stop a Flash file if it detects the computer it’s running on is a certain platform (like a Macintosh)? Basically if I have a Flash file that I run independently from a CD-ROM, I want it to check the platform it’s running on. If it’s a certain platform, I want the run to stop. Otherwise the flash file will play. Solutions would be very much appreciated.

This post has 3 comments

1.  Fuzzy

Does it have to be done in the flash file it’s self? You could have a html page with some OS detect (say os_string() in cgi) code, then launch the flash file if != to mac….

2.  s

Perhaps you could try something like this:

var os = System.capabilities.os;

switch (os) {

case “Windows XP”:

gotoAndPlay(2);

break;

default:

stop();

}

Just change the switch() as needed – maybe use a substr() or indexOf() on ‘os’ to match more broadly – e.g. differentiate Windows from Mac systems regardless of versions.

Hope this helps! :)

3.  Stu

Many thanks S, I think that’ll do the trick!

Add a Comment

You must be logged in to post a comment.