Dmitrich256
09.01.2013, 04:21
Доброго времени суток!
Подскажите пожалуйста что у меня не так: проблема возникает при переходе на другой кадр, вот что пишет:
No displayobject was passed as an argument
atSimpleZSorter$/sortClips()
at Game2_fla::mainTimeline/movecubef()
Думаю классу просто нечего сортировать, то есть его исполнение надо приостановить, подскажите как это сделать. Заранее благодарен!
Вот сам код:
stop()
Mouse.show()
backSoundMainChannel = backSoundMain.play();
cube_mc.getChildAt(0).rotationY = 90
cube_mc.getChildAt(0).x = 150
cube_mc.getChildAt(1).rotationY = -90
cube_mc.getChildAt(1).x = -150
cube_mc.getChildAt(2).rotationX = -90
cube_mc.getChildAt(2).y = -150
cube_mc.getChildAt(3).rotationX = 90
cube_mc.getChildAt(3).y = 150
cube_mc.getChildAt(4).z = 150
cube_mc.getChildAt(5).z = -150
addEventListener(Event.ENTER_FRAME, movecubef)
function movecubef (e:Event):void
{
SimpleZSorter.sortClips(cube_mc)
cube_mc.rotationY -= (mouseX - 720) * 0.01//512
cube_mc.rotationX -= (mouseY - 460) * 0.01//384
}
//////////////////////////////////////////////////////////////////////////////////////
playmouse_btn.addEventListener(MouseEvent.CLICK, mousefff);
playkey_btn.addEventListener(MouseEvent.CLICK, key)
function mousefff(e:MouseEvent):void
{
stage.removeEventListener(Event.ENTER_FRAME, movecubef)
removeChild(cube_mc)
//SimpleZSorter.Remove();
backSoundMainChannel.stop()
gotoAndStop("MouseM");
}
function key(e:MouseEvent):void
{
stage.removeEventListener(Event.ENTER_FRAME, movecubef)
removeChild(cube_mc);
//SimpleZSorter.Remove()
backSoundMainChannel.stop()
gotoAndStop("KeyM");
}
//////////////////////////////////////////////////////////////////////////////////////
cube_mc.getChildAt(0).addEventListener(MouseEvent.CLICK, onOneClick)
function onOneClick(event:MouseEvent)
{
gotoAndPlay("S1")
}
cube_mc.getChildAt(1).addEventListener(MouseEvent.CLICK, onTwoClick)
function onTwoClick(event:MouseEvent)
{
gotoAndPlay("S2")
}
cube_mc.getChildAt(2).addEventListener(MouseEvent.CLICK, onThreeClick)
function onThreeClick(event:MouseEvent)
{
gotoAndPlay("S1k")
}
cube_mc.getChildAt(3).addEventListener(MouseEvent.CLICK, onFourClick)
function onFourClick(event:MouseEvent)
{
gotoAndPlay("S2k")
}
cube_mc.getChildAt(4).addEventListener(MouseEvent.CLICK, onFiveClick)
function onFiveClick(event:MouseEvent)
{
gotoAndPlay("S3k")
}
cube_mc.getChildAt(5).addEventListener(MouseEvent.CLICK, onSixClick)
function onSixClick(event:MouseEvent)
{
gotoAndPlay("S4k")
}
Подскажите пожалуйста что у меня не так: проблема возникает при переходе на другой кадр, вот что пишет:
No displayobject was passed as an argument
atSimpleZSorter$/sortClips()
at Game2_fla::mainTimeline/movecubef()
Думаю классу просто нечего сортировать, то есть его исполнение надо приостановить, подскажите как это сделать. Заранее благодарен!
Вот сам код:
stop()
Mouse.show()
backSoundMainChannel = backSoundMain.play();
cube_mc.getChildAt(0).rotationY = 90
cube_mc.getChildAt(0).x = 150
cube_mc.getChildAt(1).rotationY = -90
cube_mc.getChildAt(1).x = -150
cube_mc.getChildAt(2).rotationX = -90
cube_mc.getChildAt(2).y = -150
cube_mc.getChildAt(3).rotationX = 90
cube_mc.getChildAt(3).y = 150
cube_mc.getChildAt(4).z = 150
cube_mc.getChildAt(5).z = -150
addEventListener(Event.ENTER_FRAME, movecubef)
function movecubef (e:Event):void
{
SimpleZSorter.sortClips(cube_mc)
cube_mc.rotationY -= (mouseX - 720) * 0.01//512
cube_mc.rotationX -= (mouseY - 460) * 0.01//384
}
//////////////////////////////////////////////////////////////////////////////////////
playmouse_btn.addEventListener(MouseEvent.CLICK, mousefff);
playkey_btn.addEventListener(MouseEvent.CLICK, key)
function mousefff(e:MouseEvent):void
{
stage.removeEventListener(Event.ENTER_FRAME, movecubef)
removeChild(cube_mc)
//SimpleZSorter.Remove();
backSoundMainChannel.stop()
gotoAndStop("MouseM");
}
function key(e:MouseEvent):void
{
stage.removeEventListener(Event.ENTER_FRAME, movecubef)
removeChild(cube_mc);
//SimpleZSorter.Remove()
backSoundMainChannel.stop()
gotoAndStop("KeyM");
}
//////////////////////////////////////////////////////////////////////////////////////
cube_mc.getChildAt(0).addEventListener(MouseEvent.CLICK, onOneClick)
function onOneClick(event:MouseEvent)
{
gotoAndPlay("S1")
}
cube_mc.getChildAt(1).addEventListener(MouseEvent.CLICK, onTwoClick)
function onTwoClick(event:MouseEvent)
{
gotoAndPlay("S2")
}
cube_mc.getChildAt(2).addEventListener(MouseEvent.CLICK, onThreeClick)
function onThreeClick(event:MouseEvent)
{
gotoAndPlay("S1k")
}
cube_mc.getChildAt(3).addEventListener(MouseEvent.CLICK, onFourClick)
function onFourClick(event:MouseEvent)
{
gotoAndPlay("S2k")
}
cube_mc.getChildAt(4).addEventListener(MouseEvent.CLICK, onFiveClick)
function onFiveClick(event:MouseEvent)
{
gotoAndPlay("S3k")
}
cube_mc.getChildAt(5).addEventListener(MouseEvent.CLICK, onSixClick)
function onSixClick(event:MouseEvent)
{
gotoAndPlay("S4k")
}