Linked713
07-11-2009, 05:59 PM
Hai I have an issue with the whole package thing. When I use the classpaths to my packages and use a empty package name it works..
classpath: .\com\cc
.fla
var scene:Mainclass = new Mainclass(this);
addChild(scene);
Mainclass
package{
// imports
public class Mainclass extends Sprite{
// vars
public function Mainclass(scope){
// code
}
// code
}
}
Now the problem:
I get rid of the classpath assuming it will be pointing the fla location.
I change my .fla to reflect this
import com.cc.Mainclass.*;
var scene:Mainclass = new Mainclass(this);
addChild(scene);
Then my Class like this
package com.cc.Mainclass{
// imports
public class Mainclass extends Sprite{
// vars
public function Mainclass(scope){
// code
}
// code
}
}
I get these errors
1172: Definition com.cc.Mainclass could not be found.
1172: Definition com.cc.Mainclass could not be found.
1046: Type was not found or was not a compile-time constant: Mainclass.
1180: Call to a possibly undefined method Mainclass.
Folder PATH listing
testas3
│ AC_RunActiveContent.js
│ testas3.fla
│ testas3.html
│ testas3.swf
│
└───com
├───cc
│ Mainclass.as
│
└───gs
│ OverwriteManager.as
│ TweenGroup.as
│ TweenLite.as
│ TweenMax.as
│
├───easing
│ Back.as
│ Bounce.as
│ Circ.as
│ Cubic.as
│ EaseLookup.as
│ easing_readme.txt
│ Elastic.as
│ Expo.as
│ Linear.as
│ Quad.as
│ Quart.as
│ Quint.as
│ Sine.as
│ Strong.as
│
├───events
│ TweenEvent.as
│
├───plugins
│ AutoAlphaPlugin.as
│ BevelFilterPlugin.as
│ BezierPlugin.as
│ BezierThroughPlugin.as
│ BlurFilterPlugin.as
│ ColorMatrixFilterPlugin.as
│ ColorTransformPlugin.as
│ DropShadowFilterPlugin.as
│ EndArrayPlugin.as
│ FastTransformPlugin.as
│ FilterPlugin.as
│ FrameLabelPlugin.as
│ FramePlugin.as
│ GlowFilterPlugin.as
│ HexColorsPlugin.as
│ QuaternionsPlugin.as
│ RemoveTintPlugin.as
│ RoundPropsPlugin.as
│ ScalePlugin.as
│ SetSizePlugin.as
│ ShortRotationPlugin.as
│ TintPlugin.as
│ TweenPlugin.as
│ VisiblePlugin.as
│ VolumePlugin.as
│
└───utils
└───tween
ArrayTweenInfo.as
BevelFilterVars.as
BlurFilterVars.as
ColorMatrixFilterVars.as
ColorTransformVars.as
DropShadowFilterVars.as
FilterVars.as
GlowFilterVars.as
SubVars.as
TransformAroundCenterVars.as
TransformAroundPointVars.as
TweenInfo.as
TweenLiteVars.as
TweenMaxVars.as
I've been head-smashing my keyboard for a long time even though I know it is a simple "can't find your class" problem.
I tried to put a classpath to reflect my /fla location, still no success. Thanks.
classpath: .\com\cc
.fla
var scene:Mainclass = new Mainclass(this);
addChild(scene);
Mainclass
package{
// imports
public class Mainclass extends Sprite{
// vars
public function Mainclass(scope){
// code
}
// code
}
}
Now the problem:
I get rid of the classpath assuming it will be pointing the fla location.
I change my .fla to reflect this
import com.cc.Mainclass.*;
var scene:Mainclass = new Mainclass(this);
addChild(scene);
Then my Class like this
package com.cc.Mainclass{
// imports
public class Mainclass extends Sprite{
// vars
public function Mainclass(scope){
// code
}
// code
}
}
I get these errors
1172: Definition com.cc.Mainclass could not be found.
1172: Definition com.cc.Mainclass could not be found.
1046: Type was not found or was not a compile-time constant: Mainclass.
1180: Call to a possibly undefined method Mainclass.
Folder PATH listing
testas3
│ AC_RunActiveContent.js
│ testas3.fla
│ testas3.html
│ testas3.swf
│
└───com
├───cc
│ Mainclass.as
│
└───gs
│ OverwriteManager.as
│ TweenGroup.as
│ TweenLite.as
│ TweenMax.as
│
├───easing
│ Back.as
│ Bounce.as
│ Circ.as
│ Cubic.as
│ EaseLookup.as
│ easing_readme.txt
│ Elastic.as
│ Expo.as
│ Linear.as
│ Quad.as
│ Quart.as
│ Quint.as
│ Sine.as
│ Strong.as
│
├───events
│ TweenEvent.as
│
├───plugins
│ AutoAlphaPlugin.as
│ BevelFilterPlugin.as
│ BezierPlugin.as
│ BezierThroughPlugin.as
│ BlurFilterPlugin.as
│ ColorMatrixFilterPlugin.as
│ ColorTransformPlugin.as
│ DropShadowFilterPlugin.as
│ EndArrayPlugin.as
│ FastTransformPlugin.as
│ FilterPlugin.as
│ FrameLabelPlugin.as
│ FramePlugin.as
│ GlowFilterPlugin.as
│ HexColorsPlugin.as
│ QuaternionsPlugin.as
│ RemoveTintPlugin.as
│ RoundPropsPlugin.as
│ ScalePlugin.as
│ SetSizePlugin.as
│ ShortRotationPlugin.as
│ TintPlugin.as
│ TweenPlugin.as
│ VisiblePlugin.as
│ VolumePlugin.as
│
└───utils
└───tween
ArrayTweenInfo.as
BevelFilterVars.as
BlurFilterVars.as
ColorMatrixFilterVars.as
ColorTransformVars.as
DropShadowFilterVars.as
FilterVars.as
GlowFilterVars.as
SubVars.as
TransformAroundCenterVars.as
TransformAroundPointVars.as
TweenInfo.as
TweenLiteVars.as
TweenMaxVars.as
I've been head-smashing my keyboard for a long time even though I know it is a simple "can't find your class" problem.
I tried to put a classpath to reflect my /fla location, still no success. Thanks.