Skip to main content
Inspiring
January 25, 2016
Answered

setProperty ("", _y, -45); what does "" means and how to convert it to as3

  • January 25, 2016
  • 1 reply
  • 312 views

the know standard as2 format is like that

setProperty(myClip, _width, 200);

and its as3 format is

myClip.width = 200;

but here it should be

"".width=-45 

but it will show error . in this case what is the solution ? how can i convert it to as3

This topic has been closed for replies.
Correct answer kglad

setProperty("",_y,-45);  // as1

this.y = -45;  // as3

// but because that code may be attached to an object (instead of a timeline), you would need assign an instance name (eg, objectname in the properties panel) and use that name in your code that's attached to the timeline that contains the object:

objectname.y = -45;

// or, even better, move all the code to one timeline

// or, even better, use class files

1 reply

kglad
Community Expert
kgladCommunity ExpertCorrect answer
Community Expert
January 25, 2016

setProperty("",_y,-45);  // as1

this.y = -45;  // as3

// but because that code may be attached to an object (instead of a timeline), you would need assign an instance name (eg, objectname in the properties panel) and use that name in your code that's attached to the timeline that contains the object:

objectname.y = -45;

// or, even better, move all the code to one timeline

// or, even better, use class files