System.capabilities.language Doesnt Work?
Hi together,
i tested the
System.capabilities.language;
I tested it on an english system, but evey time i got "de".
Why?
Download exe+fla
Can anybody help me or test the system.fla?
Thanks
FlashKasper
FlashKit > Flash Help > Flash ActionScript
Posted on: 07-15-2003, 06:28 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
What Does System.capabilities.language Return On Your System?
I am working on a multi-lingual web site that automatically detects the user's OS or browser language by using System.capabilities.language .
Since I am running a german OS/browser, this returns 'de' in my case, but I wonder what it returns on other systems (english, french, spanish etc.)
To find this out, please copy and paste this code into a Flash doc and see what it says:
trace( System.capabilities.language );
Thx!
Mike
System.capabilities.language
Here's my problem. I use the System.capabilities.language to determine te users language. The outcome is assigned to a variable 'l1'. I need to use an if statement f.e. :
if (l1="en") {text1="Welcome"}
else
if (l1="fr") {text1="Bienvenue"}
I can't seem to get the above as right, can anyone help me out.
Thks,
Smalco
System Capabilities
I want to use the system.capabilities object to get the screenresolutionX and screenresolutionY.
Then I want to use these to scale my movie accordingly. Now how is that to be done?
System.capabilities.os
Is there a way to make a MC happen only if the user is on a PC.
I think I can do this with the system.Capabilities.os command
but what will I have to input to cover all the Windows OS ??
System Capabilities
Hi everybody
why does'nt this code work:
trace(System.capabilities.screenResolution.x)
I can't understand it, because all others system capability things worked.
Thanks
Max
System.capabilities....please Help
Myabe I'm doing something wrong or I didn't understand fully the System.capabilities thing but I do have a problem here and don't understand why, so if you can help would be great!
I've made a movie that has to do something as soon as a sound is played. So I have used a "soundComplete" function and it works as hell as long as you have an audio card installed on your machine. The troubles is to find a solution for those user who don't have any audio card installed, and I thought that the "hasAudio" capability will come handy but it's not. Apparently I've got a "true" as answer even on a computer that hasn't got any audiocard on. How is it possible??
Thanx for your time
Giano
P.S
Ok got it! It seems that I made a mistake, so the "hasAudio" is useful just to know if the player installed has audio capaibility, right? So my question is, is it possible to know if an audio is played or not on a movie?
System.capabilities.os
Hi there!
Could somebody explain why, as I am running Tiger 10.4.11, System.capabilities.os returns "Mac OS 10.4.9"?
Many thanks in advance.
Best regards,
Gerry
System.capabilities.screenResolution.x
System.capabilities.screenResolution.x and System.capabilities.screenResolution.y
Can these actionscripts actually alter the size of somebodies PC resolution size, or does it only refer to the Flash movie itself?
Also, what is an example piece of actionscript using these scripts?
System.capabilities.screenResolution
Has anyone been able to use:
System.capabilities.screenResolution.x (and .y) ?
I think the Flash MX developer fell asleep at his desk and forgot to write it!
It doesn't even highlight the word (screenResolution) when I type it in to the Actions window,it doesn't even highlight it. I tried looking for Tech notes on Macromedia's site - no mention.
H E L P ! ! ! !
What I actually want to do is create a movie that fills the screen, but maintains a constant resolution. I' m using javascript to create a window that fills the screen with no scrollbars. The flash Movie is very big, and I want to work out the top-left rectangle that is visible. Maybe someone knows another way to do this? It's for my online operating system:
http://www.i2genius.com/coreos/core.html
Trace System Capabilities
trace(System.capabilities.screenResolutionX);
trace(System.capabilities.screenResolutionY);
Someone was kind enough to give me the above code so that I could determine a users screen resolution. What I need to do is open various websites depending on what the returned values are. If the resolution turned out to be 1024 x 768, how would I make it open page www.go.com/1 for example? What would I include to add a second option?
Thanks so much... total n00b here.
System.capabilities.screenResolution.x
I just can't get this value System.capabilities.screenResolution.x or .y display right. I get undefined all the time. All the other System.capabilities work just fine. Can anyome tell me why and what can I do?
Thanks!
Help Bug In System.capabilities.screenDPI?
I'm writing a piece of ActionScript that changes the font size of a text field based on a computer's settings. To keep track of the system settings, I put in the following debugging code:
Code:
for (var prop in System.capabilities) {
trace(prop + " = " + System.capabilities[prop]);
}
For a time, all was well in the kingdom. Whenever I modified my computer's screen resolution, things would show up when I tested the movie. By default, I have my monitor set at 1920x1200, and a screen DPI (i.e. PPI) of 120. And these values were showing up properly whenever I tested the code/movie in Flash. But a darkness in The Force was rising on the horizon... I next tried modifying my screen DPI from 120 to 96. When I next tried to test the movie, the System.capabilities.screenDPI property suddenly showed up as being 72!!! I thought it might have been because I hadn't rebooted my reboot-philic Windows XP machine, so I shut down Flash MX and rebooted. When my computer came up again, sure enough, the text under my desktop icons was microscopic; but when I tried testing the movie in Flash, it was still showing up as 72. I tried changing it back to 120 and rebooting again, hoping that my computer and/or Flash just "hiccuped." However, the disturbance to The Force was too great. No matter how many times I tried changing my screen DPI, rebooting, and testing the movie, screenDPI was now "stuck" at 72. I also tried modifying the screen resolution again, but sure enough, screenResolutionX and screenResolutionY were still behaving properly. I also checked to see if it might have something to do with version of Flash Player that I have on my computer, but I have version 7.0 r19 installed (which is the latest version, I believe). Has anyone else ever encountered this problem? Does anyone know of a solution?
'System.capabilities', Conflicts
I keep on getting this error message. If I publish the file twice, it is ok.
..Local SettingsApplication DataMacromediaFlash 8enConfigurationClassesFP8Systemcapabilities.as: Line 7: The name of this class, 'System.capabilities', conflicts with the name of another class that was loaded, 'System'.
{
running Flash 8 on windows, although this occurs on the Mac too. Any help would be appreciated. I googled for this problem and found another unsolved case: http://www.actionscript.org/forums/archive/index.php3/t-86822.html
System.capabilities.screenResolutionX
How do I go about getting the screen resolution of a multi monitor setup?
I have an extended desktop on my laptop that is 2560 x 768 in total and yet
System.capabilities.screenResolutionX returns 1280.
Am i doing something wrong or is this just not possible?
Thanks
System.capabilities.colorDepth?
Is there a way to check the client PC's color depth similar to System.capabilities.os, etc.?
The System.capabilities.color is the most worthless object EVER. Heh.
System.capabilities.screenResolutionX
Hello,
Regarding System.capabilities.screenResolutionX in FMX, how would I achieve a movie clip on my stage to automatically alight to the left of the screen/browser depending on the viewers screen resolution?
Many thanks for the help...
System.capabilities.colorDepth?
Is there a way to check the client PC's color depth similar to System.capabilities.os, etc.?
The System.capabilities.color is the most worthless object EVER. Heh.
Help With System.capabilities.screenResolution.x
Hello all,
I am trying to write some script that will let me know the current screen resolution, i try something like this, but it doesn't seem to work:
myvar = System.capabilities.screenResolution.x;
Anyone have any ideas?
Thanks in advance,
Lumstar
______________________________________
And The Star Continues To Shine....
Issue With System.capabilities.hasAudio
hi all,
just have a quick question for you.
i am using the System.capabilities.hasAudio to test if the system has audio capabilities. i have a windows nt 4 computer that does not have a proper sound driver installed and thus could not play sounds yet it returns true when i use the script.
any ideas? does anyone have another script to test audio capabilities of the pc/system?
thanks
Adding A Property To System.capabilities
hi guys,
can someone tell me how to add a property to the System.capabilities class?
i made a function to calculate the flash version as a number (since System.capabilities doesnt) and it returns the version as a number: 7, 8, 9 etc..
im really not sure how to do this...should i create another class? one that extends or something, or use prototype...? im really just a beginner when it comes to classes so some help would b appreciated!!!
Parsing System.capabilities.version
I want to display just the version number like
"7"
when using System.capabilities.version. But it gives me
"WIN 7.0.19.0"
I tried parsing it like
Number(System.capabilities.version)
But we all know what happens there (Nan). So is there a way to get the "7" out of that string without too much trouble?
Thanks!
System.(..).language
Hi,
Is there any way to read the country from which the user is viewing the swf? I've read in LiveDocs that, System.(..).language outputs only the language of the OS in Flash Player 7++, not the users country code.
http://livedocs.macromedia.com/flash...=00002061.html
I need this in order to further automate my site, rather than nag the user with tick boxes etc.
Thx.
System Language Detection
I'm trying to create a feature
that does the following action:
1. Detects the user's system language
2. if it's english it goes to frame No. 2 (for example)
if it's french it goes to frame No. 3 etc.
I'll need it to work also with hebrew, arabic and more...
I'm not trying to create a Multilingual site.
I just want different users (throuout the world)
to see different graphics and content.
Does flash can detect the system language
and do something with it ? ....
Any help will be gratefull
Providing A User-defined System Language
I have ask a day before how to define system language, and I didn't found any solution. So googling is good thing .
I think the easy way for beginers and for noncoders to make a multilanguage is to use string panel. It makes xml's and you can add custom language . String panel is designed to set language from system language, but I found a "hack" that allows you to set manually language. link
Here is a tut in livedocs how to use String Panel.
I had problem, I solve it and I think that is good to share it
gotoAndFlak();
Button Works, Doesnt Work, Works, Doesnt Work With Each Click
I have this code on a button
on (release) {
gotoAndPlay("smokeleft");
}
that obviously takes the viewer to a frame labled "smokeleft". At that frame there is a stop action and a MC with an instance name of "smokeleftmc"
I've followed this procedure with two more buttons and MC's, smoke and smokeright.
If a button is clicked once, it works perfect. However, if the button is clicked a second time, BEFORE one of the other two buttons is clicked, the play head will not trigger the MC again, rather it will move forward one frame (I assume it would move forward more if there wasn't a stop action).
If the button is clicked once, then a second button is clicked, then the first button is clicked a second time, it works exactly as designed. The only time there is a problem is if one button is clicked twice in a row.
How do I solve this? Thanks
Why Doesnt This Work ?
onClipEvent (mouseMove) {
if (_root.test._xmouse <= 0 or _root.test._xmouse >= 601) {
_root.gotoAndPlay("close");
} else {
_root.gotoAndPlay("open");
}
}
onClipEvent (mouseMove) {
if (_root.test._ymouse <= 0 or _root.test._ymouse >= 201) {
_root.gotoAndPlay("close");
} else {
_root.gotoAndPlay("open");
}
}
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
Still Doesnt Work
I have this code in a empty mc on the stage.... but it does not work!!!! argh. why?
onClipEvent (enterFrame) {
if (_root.MoviClipSlide._x == 300) {
_root.empty.attachMovie("MoviClipText", "MoviClipText_1", "3");
trace("**** ****");
}
}
Why Doesnt This Work In MX
Ok i have this working when i pulblish to flash 5 player but when i do it for the flash 6 player it doesnt work.
Code:
onClipEvent (mouseUp) {
if (Selection.getFocus() == "_level0.input1") {
_root.input1 = "";
} else if (Selection.getFocus() == "_level0.input2") {
_root.input2 = "";
} else if (Selection.getFocus() == "_level0.input3") {
_root.input3 = "";
} else if (Selection.getFocus() == "_level0.input4") {
_root.input4 = "";
} else if (Selection.getFocus() == "_level0.input5") {
_root.input5 = "";
} else if (Selection.getFocus() == "_level0.input6") {
_root.input6 = "";
}
}
Its part off my mail form so that when u click the text field it clears it automaticly for u and the code is on a blank MC but as i said it doesnt work when publishing to flash 6 player anyone got any ideas as to why ??
Thanks, Mental
Ok..why Doesnt This Work? Help Please
I have an swf movie that loads another swf movie in it. The loaded movie has buttons and everything but when I click on them nothing happens. When I open the file by itself and then click on the buttons it actually works. Any reason why this is happening??
Why Doesnt This Work..?
i have followed the directions of this preloader
and it is still not working..
i am doing this to learn
and so far...im not having any luck
i have attached the fla. in a zip. along with the
preloader tutorial.
can someone tell me what im doing wrong..
it would be a huge help to me..
on my quest to becoming as good as some of you
Y Doesnt This Work?
im trying to make a simple fade, for an image contained in placeholder_mc, here is the code im using, but i cant see why it is not working:
while (picalpha <100) {
setProperty(placeholder_mc, _alpha, picalpha + 5);
continue;
}
i initially use a getproperty line and set that as the picalpha,
shouldnt that just increment the alpha value by 5 until it reaches 100??
If u have any idea, please let me know, or another way i can make a simple alpha fade, thanks
Lee
Why Doesnt This Work
button1.onRollOver = function() {
toolstart();
_root.tooltip.bubble = Title1;
};
why doesnt this work from within a movie within another movie.
title1 is the text to appear inside a speech bubble called bubble.
tooltip is the movie that the bubble movie is inside.
any ideas apply within
Why Doesnt This Work?
if (shooting =True || Key.isDown(Key.SPACE)) {
_root.man.arms.gotoAndPlay("attack");
}
i have it set so that shooting = true and on the first frame of "attack" shooting = false so you can not double shoot.
Why Doesnt This Work?
I have a small flash movie that preloads and plays a sound loop.
But when the user goes to the next page the music plays even when they have turned it off. Ive tried using shared objects to drop a cookies to remember the volume setting but with no luck any help would be apprieciated
Here is the code im using in mx 04 pro
Frame 1
mySound = new Sound();
mySound.attachSound("0659");
// open and/or create a cookie
_global.cookie = SharedObject.getLocal("volume");
// off button
on (release) {
mySound.setVolume(0);
_global.cookie.data.volume = mySound.getVolume();
_global.cookie.flush();
}
thanks
Why Doesnt This Work?
I have a preloader function which reports the progress of a movieclip which is loading. In Internet explorer it works fine, however in mozilla firefox it doesnt. the number is reported back as NAN.
Can be seen at MI-7
my preloader function does this:
code: //create a new movieclip to load
//the external movie into
//check the download status of the external
//movie once every frame
function loaderFunction() {
_root.holderMc.hldMc.unloadMovie()
_root.holderMc.hldMc.removeMovieClip();
if (movieToLoad=="intro1.swf") { _root.opener_mc.gotoAndPlay(2) }
_root.holderMc.createEmptyMovieClip("hldMc", _root.holderMc.getNextHighestDepth())
//load the external movie into the new movieclip
_root.holderMc.hldMc.loadMovie(_global.serverAddre ss+_root.movieToLoad);
this.onEnterFrame = function() {
//trace the percentage of the movie that has loaded
percent = (_root.holderMc.hldMc.getBytesLoaded()/_root.holderMc.hldMc.getBytesTotal())*100;
if (!isNan(percent)) {
trace(percent+"% loaded");
if (percent == 0) {
percent_display = "";
} else {
percent_display = Math.ceil(percent)+"% LOADED.";
}
this.loadbar._visible = true;
this.loadbar._xscale = percent;
if (percent>1) {
this.reelmc._visible = true;
}
} else {
trace("0% loaded");
}
if (percent == 100) {
_root.holderMc.hldMc.play();
delete this.onEnterFrame;
this.reelmc._visible = false;
percent_display = "";
this.loadbar._visible = false;
this.mi7Logo._visible = false;
}
}
}
thanks
This Doesnt Work
this isnt working
PHP Code:
stop();
if (place = 0) {
gotoAndPlay(22);
}
if (place > 0) {
gotoAndPlay(3);
}
if (place < 0) {
gotoAndPlay(3);
}
could ne one help me?
It DOESNT WORK
I have a movie and within that movie i have other nested movies, maybe one or two.
I am trying to load pictures into the lowest movie clip.
the code is as follows:
stop();
my_mcl = new MovieClipLoader();
my_mcl.onLoadComplete = function(movieClip) {
trace("Loading is done for the movie clip "+ movieClip);
};
my_mcl.onLoadError = function(movieClip) {
trace("Error: " + movieClip+ " did not load.");
trace("Your load failed for the movie clip "+ movieClip);
};
// Set up button actions
next_btn.onRelease = function(){
nextFrame();
}
prev_btn.onRelease = function(){
prevFrame();
}
my_mcl.loadClip("photos/me-illustrated.jpg","jpgHolder");
name = "bright blue water";
Its simple and its from a tutorials you can find anywhere on the web, but it doesnt seem to work when i try and put it into my movie. Whats the problem anyone know?
Why Doesnt This Work
Should be simple.
I am sending data from flash to an asp page that sends mail. The mail sends but has nothing in the body. It seems like my varuables are not being sent. Any help would be great.
code:
stop ();
function sendForm () {
my_lv = new LoadVars ();
my_lv.fcontact = _parent.contact_txt.text;
my_lv.fcompany = _parent.company_txt.text;
my_lv.fphone = _parent.phone_txt.text;
my_lv.fsender = _parent.sender_txt.text;
my_lv.finquiry = _parent.inquiry_txt.text;
my_lv.send ("http://www.tm-g.com/forminfo.asp", "POST");
gotoAndPlay(23);
}
send_btn.onRelease = function () {
if (contact_txt.text == "" || company_txt.text == "" || phone_txt.text == "" || sender_txt.text == "" || inquiry_txt.text == "") {
gotoAndStop(22);
} else {
sendForm ();
}
};
DOESnT WORK
i copied the given html that i was given, i pasted it onto my site, but it doesnt work!!!!!!!!!! i dont get it
Why Doesnt This Work
im having a MC work sometime and not others check it out. click on a link such as "info" sometimes it goes to the info label and stops other time it glitches and goes to "info" and keeps going thru all the other sections.
http://www.rocketinnovations.ca/Karl/test.html
the code im using is
on (release) {
_root.gotoAndStop("info");
}
on (rollOver) {
_root.button2.gotoAndStop(2)
}
on (rollOut) {
_root.button2.gotoAndStop(1)
}
Anyone Know Why This Doesnt Work?
pretty simple AS but I cant get the tween to work
PHP Code:
//Tweens//----------------
import mx.transitions.Tween;
import mx.transitions.easing.Regular;
import mx.transitions.easing.Elastic;
function dupMovie(){
for(i=0; i<20; i++){
var mc = ["smoke"+i];
duplicateMovieClip(smoke, mc, i);
setProperty(mc, _x, Math.random()*550);
setProperty(mc, _y, Math.random()*400);
setProperty(mc, _alpha, Math.random()*50);
var moveSmokeX:Tween = new Tween(mc, "_x", Elastic.easeOut, mc._x, Math.random()*550, 4, true);
var moveSmokeY:Tween = new Tween(mc, "_Y", Elastic.easeOut, mc._Y, Math.random()*550, 4, true);
}
}
smoke.onPress = dupMovie;
Why Doesnt This Work?
Code:
on (release) {
gotoAndPlay(nextFrame);
}
but this works fine
Code:
on (release) {
gotoAndPlay(5);
}
Is it a Flash 8 thing?
Thanks
I Just Don't Get Why This Doesnt Work?
i need a code that will make the frame change if the variables value falls to 0 or below, this is the current code that dont work
remaining = 1000;
if (remaining =< 1) {gotoAndStop(101);
}
could someone plz fix it
thanks
For Doesnt Work?
hi guys can anybody tell me why this doesnt work?
I try to display a text in a textfield, depending on which button is klicked.
The script creates as much buttons as the number of the xml Elements.
But i get this error each time I click a button:
TypeError: Error #1010: A term is undefined and has no properties.
at MethodInfo-539()
can anybody help me? if I use a number instead of the "i" here:
ActionScript Code:
trace(dieXML.Sorte[i].Name);
textfield.text = dieXML.Sorte[i].Name;
it works.
Thanks a lot
ActionScript Code:
stop();
var myRequest:URLRequest = new URLRequest("Sorten.xml");
var myLoader:URLLoader = new URLLoader();
var dieXML:XML = new XML();
myLoader.addEventListener(Event.COMPLETE, fertigGeladen);
myLoader.addEventListener(IOErrorEvent.IO_ERROR, EIOError);
myLoader.load(myRequest);
function EIOError(myEvent:IOErrorEvent):void {
trace("feehler");
}
function fertigGeladen(event:Event):void{
dieXML = new XML(event.target.data);
var SortenAnzahl:Number = dieXML.Sorte.length();
trace(SortenAnzahl);
var i:Number = 0;
for(i=0; i<SortenAnzahl; i++){
var knoepfle:SortenButton = new SortenButton();
knoepfle.x = 10;
knoepfle.y = i*22+20;
knoepfle.buttonMode = true;
this.addChild(knoepfle);
knoepfle.addEventListener(MouseEvent.CLICK, actions);
knoepfle.id = i;
function actions(event:Event):void{
trace(dieXML.Sorte[i].Name);
textfield.text = dieXML.Sorte[i].Name;
}
}
}
Why..why..why.. It Doesnt Work?
Hi everyone
can any one figure out what am I doing wrong, I have been working on this simple thing for 2 days now and I am getting nuts: what I am trying to do is to make paperblock appear when I press button1. when I press button 2 make paperblock2 appear and paperblock1 disappear
the stage : 2 buttons, 2 paper blocks (paperblock1 and paperblock2movie clips as ), movie clip called actions (off the stage for initialization purposes only).
I start by intializing (I created a special movie clip, named actions, that contains the code):
onClipEvent (load) {
_root.paperblock1._visible=false;
_root.paperblock2._visible=false;
var changer;
}
(Changes the paperblocks to invisible + define a variable named changer)
then I put inside button 1
on (release) {
_root.actions.changer = 1;
}
and inside button2
on (release) {
_root.actions.changer = 2;
}
then I put in paperblock1
onClipEvent (load) {
if (_root.actions.changer=1) {
_root.paperblock1._visible = true;
} else {
_root.paperblock1._visible = false;
}
}
and in paperblock2
onClipEvent (load) {
if (_root.actions.changer=2) {
_root.paperblock2._visible=true;
} else {
_root.paperblock2._visible=false;
}
}
Thanks
Yoram
|