Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




System.usecodepage=true; Doesn't Work



Hi All,

I've visited here: http://www.kirupa.com/developer/mx/i...characters.htm but I still find that some characters (mostly capital letters and html formatted items) don't appear in my dynamic text fields.

Text is loaded from a txt file into a text field with characters embedded (the first four options - which includes capitals) but I'm getting weird results.

See here: http://www.thepaddingtonbeautyroom.c...ting/tpbr.html

Thanks
C



KirupaForum > Flash > Flash 8 (and earlier) > Flash MX 2004
Posted on: 12-15-2004, 12:11 AM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

System.usecodepage=true; Doesn't Work
Hi All,

I've visited here: http://www.kirupa.com/developer/mx/i...characters.htm but I still find that some characters (mostly capital letters and html formatted items) don't appear in my dynamic text fields.

Text is loaded from a txt file into a text field with characters embedded (the first four options - which includes capitals) but I'm getting weird results.

See here: http://www.thepaddingtonbeautyroom.c...ting/tpbr.html

Thanks
C

System.useCodePage = True; ? Possible Bug?
I,ve been told that this line:
system.useCodePage = true;
Is telling the OS to use the non-English letters in the system when you are loading variables from text-files. I am from Norway, and here we use letters like Æ Ø Å. On Macromedia's site they say that you only should use this once in the movie, but all of my variables does not display properly. Has anybody else experienced this problem, or does anybody have any suggestions?

Happy Flashing,
Metaman

System.useCodePage=true; ?
i´ve made a flash script that sends mail with user name, article munber etcetra.. It sends the variables to php script that sends the mail... it works perfekt in flash5. but in mx spesial sweadish characters dont work,,, i cant get System.useCodePage=true; to work eigther... what am i doing wrong.

[AS3] System.useCodePage = True
This is my AS2 code:

PHP Code:



System.useCodepage=true;var xml:XML = new XML();xml.ignoreWhite=truexml.load("http://www.flasherblog.com/yeni/read/dergi_oku.php");//xml.onLoad = function (ok) {    trace(xml);} 






When you test there is no error.

This is the AS3 version of that code:

PHP Code:



System.useCodePage=true;var testXML:XML = new XML();var urlLoader:URLLoader =new URLLoader();urlLoader.load(new URLRequest("http://www.flasherblog.com/yeni/read/dergi_oku.php"));urlLoader.addEventListener(Event.COMPLETE, onXMLLoad);function onXMLLoad(e:Event):void {    testXML = new XML(urlLoader.data);    testXML.ignoreWhitespace=true;    trace(testXML);} 




When I test it, I am getting this error:


Quote:




TypeError: Error #1090: XML parser failure: element is malformed.
at Untitled_fla::MainTimeline/onXMLLoad()
at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunctio n()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/flash.net:URLLoader::onComplete()






What is the problem? How can I solve this?

JÄTTEproblem Med System.useCodePage=true (åäö)
Jag har jätteproblem med system.useCodePage=true eller åäö om man säger så.
jag har en film (lagar.swf) där jag laddar in text på följande sätt:

onClipEvent (load) {
URL = "http://www.adress.se/sida.asp?cat=1";
stop();
this.loadVariables(URL);
}

Det funkar fint när jag publicerar filmen (F12) - och då har jag inte
stoppat in system.useCodePage=true änns!

Men om jag skulle ladda in filmen lagar.swf till en annan film:
loadMovieNum("lagar.swf", 1);

Då buggar texten ur - ser typ ut så här:
"Ny, samlad och sk�t milj�stiftning"
(Så ser det ut om jag laddar filmen från meny.swf)
eller så här:
"Ny, samlad och skärpt miljölagstiftning"
(Så ser det ut om jag laddar filmen från meny.swf som är inladdad i
default.swf)
Och det blir ingen skillnad om jag stoppar in system.useCodePage=true i
samtliga filmer?!.

Textenfel på olika sätt beroende på från vilken film jag laddar in filmen
lagar.swf?? Vad kan det bero på?

Uppbyggnaden ser ut så här:
level0 = default.swf
level1 = lagar.swf
level2 = main.swf
level3 = meny.swf - här ifrån laddar jag in lagar.swf till level1

I menyn (level3) laddar jag också in andra filmer som visar text
innehållande åäö osv och det blir bra, i den filmen laddar jag in texten på
följande sätt:
loadVariablesNum("http://www.adress.se/sida.asp", 1);
Där behöver jag inte heller använda system.useCodePage=true för att det ska
funka med åäö - men om jag inte loadVariablesNum till level1 utan till
level0 och publicerar (F12) då måste jag ha system.useCodePage=true
instoppad för att det ska funka.

