A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: [RESOLVED] child swf with component loaded in to parent swf

  1. #1
    Junior Member
    Join Date
    Sep 2009
    Posts
    16

    resolved [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:

    1. I have to add an instance of a radiobutton in the main .swf for the radiobuttons in the quiz .swf to show.
    2. 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!

  2. #2
    Mod cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,449
    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. -

  3. #3
    Junior Member
    Join Date
    Sep 2009
    Posts
    16
    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
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center