PDA

View Full Version : Setting the _width of a movie



DariusMonsef
July 3rd, 2003, 09:12 PM
Ok So I have MC named this1clip.

I am pulling the variable this1length from a text file via loadVariablesNum ("getmy.txt", 0);

I know that this1length works is a valid variable as I can spit it out elsewhere, but for some reason the statement below is not pulling in the variable to set the width of the MC.

P.S. this1length has a value of 10 in my text file.


onClipEvent (load) {
setProperty (_root.this1clip, _width, "_root.this1length");
}


Any ideas? Are "" not needed? Do I refer to a different level than _root??

thoriphes
July 3rd, 2003, 09:18 PM
unquote _root.this1length.

quoting it would make it a literal variable, meaning a variable called "_root.this1length" and not the variable this1length found on the _root.

DariusMonsef
July 3rd, 2003, 09:33 PM
Thor,

Yeah I accidentally copied over the code I had when I was jsut trying everything like "" and un "".

It ended up being that I had white space being passed over with my variable from the text file.

Thanks though