A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Possible to set default "Outline Color" in layer properties?

  1. #1
    Junior Member
    Join Date
    Jun 2008
    Posts
    18

    Question Possible to set default "Outline Color" in layer properties?

    I tend to work over light backgrounds, and use the "Convert Anchor Point Tool" a lot.

    The Outline Color for each layer changes automatically as you add them, which I am fine with, until it selects yellow as the outline colour.
    Which means I have to manually go into the Layer Properties and switch it from yellow to something darker (in order to see it clearly).

    Is there a way to stop flash from selecting yellow, or ideally making ALL "Outline Colors" the same colour by default?
    I would love a solution, as this has been annoying me for a long time. Thanks!


    ===
    While I'm at it, is there any way to set the magnification to "zoomed out" by default?
    Same with the "Short" option in the timeline.
    Last edited by midnightheist; 09-20-2012 at 10:50 PM.

  2. #2
    Prid - Outing Nig 13's Avatar
    Join Date
    Jul 2006
    Location
    Norway
    Posts
    1,864
    Yes, in fact you can do this

    Excluding yellow colors would be challenging, as I am not good with hexadecimal color manipulation, but assigning one and same color to all layers is much easier. The key to achieve this is to use Javascript to manipulate the Flash Authoring Environment (i.e. inside Flash, where you draw, code, create layers, etc.). We can then, by adding a new button to Flash, allow it to change all the Layers' outline color to be changed to a specific one.

    Start by opening a Flash JavaScript File (from the list you choose Actionscript 2.0/3.0 Document from), and type this:

    Code:
    var layerArray = fl.getDocumentDOM().getTimeline().layers;
    
    for(i in layerArray){
    	layerArray[i].color = "#FF0000";
    }
    and save it as something like, Same Color Layer.jsfl. Next, go to:

    C:\Users\your_username\AppData\Local\Adobe\Flash_version\language\Configuration\Commands

    make sure that you have enabled displaying of hidden files and folders (to do this, while in Windows Explorer, press Alt to bring up a menu, move to Tools, and click on Folder Options. Switch to View tab, and under Hidden files and folders, make sure it's enabled) in order to navigate to the specified location.

    Move your .jsfl file to the Commands folder, and you don't need to close Flash as it will automatically refresh the commands list.

    Then, create a new Flash Document (AS2/AS3), create some new layers, and in the Top Menu, move to Commands, and click on the button with the same name as your .jsfl file (Same Color Layer). If done correctly, it will change all the layers' color to red (you can of course change the default color inside the .jsfl file, by changing the hexadecimal value).

    This will only change the colors for layers in the current active timeline.

    However, I'm not sure your magnification request is possible, at least not with the pre-made functions in Flash for Authoring Environment extension. The same goes for setting Short as default. At least your main request was filled, right :P?

    Hope this helped
    I am back, guys ... and finally 18 :P

    BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS

  3. #3
    Junior Member
    Join Date
    Jun 2008
    Posts
    18

    Thumbs up

    Sorry for the late reply, but I have to say that your post is the clearest, most helpful response I have ever received over the internet.

    Easy to understand (even for me!), and worked perfectly.
    Thanks a bunch!

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