Full Screen\". In the browser, or i" />
开发者

AS3: Reference Error 1056 when adding a movie clip containing an FLVPlayback

开发者 https://www.devze.com 2022-12-08 00:35 出处:网络
I am getting a weird Flash error. The weird thing about it is that it -only- occurs when I open the .开发者_JAVA百科swf in the local Flash Player and go to \"View > Full Screen\". In the browser, or i

I am getting a weird Flash error. The weird thing about it is that it -only- occurs when I open the .开发者_JAVA百科swf in the local Flash Player and go to "View > Full Screen". In the browser, or in the Flash Player at regular size, everything works perfectly.

I have a button called video_button_01 (actually, video buttons 01 through 04), which calls a function called openPopups. This adds to the stage a movie clip called video_popup_01. video_popup_01 contains within it an instance of an FLVPlayback component called video_01. video_01 is a normal part of video_popup_01's timeline, is not added via Actionscript, and exists on frame 1 of video_popup_01.

When I click on video_button_01, I get this error:

ReferenceError: Error #1056: Cannot create property video_01 on flash.display.Stage.

I am not using a class file; I've read about this problem occurring when something on the stage is not declared in the class file? But I have "Automatically declare stage instances" checked in my publish settings. http://blog.andrewpaulsimmons.com/2007/07/referenceerror-error-1056-caused-by.html

Your help is much appreciated.


function openPopups (evt:MouseEvent):void {

    if (evt.target == video_button_01) {
            popup_container.addChild(video_popup_01);
            video_popup_01.gotoAndPlay(1);
    }
    else if (evt.target == video_button_02) {
            popup_container.addChild(video_popup_02);
            video_popup_02.gotoAndPlay(1);
    }
    else if (evt.target == video_button_03) {
            popup_container.addChild(video_popup_03);
            video_popup_03.gotoAndPlay(1);
    }
    else if (evt.target == video_button_04) {
            popup_container.addChild(video_popup_04);
            video_popup_04.gotoAndPlay(1);
    }
}

video_button_01.addEventListener(MouseEvent.CLICK, openPopups);
0

精彩评论

暂无评论...
验证码 换一张
取 消