PDA

View Full Version : Annoying autoformat problem



rondog
October 30th, 2008, 06:10 PM
so I have this class:


package com.dop
{
public class VTODQuestion
{
private var __p:MovieClip = (this.parent as MovieClip);
private var __vidPlayer:MovieClip = __p.videoObj.v;
public function VTODQuestion(questionNumber:Number)
{
trace(questionNumber);
}
}
}


When I hit autoformat, it does this:


package com.dop
{
public class VTODQuestion
{
private var __p:MovieClip=this.parent as MovieClip;
private var __vidPlayer:MovieClip=__p.videoObj.v;
public function VTODQuestion(questionNumber:Number)
{
trace(questionNumber);
}
}
}


Any idea why?? It screws up my whole __p variable.

theCodeBot
October 30th, 2008, 11:01 PM
It removed unnecessary parentheses, that's all. You don't need parentheses around the clip and the as MovieClip, only if you do typecasting like MovieClip(notCastAsAMovieClip);