Vad kan detta bero på och hur löser jag mitt problem med texten - speciellt
ÅÄÖåäö??
Vore tacksam om någon kunde reda ut detta för mig,


Best regards,
Spike

Problems With System.useCodePage=true;
I'm having a very strange problem with this.
My flash-files loads text from an database, and the most of the dynamic textfields are correct.
They shows special chars(norwegian: æ,ø and å) correctly.
But, in one of the swf's that loads into layer 30, the characters don't show up correct.

I use sustem.usecodepage=true on level0, first frame.

Anyone that have an idea for solving this problem?

Regards

System.useCodePage = True On Macintosh
Is there a workaround to get System.useCodePage = true;
to work on Macintosh?
Most annoying that it doesnt do the trick!

TextArea Editable - False/true ... Doesn't Work
well, either setting the textArea component manually to 'false' on the editable part of the parameters ... OR doing it via actionscript as the help files says:
code:
myTextArea.editable = false;


Both of these method's do NOT work ... as far as I've tested. Am I isolated? Or does MM know about it?

Thanks

System.useCodepage
i have problem with coding in input text field,
where must be placed?
It worked and now have problem with it.
I changed my code, but i cant find mz error



Code:
System.useCodepage

System.useCodepage
Hi

Is there a way to override System.useCodepage?
I want it to remain false even when I load a swf-file that sets it to true.

System.useCodepage ?
Does anyone know if I can change the value of System.useCodepage to true/false numerous times during a flash movie - or is this something that can only be set once at run-time ???

System.useCodepage That Bad?
I was having troubles loading some ASP variables into flash because they contained international characters (á, ã, ó). I tried using the server.URLencode(variable) asp function and saving as UTF-8 but none of this seemed to help me out.

I have read in many different places (moock.org for example) that System.useCodepage=true; should be avoided whenever possible, but in this case it fixed my problem. So I am wondering, is there a way around this(changing the code page) or should I leave it as it is? How bad is this?

Thanks,
ghjr

[AS F8] Use Of System.useCodePage
I just about had a heart attack trying to figure out why my dynamically loaded Greek letters would show up just fine the first time I'd go to my site, but be garbage the next time I'd visit. I tried everything: Embedded ALL the fonts, tried saving my XML in other editors, etc. The only thing that solved this problem was adding the following code to the top of my actionscript of the SWF.

System.useCodePage = false;

You can actually see the difference in flash when you test the SWF, change the boolean between true and false.

System.useCodepage That Bad?
I was having troubles loading some ASP variables into flash because they contained international characters (á, ã, ó). I tried using the server.URLencode(variable) asp function and saving as UTF-8 but none of this seemed to help me out.

I have read in many different places (moock.org for example) that System.useCodepage=true; should be avoided whenever possible, but in this case it fixed my problem. So I am wondering, is there a way around this(changing the code page) or should I leave it as it is? How bad is this?

Thanks,
ghjr

System.useCodepage And FP7
Hi There,

I have this script to send variables from a contact form to my email trough a PHP script and for it to send special characters I set System.useCodepage to true, it works fine but when I publish the swf with Flash Player 7.0 and AS2.0 it doesn't send me the special characters anymore... anyone knows why?

The script:

ActionScript Code:
on (release) {
    if (!Nome.length) {
        formStatus.gotoAndPlay("check");
    } else if (!Email.length || Email.indexOf("@") == -1 || Email.indexOf(".") == -1) {
        formStatus.gotoAndPlay("check");
    } else if (!Telefone.length) {
        formStatus.gotoAndPlay("check");
    } else if (!Mensagem.length) {
        formStatus.gotoAndPlay("check");
    } else if (!Assunto.length) {
        formStatus.gotoAndPlay("check");
    } else {
        loadVariablesNum("mail_form.php", "0", "POST");
        formStatus.gotoAndPlay("sent");
    }
}

System.useCodepage ?
Does anyone know if I can change the value of System.useCodepage to true/false numerous times during a flash movie - or is this something that can only be set once at run-time ???

System.useCodePage
It seem's to have a problem with the System.useCodePage = true; syntaxt it works fine when you read it in a projector but online (inside a browser) it dose not seems to work.

Also when you put your actionscript in normal mode it dose not seems to recognize the script.

Thanks for helping me out!

System UseCodePage In Mx2004
Hi,

i have a problem to pass variables from a flash mx 2004 form to a ASP page.

Whem I use the command:

System.UseCodePage = true;

in a flash mx 6 movie, the special characters were properly encode, but in the MX 2004 it didn´t work.

