A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: flash components

  1. #1
    E Pluribus Flash
    Join Date
    Oct 2003
    Posts
    18

    flash components

    I have been trying to edit components in flash mx 2004 professional and cannot find how to edit the theme of a button, everything else seems editable except for this component, anyone encountered this?

  2. #2
    Senior Member cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,449
    It is not possible any more to change actionscript or even see it with MX2004 components, since they are packed as swc files.
    - The right of the People to create Flash movies shall not be infringed. -

  3. #3
    E Pluribus Flash
    Join Date
    Oct 2003
    Posts
    18
    So is there absolutely no way to change the play button in the media controller component?

  4. #4
    Senior Member cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,449
    If it is changing the skin (color, size etc) you can do that with actionscript. Check the help files for that. But you don't have access any more to the actionscript of 2004 components.
    - The right of the People to create Flash movies shall not be infringed. -

  5. #5
    Senior Member
    Join Date
    Sep 2000
    Location
    San Francisco
    Posts
    196
    all the component code is there, pretty interesting stuff I might add:

    local:
    C:\Program Files\Macromedia\Flash MX 2004\en\First Run\Classes

    I found this in the docs:
    Changing skin properties in the prototype
    If a component does not directly support skin variables, you can subclass the component and replace its skins. For example, the ComboBox component doesn't directly support skinning its drop-down list because the ComboBox uses a List component as its drop-down list.

    If a component is composed of subcomponents, the subcomponents are identified in the component's entry in Components Dictionary.

    To skin a subcomponent, do the following:
    Follow the steps in Editing component skins, but edit a scroll bar skin. For this example, edit the ScrollDownArrowDown skin and give it the new name MyScrollDownArrowDown.
    Select File > New and create a Flash document.
    Select File > Save and give the file a unique name, such as MyComboTest.fla.
    Drag MyScrollDownArrowDown from the theme library above to the Stage of MyComboTest.fla and delete it.
    This adds the symbol to the library, but doesn't make it visible on the Stage.

    Select Insert > New Symbol and give it a unique name, such as MyComboBox.
    Select the Export for ActionScript checkbox and click OK.
    Export in First Frame is automatically selected.

    Enter the following code in the Actions panel on Frame 1 actions of MyComboBox:
    #initclip 10
    import MyComboBox
    Object.registerClass("ComboBox", MyComboBox);
    #endinitclip

    Drag a ComboBox component to the Stage.
    In the Property inspector, enter as many Label parameters as it takes for the vertical scroll bar to appear.
    Select File > Save.
    Select File > New and create a new ActionScript file (Flash Professional only).
    Enter the following code:
    import mx.controls.ComboBox
    import mx.controls.scrollClasses.ScrollBar
    class MyComboBox extends ComboBox{
    function getDropdown():Object{
    var oldName = ScrollBar.prototype.downArrowDownName;
    ScrollBar.prototype.downArrowDownName = "MyScrollDownArrowDown";
    var r = super.getDropdown();
    ScrollBar.prototype.downArrowDownName = oldName;
    return r;
    }
    }

    Select File > Save and save this file as MyComboBox.as.
    Click a blank area on the Stage and, in the Property inspector, select the Publish Settings button.
    Select the ActionScript version Settings button.
    Click the Plus button to add a new classpath, and select the Target button to browse to the location of the MyComboBox.as file on your hard drive.
    Select Control > Test Movie.

    hope that helps,
    ~Dev

  6. #6
    Senior Member cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,449
    If we meet the third time at another thread you have to give a "Schnaps" as we say in German.
    - The right of the People to create Flash movies shall not be infringed. -

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