0

プリローダーを使用してswfファイルをロードしようとしていますが、このエラーメッセージが表示され続けます。

TypeError: Error #1010: A term is undefined and has no properties.
at mpb_animated_rotator_fla::mc_main_holder_16/frame1()[mpb_animated_rotator_fla.mc_main_holder_16::frame1:36]
at flash.display::MovieClip/gotoAndStop()
at mpb_animated_rotator_fla::mc_starter_holder_1/frame10()[mpb_animated_rotator_fla.mc_starter_holder_1::frame10:1]

メインファイルのムービークリップは、actionscriptを介してアクセスできるようにエクスポートされています。私はas3を初めて使用し、助けが必要です。

プリローダーコード

import flash.display.*;
import flash.events.*;
var myContent:URLRequest = new URLRequest("mpb_animated_rotator.swf");
var myLoader:Loader = new Loader();
var eContent_mc:MovieClip = new MovieClip(); 


myLoader.load(myContent);


myLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadComplete);



function loadComplete(e:Event):void
{
myLoader.contentLoaderInfo.removeEventListener(Event.COMPLETE, loadComplete);
guiding_loader.addEventListener(Event.ENTER_FRAME, loadingF);
function loadingF(e:Event):void{
    if (guiding_loader.ocean.currentFrame > 200){
        eContent_mc = MovieClip(myLoader.content);
        gotoAndStop(2);
        guiding_loader.removeEventListener(Event.ENTER_FRAME, loadingF);
    }
}

}

メインファイルコード

import fl.transitions.Tween;
import fl.transitions.easing.*;
import fl.transitions.TweenEvent;
import flash.events.Event;
import flash.display.MovieClip;

var guiding:mc_guiding_complete = new mc_guiding_complete;
var innovation:mc_innovation_complete = new mc_innovation_complete;
var game:mc_game_change = new mc_game_change;
var yourb:mc_your_business_complete = new mc_your_business_complete;


addChild(guiding);
guiding.x = -215.20;
guiding.y = 230.25;
guiding.alpha = 0;
addChild(yourb);
yourb.x = 378;
yourb.y = 181;
yourb.alpha = 0;
addChild(game);
game.x = 377.95;
game.y = 181;
game.alpha = 0;
addChild(innovation);
innovation.x = 371.40;
innovation.y = 181;
innovation.innovate.gotoAndPlay(2);


innovation.innovate.addEventListener(Event.ENTER_FRAME, movetoGame);
game.chess.addEventListener(Event.ENTER_FRAME, movetoYourb);
yourb.industry.addEventListener(Event.ENTER_FRAME, movetoGuiding);
guiding.ocean.addEventListener(Event.ENTER_FRAME, movetoInnovation);

guiding.menu1.innovate_btn.addEventListener(MouseEvent.CLICK, m1innovateClick);
guiding.menu1.game_btn.addEventListener(MouseEvent.CLICK, m1gameClick);
guiding.menu1.yourb_btn.addEventListener(MouseEvent.CLICK, m1yourbClick);
innovation.menu2.ocean_btn.addEventListener(MouseEvent.CLICK, m2oceanClick);
innovation.menu2.game_btn.addEventListener(MouseEvent.CLICK, m2gameClick);
innovation.menu2.yourb_btn.addEventListener(MouseEvent.CLICK, m2yourbClick);
game.menu3.ocean_btn.addEventListener(MouseEvent.CLICK, m3oceanClick);
game.menu3.innovate_btn.addEventListener(MouseEvent.CLICK, m3innovateClick);
game.menu3.yourb_btn.addEventListener(MouseEvent.CLICK, m3yourbClick);
yourb.menu4.ocean_btn.addEventListener(MouseEvent.CLICK, m4oceanClick);
yourb.menu4.innovate_btn.addEventListener(MouseEvent.CLICK, m4innovateClick);
yourb.menu4.game_btn.addEventListener(MouseEvent.CLICK, m4gameClick);

