How can you determine if swf is played standalone or loaded in other swf?

后端 未结 3 742
遇见更好的自我
遇见更好的自我 2021-01-25 20:23

I have two swf\'s. One \"show\" of some sort, and one \"menu\" that acts as a loader for \"shows\". The \"show\" swf can run in its own respect, or by being loaded via the \"men

3条回答
  •  长发绾君心
    2021-01-25 20:38

    In the constructor of loaded swf:

    if (stage && parent == stage) {/*I'm standalone*/}

    Or maybe if (parent is Loader) will also work (vice versa logic)

提交回复
热议问题