shold anybody help me?

thanks and regards.

System.useCodepage Not Working
guys:
I am using System.useCodepage = true; and is not working and dont know why. I cannot belive that using spanish charactera in flash would be so tuff damn!!.......How come ??????

Might be becasue I am loading movies into the mail swf?

Any clues guys?

Thanks very much in advance.

System.UseCodePage In MX2004
Can any one tell me why this actionschrips wont work in mx2004:

System.UseCodePage=true;

System.UseCodePage In MX2004
Can any one tell me why this actionschrips wont work in mx2004:

System.UseCodePage=true;

Problem With System.useCodepage
Hello all.

I'm making a flash movie and I wrote this at my first line of my movie: system.useCodepage = true; to view special characters from a external txt file on the movie, but it's doesn't works.

Im using actionscript 2.0

Please does anybody tell me whats wrong??

Thanks you.

An Inventory System That DOESN'T Work...
Hello... I'm having trouble getting a certain function in my inventory to work properly... here's what I have...

An Inventory System That DOESN'T Work...
Hello... I'm having trouble getting a certain function in my inventory to work properly... here's what I have...

TabChildren = False; --> TabChildren = True; Doesn't Work
i have a check box, that blacks out some textfields/enables the textfields.

when its clicked off

"tabChildren = false" gets called and it works, the textfields don't get tabbed through.

the problem is that i try to call "tabChildren = true" to re-enable the textfields but they dont get enabled.

Evals True But Still Does Not Work
here is the code I have. I have tried this in many different configurations with the same result. The statement will evaluate true but only display the text of the else statement. I have traced the variables, they all return proper values. I am soo lost.

chosenson


on (press) {
user = new Array("harry", "karen", "mine");
passes = new Array("mine", "hers", "too");
logged = new Array(_root.login.text);
passed = new Array(_root.pass.text);
i = 0;
while (i<user.length) {
equaled = ((user[i] == logged[0]) && (passes[i] == passed[0]));
if (equaled) {
gotoAndPlay("userCalendar", 1);
} else {
_root.message.text = "Username or Password invalid. Please try again. If you feel you are recieving this message in error, contact the webmaster";
}
i++;
}
}

[F8] This._lockroot=true; WON't Work
Hi,

I'm trying to lock the root of an mp3Player.swf that I load into a mc. The Mp3Player works good when its byItself, but when I add it to my Movie the button won't work.


N E suggestions?

Why _visible=true Does Not Work?
I have an horizontal sliding mc.When the target position is reached, I set the buttons to _visible=false, they are no more useful because the end of slider is reached.But then I want to set them to _visible=true when the slider changes the position back.
Everything works except _visible=true.
Can someone tell me why?


PHP Code:



import mx.transitions.Tween;
import mx.transitions.easing.*;
new Tween(mc, "_x", Bounce.easeOut, 1151, 0, 1, true);  
var target = 0;  
next.onRelease = function() {  
    target -= 770;  
    new Tween(mc, "_x", Strong.easeInOut, mc._x, target, 1, true);  
    if (target == -770) {  
        this._visible = false;
        trace(target)
    } else {  
        this._visible = true;  
    }  
};
prev.onRelease = function() {  
    target += 770;  
    new Tween(mc, "_x", Strong.easeInOut, mc._x, target, 1, true);  
    if (target == 0) {  
        this._visible = false;
                          trace(target)
    } else {  
        this._visible = true;  
    }  
}; 

Some.swf?parameter=true (does It Work?)
I tried and didn't succeded... Could the variables be posted into Flash aplication this way?

some.swf?parameter=true

Can it be done:

1) From .swf application? (eg. link inside .swf calls the same .swf but with parameter fullScreen=true. The parameter is then checked inside Flash and the fullScreen button is no longer visible)

2) From HTML?

Thanx!

If(true){ Doesnt Work?
I have a game, and I want it to be pausable, so I put all of the game's code into an if statement, and I noticed it malfunctioned. I then changed the if statement to if(true){ yet the code still didn't work properly. Putting code within if(true){ should be the same as not putting it in, yet the code acts differently! Does anyone know why?

Some.swf?parameter=true (does It Work?)
I tried and didn't succeded... Could the variables be posted into Flash aplication this way?

some.swf?parameter=true

Can it be done:

1) From .swf application? (eg. link inside .swf calls the same .swf but with parameter fullScreen=true. The parameter is then checked inside Flash and the fullScreen button is no longer visible)

2) From HTML?

Thanx!

How Do True/false Variables Work In As3?
Hello,

How do variables true/false custom variables work in flash?