function m1innovateClick(event:MouseEvent):void {
var guidingout2Tween:Tween = new Tween(guiding, "alpha", Strong.easeOut, 1, 0, 1, true);
var innovationin2Tween:Tween = new Tween(innovation, "alpha", Strong.easeOut, 0, 1, 1, true);
innovationin2Tween.addEventListener(TweenEvent.MOTION_FINISH, innovate2Play);
function innovate2Play (event:TweenEvent):void{
    innovation.innovate.gotoAndPlay(2);
    guiding.ocean.gotoAndStop(1);
    setChildIndex(innovation,4);
    setChildIndex(guiding,1);
    setChildIndex(yourb,2);
    setChildIndex(game,3);
}
}

function m1gameClick(event:MouseEvent):void {
var guidingout3Tween:Tween = new Tween(guiding, "alpha", Strong.easeOut, 1, 0, 1, true);
var gamein2Tween:Tween = new Tween(game, "alpha", Strong.easeOut, 0, 1, 1, true);
gamein2Tween.addEventListener(TweenEvent.MOTION_FINISH, game2Play);
function game2Play (event:TweenEvent):void{
    game.chess.gotoAndPlay(2);
    guiding.ocean.gotoAndStop(1);
    setChildIndex(innovation,1);
    setChildIndex(guiding,2);
    setChildIndex(yourb,3);
    setChildIndex(game,4);
}
}

function m1yourbClick(event:MouseEvent):void {
var guidingout4Tween:Tween = new Tween(guiding, "alpha", Strong.easeOut, 1, 0, 1, true);
var yourbin2Tween:Tween = new Tween(yourb, "alpha", Strong.easeOut, 0, 1, 1, true);
yourbin2Tween.addEventListener(TweenEvent.MOTION_FINISH, yourb2Play);
function yourb2Play (event:TweenEvent):void{
    guiding.ocean.gotoAndStop(1);
    yourb.industry.gotoAndPlay(2);
    setChildIndex(innovation,2);
    setChildIndex(guiding,3);
    setChildIndex(yourb,4);
    setChildIndex(game,1);
}
}

function m2oceanClick(event:MouseEvent):void {
var innovationout2Tween:Tween = new Tween(innovation, "alpha", Strong.easeOut, 1, 0, 1, true);
var guidingin2Tween:Tween = new Tween(guiding, "alpha", Strong.easeOut, 0, 1, 1, true);
guiding.ocean.gotoAndPlay(2);
guidingin2Tween.addEventListener(TweenEvent.MOTION_FINISH, guiding2Play);
function guiding2Play (event:TweenEvent):void{
    innovation.innovate.gotoAndStop(1);
    setChildIndex(innovation,3);
    setChildIndex(guiding,4);
    setChildIndex(yourb,1);
    setChildIndex(game,2);
}
}

function m2gameClick(event:MouseEvent):void {
var innovationout3Tween:Tween = new Tween(innovation, "alpha", Strong.easeOut, 1, 0, 1, true);
var gamein3Tween:Tween = new Tween(game, "alpha", Strong.easeOut, 0, 1, 1, true);
gamein3Tween.addEventListener(TweenEvent.MOTION_FINISH, game3Play);
function game3Play (event:TweenEvent):void{
    game.chess.gotoAndPlay(2);
    innovation.innovate.gotoAndStop(1);
    setChildIndex(innovation,1);
    setChildIndex(guiding,2);
    setChildIndex(yourb,3);
    setChildIndex(game,4);
}
}

function m2yourbClick(event:MouseEvent):void {
var innovationout4Tween:Tween = new Tween(innovation, "alpha", Strong.easeOut, 1, 0, 1, true);
var yourbin3Tween:Tween = new Tween(yourb, "alpha", Strong.easeOut, 0, 1, 1, true);
yourbin3Tween.addEventListener(TweenEvent.MOTION_FINISH, yourb3Play);
function yourb3Play (event:TweenEvent):void{
    innovation.innovate.gotoAndStop(1);
    yourb.industry.gotoAndPlay(2);
    setChildIndex(innovation,2);
    setChildIndex(guiding,3);
    setChildIndex(yourb,4);
    setChildIndex(game,1);
}
}

