Question

I have an FlvPlayback skin, which works really well, except the custom button. Basically this button needs to be able to call a function in the parent movieclip (that loaded the FlvPlayback, which in turn loaded the skin).

I am not really a Flash developer, and have not found anything on Google relating to this. It seems like a simple issue, but I just do not have enough knowledge of flash.

Can anyone point me in the right direction?

Summary: How to call a function in the base swf which has a FlvPlayback movieclip, from a custom button in the skin file.

Thanks

Was it helpful?

Solution

You can call just about any available method in the parent (or parent.parent) DisplayObject by using bracket syntax:

parent["name"]();

resp.

parent.parent["name"]();

where name is the name of your method.

If I remember correctly, your skin.swf's parent should be the FLVPlayback component, parent.parent the MovieClip containing it, and so forth. You can add a trace to the button's clickHandler to see which is correct.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top