For example, what I want to do is create a simple true=false variable that I can call on an if statement later.

For example:


Code:
Var1 = true;

if (!Var1)
{
Do this;
}
else
{
Do that;
}
I noticed that neither the "Var1 = true;" part or the if(!Var1) part worked in flash. I saw them somewhere as I was researching other stuff, but can't find an example anymore. Any help?

Thanks!

ForceSmoothing=true Does Not Work In Browser, As2
Hi all, i hope some of you could help me.

Im using moviecliploader and on loadInit event im setting forceSmoothing=true.
This seems to work as long as i keep wathing the movie by hitting +enter but as soon i watch the swf in browser the smoothiness is all gone. Also, shwn i trace the forceSmoothing property of the MC, it returns undefined.


Code:
public function loadBitmapSmoothed(url:String, target:MovieClip) {

var listener:Object = new Object();

listener.onLoadInit = function(mc:MovieClip) {

mc.forceSmoothing = true;

};


var loader:MovieClipLoader = new MovieClipLoader();
loader.addListener(listener);
loader.loadClip(url,target);
}
I am using that inside a class where i generate thumbnails.

Someone pls?

Flash Animation Doesn't Show Up On Some System
Hi,

On a website I'm working on (www.skycontrol.net), one of the flash animations (the one with the scrolling images) doesn't show up on some (a very small number) systems while the others (menu and buttons) do. These systems run very standard OS (XP)and software and the browser used is IE6. If someone could have a look at this and give me a hint, I'd really appreciate.

Flash Mx Trial Files Won't Work In True Version
gahh...

shiver me timbers...

i saved some files in the trial version of mx
and i tried to re-open them... but the stinking thing comes up blank.... no library files or nothing
but it's still saying that the file size is correct
if ya see what i mean

help me

Drop Menu : Rollovers/GetURL In A Movie Don't Work...and The SWF Doesn't Work In FF
My links/rollovers don't work in Mozilla and the dropdown menu part don't work (the rollovers and the getURLs) in any browser.

What's wrong with this??? I think it's something simple.
I've already tried:

Code:
this._lockroot = true;
I also tried writing the AS as:

Code:
one.title.text = "The Text";
one.onRollOver = over;
one.onRollOut = out;
function over () {
this.gotoAndPlay(2);
}
function out () {
this.gotoAndPlay(11);
}
one.onRelease = function(){
getURL("http://www.thelink.com");
}
...didn't work...

I hope someone can help!

Download the: Source File


(Lately I've gotten no help off this site and it's been very depressing because this site people used to be very helpful...I hope someone can change my mind)

This._lockroot Doesn't Work (combobox Components Won't Work)
I have a preloader (preloader.swf) which loads a form (offerte.swf).

I've put the this._lockroot on the "application" timeline on the first frame of the "Flash form application" (offerte.swf).
But the combobox components still won't work.

I had it working before, but suddenly it seemed to stop! Now I can't get it get to work again.

Preview: www.blaak.nl/flash/

This._lockroot Doesn't Work (combobox Components Won't Work)
I have a preloader (preloader.swf) which loads a form (offerte.swf).

I've put the this._lockroot on the "application" timeline on the first frame of the "Flash form application" (offerte.swf).
But the combobox components still won't work.

I had it working before, but suddenly it seemed to stop! Now I can't get it get to work again.

Preview: www.blaak.nl/flash/

Smoothing Doesn't Work It Oughta Work
Hello!

I am trying to develope this website:

http://anarchy.primalinsanity.com/~villain/nma.rar

Its smoothing effect, however, has mysteriously disappeared. It is only enabled in authoring mode, not if I export the movie. I've tried everything to re-enable it:

1) Changed formats from JPG to PNG
2) Library > Bitmap Properties > Allow smoothing
3) File > Publish Settings > Smooth

But nothing seems to work

Thanks everyone,
Johann

System.security.allowDomain Has Anyone Ever Been Able To Get This To Work
Woot i finally get to ask a question.

System.security.allowDomain("64.215.157.130")
_root.allowDomain = function (sendingDomain){
return(sendingDomain =="64.215.157.130")
}

Does anyone have any direciton on how this is supposed to work? I cant find any good documentation. i need to access the data within swf files on a different domain?

any help would be greatly appriciated.

System.Capabilities.Resolution.X Doesnt Work
System.Capabilities.Resolution.X gives me 0 everytime.

Question : Any solution for determining user's monitor resolution ?

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

How Does System.security.allowDomain(domain) Exactly Work?
Hi,

how does it work?


ActionScript Code:
var domain = "http://www.mydomain.com";System.security.allowDomain(domain)