function m3oceanClick(event:MouseEvent):void {
var gameout2Tween:Tween = new Tween(game, "alpha", Strong.easeOut, 1, 0, 1, true);
var guidingin3Tween:Tween = new Tween(guiding, "alpha", Strong.easeOut, 0, 1, 1, true);
guiding.ocean.gotoAndPlay(2);
guidingin3Tween.addEventListener(TweenEvent.MOTION_FINISH, guiding3Play);
function guiding3Play (event:TweenEvent):void{
    game.chess..gotoAndStop(1);
    setChildIndex(innovation,3);
    setChildIndex(guiding,4);
    setChildIndex(yourb,1);
    setChildIndex(game,2);
}
}

function m3innovateClick(event:MouseEvent):void {
var gameout3Tween:Tween = new Tween(game, "alpha", Strong.easeOut, 1, 0, 1, true);
var innovationin3Tween:Tween = new Tween(innovation, "alpha", Strong.easeOut, 0, 1, 1, true);
innovationin3Tween.addEventListener(TweenEvent.MOTION_FINISH, innovation3Play);
function innovation3Play (event:TweenEvent):void{
    game.chess.gotoAndStop(1);
    innovation.innovate.gotoAndPlay(2);
    setChildIndex(innovation,4);
    setChildIndex(guiding,1);
    setChildIndex(yourb,2);
    setChildIndex(game,3);
}
}

function m3yourbClick(event:MouseEvent):void {
var gameout4Tween:Tween = new Tween(game, "alpha", Strong.easeOut, 1, 0, 1, true);
var yourbin4Tween:Tween = new Tween(yourb, "alpha", Strong.easeOut, 0, 1, 1, true);
yourbin4Tween.addEventListener(TweenEvent.MOTION_FINISH, yourb4Play);
function yourb4Play (event:TweenEvent):void{
    game.chess..gotoAndStop(1);
    yourb.industry.gotoAndPlay(2);
    setChildIndex(innovation,2);
    setChildIndex(guiding,3);
    setChildIndex(yourb,4);
    setChildIndex(game,1);
}
}

function m4oceanClick(event:MouseEvent):void {
var yourbout2Tween:Tween = new Tween(yourb, "alpha", Strong.easeOut, 1, 0, 1, true);
var guidingin4Tween:Tween = new Tween(guiding, "alpha", Strong.easeOut, 0, 1, 1, true);
guiding.ocean.gotoAndPlay(2);
guidingin4Tween.addEventListener(TweenEvent.MOTION_FINISH, guiding4Play);
function guiding4Play (event:TweenEvent):void{
    yourb.industry.gotoAndStop(1);
    setChildIndex(innovation,3);
    setChildIndex(guiding,4);
    setChildIndex(yourb,1);
    setChildIndex(game,2);
}
}

function m4innovateClick(event:MouseEvent):void {
var yourbout3Tween:Tween = new Tween(yourb, "alpha", Strong.easeOut, 1, 0, 1, true);
var innovationin4Tween:Tween = new Tween(innovation, "alpha", Strong.easeOut, 0, 1, 1, true);
innovationin4Tween.addEventListener(TweenEvent.MOTION_FINISH, innovation4Play);
function innovation4Play (event:TweenEvent):void{
    yourb.industry.gotoAndStop(1);
    innovation.innovate.gotoAndPlay(2);
    setChildIndex(innovation,4);
    setChildIndex(guiding,1);
    setChildIndex(yourb,2);
    setChildIndex(game,3);
}
}

function m4gameClick(event:MouseEvent):void {
var yourbout4Tween:Tween = new Tween(yourb, "alpha", Strong.easeOut, 1, 0, 1, true);
var gamein4Tween:Tween = new Tween(game, "alpha", Strong.easeOut, 0, 1, 1, true);
gamein4Tween.addEventListener(TweenEvent.MOTION_FINISH, game4Play);
function game4Play (event:TweenEvent):void{
    yourb.industry.gotoAndStop(1);
    game.chess.gotoAndPlay(2);
    setChildIndex(innovation,1);
    setChildIndex(guiding,2);
    setChildIndex(yourb,3);
    setChildIndex(game,4);
}
}

