I got a Problem with a Movie Clip I add to the Stage in Flash CS4/AS3.
The Flash File consist of two MovieClips, "Inside" and "Outside". The "Inside" Clip is contained by the Outside and has the Instance Name "insideClip". The Clips are attached to Actionscript Class-Files of the same names (Outside and Inside) which are "empty" - they don't do anything, like the ones flash automatically creates.
Adding "Outside" to stage I get the following Error:
ReferenceError: Error #1056: property insideClip in Outside can not be created.
at flash.display::Sprite/constructChildren()
at flash.display::Sprite()
at flash.display::MovieClip()
at gui::Outside()
at MyDocumentClass()
I always have trouble to get to know what Flash and Actionscript actually does behind the scenes - is there any good general ressource which is recommended?
PS.: The code was translated from a version in german -- in case I missed a variable name in the translation.
Code:
DOCUMENT CLASS:
package
{
import flash.display.Sprite;
import flash.display.MovieClip;
import gui.Outside;
public class MyDocumentClass extends MovieClip
{
public var aussen:MovieClip;
public function SelfDeclaredClips()
{ outside = new Outside();
outside.y = 100;
outside.x = 100;
addChild(outside);}}}
OUTSIDE CLASS:
package gui
{
import flash.display.MovieClip;
public class Outside extends MovieClip
{public function Outside(){}}
}
INSIDE CLASS:
package gui
{
import flash.display.MovieClip;
public class Inside extends MovieClip
{public function Inside(){}}
}