regards

Is It Really True That The "embedFonts" Doen't Work ?
Hello

I'm trying to embed the font I use in a created textfield.
My code looks like this:
code:
_root.createTextField("myOutputText",1,0,0,300,100 );
myOutputText.type = "input";
myOutputText.border = true;
myOutputText.embedFonts = true;
trace (myOutputText.embedFonts);
myOutputText.text = "abcdefg";

var myformat = new TextFormat();
myformat.color = 0x000000;
myformat.font = "verdana";

myOutputText.setTextFormat(myformat);


The trace says true, when I preview my movie. But the text dissapears. There's nothing to be seen. I've looked through this board and it seems like a lot of people has experienced this. But I haven't been able to find a solution.

Any ideas??

Regards
Michael

New Instance Button Doesn't Work, No Apps Listed, But Apps Work
In my admin panel if I click on the New Instance button it doesn't do anything. I've seen other posts about this and they all end up being caused by people having no applications to load, but that's not the case here. My apps are installed and they work fine, but the new instance button doesn't list them and they don't show up in the applications list of the admin panel, even when they're running.

This has to be something pretty simple, but I'm not having any luck figuring it out. Any ideas?

Loader.close Doesn't Work In Flash But Does Work In Flash Player
When testing a movie in flash with simulate download the Loader.close() function doesn't seem to work when trying to cancel a load but it does work in a browser! You'll need to try to load a movie that has sound. The loader looks as if it stops but then the sound that's in the loaded movie will play, proving it hasn't stopped loading

add a button with instance name btnCancel









Attach Code

function onClickbtnCancel(e) {
// damn thing doesn't work in Flash but works online
ldr.close();
/* this stuff isn't even needed
ldr.contentLoaderInfo.removeEventListener(Event.COMPLETE, onCompleteHandler);

for (var i:uint=0; i < container.numChildren; i++) {
if (container.getChildAt(i) is DisplayObjectContainer && container.getChildAt(i).name == "movieclip loader") {
container.removeChildAt(i);
}
}
*/
}
btnCancel.addEventListener(MouseEvent.CLICK, onClickbtnCancel);

var container = new Sprite();
var ldr = new Loader();
ldr.name = "movieclip loader";
container.addChild(ldr);
var urlReq = new URLRequest("file.swf");

function onCompleteHandler(e) {
addChild(e.currentTarget.content);
}
ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, onCompleteHandler);

ldr.load(urlReq);

stop();

//--------------------On another note. Anyone know why I can't add text format styles to List components?

import fl.managers.StyleManager;

// set style for all components such as the List
var tf = new TextFormat();
tf.color = 0x000000;
tf.font = "Verdana";
tf.size = 14;
//StyleManager.setStyle("textFormat", tf); // <- this works but that's not the point
StyleManager.setComponentStyle(List, "textFormat", tf); // this works fine for a TextArea, just not a List??

























Edited: 07/11/2008 at 10:08:19 AM by Cine-Med

Fscommand("trapallkeys","true") Doesn't Disable F1 Key?
I want to pop up my own help file when user hits F1.

fscommand seems not to be working!?

Thx

Alek

I Know This Should Work, But It Doesn't
in a game i'm making i've put this scrip in a movie clip:

onClipEvent (enterFrame) {
for (i=1; i<6; i += 1) {
if (this.hitTest(_root["shot"+i])) {
removeMovieClip (_root["shot"+i]);
this.play();
}
}
}

its just a for loop see if a shot hit the movie clip the shot is removed and the movie clip plays, the clip plays fine but the shot isn't removed (the shot is a duplicated movie clip)

i also tryed to remove the movie clip the shot hit (it was also duplicated) by after the explosion takes place it is removed with this script:

removeMovieClip (this);

but that doesn't work either. can any one help? or has my copy of flash lost the ability to use the "removeMovieClip" command?

With () -- Doesn't Seem To Work
Here is the structure:

movie Clip _level0.ColorBoxX.Highlight (where X is an integer)

and there is a button on the _level0.ColorBoxX

from the 'on (release)' action of a ColorBoxY I want to modify the _visibility of the Hightlight mc on ColorBoxX

so here is my with statement.
Note: _parent.currentColor = the X of the ColorBoxX

with ("_parent.ColorBox" + _parent.currentColor){
Highlight._visible = false;
}

I know that "_parent.ColorBox" + _parent.currentColor evaluates to the proper mc name via doing a trace but the mc visible doesn't go to false (i.e. the mc still shows up)

what am I doing wrong?

Copyright © 2005-08 www.BigResource.com, All rights reserved