-
[RESOLVED] child swf with component loaded in to parent swf
I have an elearning course, a .swf, that loads multiple .swfs as the user progresses through the course. At the end, there is a quiz.
The quiz.swf uses the radiobutton component. I have developed some custom skins to use on the radiobutton component. I have figured out that:
- I have to add an instance of a radiobutton in the main .swf for the radiobuttons in the quiz .swf to show.
- I have to copy the radiobutton intance from the quiz swf library to the main swf library if I want my custom skins to show in the quiz swf
While, this works fine. It is not practical. I want the quiz.swf to more modular. So I can pop it in to any course and not have to go back in and add the radiobutton skins to each course.
Does anyone know of a way around this?
Thanks!
-
Senior Member
The skins are part of the component. Unless you create a new RadioButton component and use the extension manager to import it into Flash you will have to manually handle the component.
- The right of the People to create Flash movies shall not be infringed. -
-
Actually I found a way to do it. I duplicated all the RadioButton SKin MCs. Did my modifications to those MCs. Then I used the following code during the RB creation in AS:
PHP Code:
radio1.setStyle("disabledIcon", cRB_disabledIcon); radio1.setStyle("downIcon", cRB_downIcon); radio1.setStyle("overIcon", cRB_overIcon); radio1.setStyle("selectedDisabledIcon", cRB_selectedDisabledIcon); radio1.setStyle("selectedDownIcon", cRB_selectedDownIcon); radio1.setStyle("selectedIcon", cRB_selectedIcon); radio1.setStyle("selectedOverIcon", cRB_selectedOverIcon); radio1.setStyle("selectedUpIcon", cRB_selectedUpIcon); radio1.setStyle("upIcon", cRB_upIcon);
And voila! The radiobutton skin is not pulling from the main swf instance, but from the specific skin I want.
Now I can pop the quiz swf in any course and it will keep its look and feel.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|