Hi all,
I just cant figure out how to get this to work.
So I have 2 .as files (ImageMain and FullScreenImage)
And in the fla file I have a movieclip on stage called menu and this fla is linked to the ImageMain.as
ImageMain.as (part of the code):
package {
import com.gfxcomplex.display.FullScreenImage;
public class ImageMain extends Sprite {
public static var menuIn:Number=-113;
public static var menuUit:Number=1.5;
public static var duration:Number=0.5;
public function ImageMain():void {
if (stage) {
init();
} else {
addEventListener(Event.ADDED_TO_STAGE, init);
}
}
private function init(e:Event = null):void {
removeEventListener(Event.ADDED_TO_STAGE, init);
var backgroundImage:FullScreenImage=new FullScreenImage("city.jpg",FullScreenAlign.TOP_LEFT,true);
}
FullScreenImage.as:
private function onStageResize(e:Event):void
{
if ( _contentHolder is Sprite) {
var sH:Number = stage.stageHeight;
var sW:Number = stage.stageWidth;
var image:DisplayObject;
[COLOR=Red]var menuY:Number=stage.stageHeight/2;
menu.y=menuY;[/COLOR]
switch(_align) {
case "TL":
_contentHolder.width = sW;
_contentHolder.scaleY = _contentHolder.scaleX;
if (_contentHolder.height < sH) {
_contentHolder.height = sH;
_contentHolder.scaleX = _contentHolder.scaleY;
}
break;
When I run the " red" code I get the next error:
1120: Access of undefined property menu.
It looks like the imported FullScreenImage.as cannot acces the menu movieclip on the stage.
Any help appriciated
Thanx