开发者

fire event in actionscript on swf load?

I am trying to get a bit of content to load on pageLoad instead of as a clickable event (b开发者_高级运维ut still keep the clickable event on the menu).

Here's the actionscript:

import mx.utils.Delegate;

/**
 * This is the menu that comes up at the bottom with various analysis and navigation options when a thumbnail is selected.
 */
class imagegal.BottomMenu extends MovieClip
{

public var bg_mc:MovieClip;
public var btns1_mc:MovieClip;

public function BottomMenu() 
{

    btns1_mc.prev_mc.label_txt.text = "PREVIOUS IMAGE"

    btns1_mc.next_mc.label_txt.text = "NEXT IMAGE";

    btns1_mc.info_mc.label_txt.text = "INFO";

    btns1_mc.thumbs_mc.label_txt.text = "THUMBNAILS";

    btns1_mc.menu_mc.label_txt.text = "MAIN MENU";

    btns1_mc.prev_mc.onRelease = Delegate.create(this, function() {
        _parent.loadPrevious();
    });

    btns1_mc.next_mc.onRelease = Delegate.create(this, function() {
        _parent.loadNext();
    });

    btns1_mc.info_mc.onRelease = Delegate.create(this, function() {
        _parent.toggleInfo();
    });

    btns1_mc.thumbs_mc.onRelease = Delegate.create(this, function() {
        _parent.showThumbs();
    });

    btns1_mc.menu_mc.onRelease = Delegate.create(this, function() {
        _parent.showMenu();
    });
}

public function resize(w:Number) {
    //mask_mc._width = w;
    //bg_mc._width = w;
}

}

The _parent.toggleInfo() function has the content i want displayed. My question is, when this the corresponding as file is fired by the SWF, can i have that function fire?


You could add an eventlistener to the image of which you want to display the blob, or use this.onLoad to add the eventlistener.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