function movetoGame(event:Event):void{
if(innovation.innovate.currentFrame == 200){
    var innovationoutTween:Tween = new Tween(innovation, "alpha", Strong.easeOut, 1, 0, 1, true);
    var gameinTween:Tween = new Tween(game, "alpha", Strong.easeOut, 0, 1, 1, true);
    gameinTween.addEventListener(TweenEvent.MOTION_FINISH, gamePlay);
    function gamePlay (event:TweenEvent):void{
        game.chess.gotoAndPlay(2);
        setChildIndex(innovation,1);
        setChildIndex(guiding,2);
        setChildIndex(yourb,3);
        setChildIndex(game,4);
    }
}
}

function movetoYourb(event:Event):void{
if(game.chess.currentFrame == 200){
    var gameoutTween:Tween = new Tween(game, "alpha", Strong.easeOut, 1, 0, 1, true);
    var yourbinTween:Tween = new Tween(yourb, "alpha", Strong.easeOut, 0, 1, 1, true);
    yourbinTween.addEventListener(TweenEvent.MOTION_FINISH, yourbPlay);
    function yourbPlay (event:TweenEvent):void{
        yourb.industry.gotoAndPlay(2);
        setChildIndex(innovation,2);
        setChildIndex(guiding,3);
        setChildIndex(yourb,4);
        setChildIndex(game,1);
    }
}
}

function movetoGuiding(event:Event):void{
if(yourb.industry.currentFrame == 200){
    var yourboutTween:Tween = new Tween(yourb, "alpha", Strong.easeOut, 1, 0, 1, true);
    var guidinginTween:Tween = new Tween(guiding, "alpha", Strong.easeOut, 0, 1, 1, true);
    guiding.ocean.gotoAndPlay(2);
    guidinginTween.addEventListener(TweenEvent.MOTION_FINISH, guidingPlay);
    function guidingPlay (event:TweenEvent):void{
        setChildIndex(innovation,3);
        setChildIndex(guiding,4);
        setChildIndex(yourb,1);
        setChildIndex(game,2);
    }
}
}

function movetoInnovation(event:Event):void{
if(guiding.ocean.currentFrame == 200){
    var guidingoutTween:Tween = new Tween(guiding, "alpha", Strong.easeOut, 1, 0, 1, true);
    var innovationinTween:Tween = new Tween(innovation, "alpha", Strong.easeOut, 0, 1, 1, true);
    innovationinTween.addEventListener(TweenEvent.MOTION_FINISH, innovationPlay);
    function innovationPlay (event:TweenEvent):void{
        innovation.innovate.gotoAndPlay(2);
        setChildIndex(innovation,4);
        setChildIndex(guiding,1);
        setChildIndex(yourb,2);
        setChildIndex(game,3);
    }
}
}

メインファイル自体は問題ありません。

4

1 に答える 1

1

ロードされたswfのFLAのライブラリにあるシンボルmc_main_holderで何が起こっているかを確認することから始めます。スタックトレースは、そのシンボルの最初のフレームで未定義の変数のプロパティにアクセスしようとしていることを明確に示しています。

TypeError: Error #1010: A term is undefined and has no properties.
at mpb_animated_rotator_fla::mc_main_holder_16/frame1()  

スタックトレースは、mc_starter_holderシンボルのフレーム10で、mc_main_holderのフレーム1を再生しようとしていて、そこでスタックしていることを示しています。

at mpb_animated_rotator_fla::mc_starter_holder_1/frame10()

スタックトレースの解釈とエラーの理解について詳しくは、こちらをご覧ください。

また、関係なく、構文エラーがあることに気づきました。

function m3oceanClick(event:MouseEvent):void {
var gameout2Tween:Tween = new Tween(game, "alpha", Strong.easeOut, 1, 0, 1, true);
var guidingin3Tween:Tween = new Tween(guiding, "alpha", Strong.easeOut, 0, 1, 1, true);
guiding.ocean.gotoAndPlay(2);
guidingin3Tween.addEventListener(TweenEvent.MOTION_FINISH, guiding3Play);
function guiding3Play (event:TweenEvent):void{
    game.chess..gotoAndStop(1);
    setChildIndex(innovation,3);
    setChildIndex(guiding,4);
    setChildIndex(yourb,1);
    setChildIndex(game,2);
}
}

7行目は「game.chess..gotoAndStop(1);」と表示されます。あなたはダブルを持っています..そこに。

幸運を!

于 2012-09-29T21:51:42.943 に答える