Control on a shape color.

Hi fellows!!
I drew a rectangle and converted it to a movieclip symbol.  
My question is simply is there a way to control this movieclip fill/stroke color by using actionscript code.  
Thanks in advance!! 
Atar.

AS3 drawing API is very powerful and you should read more about it starting here:
http://help.adobe.com/en_US/as3/dev/WS5b3ccc516d4fbf351e63e3d118a9b90204-7dce.html
and here:
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/Graphics. html?filter_flash=cs5&filter_flashplayer=10.2&filter_air=2.6#includeExamplesSummary
Here is the simplest example that draws rectangle based on stroke and fill colors passed into a function:
var rectangle:Shape = new Shape();
drawRectangle(0xFF0000, 0x00FF00);
function drawRectangle(strokeColor:uint, fillColor:uint):void {
     var g:Graphics = rectangle.graphics;
     g.clear();
     g.lineStyle(2, strokeColor);
     g.beginFill(fillColor);
     g.drawRect(0, 0, 200, 100);
     g.endFill();

Similar Messages

  • Photoshop crashes when undo changing shape color

    I found 100% reproducing Photoshop crash.
    Steps to reproduce:
    1. Create new document.
    2. Create Shape Layer (Circle for example)
    3. Create new layer.
    4. Select Shape Layer.
    5. Change Shape color.
    6. Undo or Ctrl + Z

    What have you done for general trouble-shooting so far?
    http://blogs.adobe.com/crawlspace/2012/07/photoshop-basic-troubleshooting-steps-to-fix-mos t-issues.html

  • Changing Shape Color

    I'm new to Keynote - I looked in the guides and searched the forums but didn't come up with much. I'm trying to do something very basic. I drew an arrow timeline, and it came with it's default color which i want to change. For the life of me I can't figure this out. How do I change a shapes color, can anyone offer guidance? I made it editable but still no joy, and nothing in the guide apart from adding a custom shape which seems odd...
    any help would be appreciated

    Welcome to the discussions, fiveyardpass.
    Select the shape you want to change the color of, open the inspector (Click on the blue circle with an "i" in it), then click on the Graphic tab (the one with the square and the circle on it). Under "Fill" click on "Image Fill" and choose "Color Fill". Then, if you click on the color swatch, it'll open the color palette.

  • Can Table Control alternate on line color?

    Is it possible to change line color on Table Control?  I would like the lines on the Table Control to alternate in color as to make it easier to read the data.  I tried using screen-intensifed but that changes the color on a column, I need to make every other row stand out.
    Thanks
    Edited by: Gary Morman on Mar 11, 2010 9:17 PM

    ALV Grid is editable if using the CL_GUI_ALV_GRID class.  See programs which start with BCALV_EDIT*
    Regards,
    Rich Heilman

  • How can I create a gauge type control that has settable color ranges?

    I need a custom gauge style (360deg) control the has a definable color range
    (like the meter control)... but, I can't seem to customize the curvature of
    the meter type control. Anybody have any ideas?
    Bill

    The gauge control has a definable color range if you right click on the control and choose Visible Items>Ramp. The colors and marker locations for each color can be set with the property Scale.MarkerValues. To change the curvature, postion the mouse pointer over either the first or last value until the pointer changes to a semicircle and click and drag to the curvature you want. To rotate the whole range, do the same thing to any of the other numbers on the scale. To change the min or max value, just use the text tool to highlight the value you want to change and type a new value.

  • Numeric Control - Text and Background Color changes when operating inc/dec arrows

    Hi,
    I'm developing an application that has a panel with black background and green or red numbers. I've added numeric controls and configured the text color and text background color attributes accordinglingy. I set the numeric control to hot or validate  control mode and show the inc/dec arrows, since I want to be able to incr/decr the numbers.
    The problem is that when I run the application and I hit the inc/dec arrows, then the colors inside the numeric control frame become inverted: the black background becomes white and the green number becomes cyan. I've created a callback function assosicated with the numeric control and tried forcing the text and background color, in the EVENT_VAL_CHANGED section, using the SetCtrlAttrribute() function, but to no avail. Also added ProcessDrawEvents didn't help.
    When I mouse click again outside the numeric control, then it reverts back to its original colors (green text, black background).
    Any suggestions as to how I can fix this ?
    I want it to keep its original colors at all times, even when I'm clicking the incr/decr arrows...
    Kind regards,
    pgriep
    Solved!
    Go to Solution.

    Ok, now I see what's happening.
    The effect you are seeing is a resul of standard numeric control behaviour combined with the black bcakground: when you use arrows to increment/decrement a numeric control its value will be automatically highlighted; on the default background you'll see the white area and figures highlighted in black (white numbers on balck background). If you set the background to black the system will automatically change the colors used to highlight the text, and that's what you're seeing.
    By the way, this does not happens if you use up and down keys on the keyboard: text is not highlighted so colors are not changing.
    Additionally, this is not only valid for numerics: see the behaviour of the string controls on the bottom of your panel when you tab up to them. This effect does not happen on controls set as indicator like the big clock in the upper part of the panel.
    The only way I can see to overcome this behaviour is to hide control built-in arrows and create your own up and down buttons with which you can manipulate the numeric control. I am attaching a modified version of your project with buttons on the left numeric; sorry for the poor aesthetic:  I have used some arrow icons I had on my disk, you may want to create your own arrows with the colors and shape you prefer.
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?
    Attachments:
    ModifiedApplication.zip ‏9 KB

  • File path control - browse button colour/color

    I can't change the colour of the browse button on a file path control. I'm using LV 8.5, but I think I have the same problem on 7.1
    Is the only way to change the colour to customise the control? Every other part of it seems to take colours from the tools palette.
    Thanks for any pearls of wisdom.
    Jon.

    I am able to change the path browse button color in 8.51 are you trying to change the button color or the color of the folder on the button.  To change the buttoin color use the paint tool and make sure you hit the space bar so you are painting the left color (Background color I cant remember which is which).  This probably doesnt work on system buttons.
    Paul Falkenstein
    Coleman Technologies Inc.
    CLA, CPI, AIA-Vision
    Labview 4.0- 2013, RT, Vision, FPGA

  • My control center is not colorful in iphone 4 ios7

    I have iphone 4 and when i open control center so it's not transparent and my cousine has iphone 4 his control center is colorful ......why ?

    Your cousin has a 4S, not a 4. The transparency effects are not supported on the 4. Only the 4S and higher.

  • Tab control page label change color programmatically

    Hi everybody!
    I have a question about a tab control.
    I'm trying to figure out a way to programmatically change the  properties of the tab labels so the selected tab's label looks different to the others.
    I'd like to do this by changing aspects of it's font and it's color. But I can't find out how to access it either directly or by reference.
    I can get at the label string so if all else fails I could make the selected one all capitals!
    Am I missing something, or is this one of those things which can't be done?
    I'm using Labview 11.
    Regards,
    Jonathan.

    The link still works for me!
    Search the forum for "Tab Color".
    This does not change the text, but the tab color which is what I do to high light the selected tab.
    I use dark gray and light gray to help the user tell which tab is "active".
    Not exactly what you wanted.
    http://forums.ni.com/t5/LabVIEW/How-can-I-change-the-font-color-size-of-tab-controls/m-p/967920/high...
    http://forums.ni.com/t5/LabVIEW/Programmatically-changing-page-color-in-a-tab-control/m-p/840699/hig...
    http://forums.ni.com/t5/LabVIEW/tab-control-color/m-p/3062557/highlight/true#M873360
    Omar

  • Dynamic shape colors: color palette?

    I am having a hard time finding guidance for this and am hoping someone can point me to the right guidance.
    I have a number of visio files, all of them visual representations of workflows.  I have color-coded each, but if I want to change colors systematically (ie: hey, I want all of those things that are coded blue to be coded red instead) I currently would
    have to go to each file and re-color all of the shapes.  Obviously a poor solution.
    Is there a way to define a color palette, tell visio to use that palette for various shapes, then allow for dynamic changes to that palette that would be reflected in the visio shapes?
    I have explored Data Graphics and assigning color by shape value, but those colors are hard-wired.
    Thanks for any ideas!

    Hi Mitofi,
    Your required may need some macro via VBA code. I'll move your question to the MSDN forum for General Develop forum
    http://social.msdn.microsoft.com/Forums/en-US/home?forum=officegeneral&filter=alltypes&sort=lastpostdesc
    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.
    George Zhao
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.

  • Control over custom shapes

    I have been playing with this for quite some time and can't seem to get it worked out.
    Useing the TechTip for round buttons I can add custom shaped buttons to my panel, adding a mouse listener to the button to detect right mouse click will bring up a pop-up menu to allow the user to alter the appearence( color, shape, font and so on ). If I add the round button like this add( new RoundButton(text) ); how can I access the properties of the RoundButton to change the look.
    Here's the link to the tip
    http://developer.java.sun.com/developer/TechTips/1999/tt0826.html
    Would I have to create mutators and use an empty constuctor?
    Thanks

    As with any other swing component, you can make changes in the overriden paintComponent method to give your button the custom look you want. For instance, if you want to have a round image for the button's skin, in paintComponent, use the g.drawImage method, and you can get the button to look like the image. I hope this helps!
    -JBoeing

  • Shape color - Type on a path

    Is there a way to keep the color on a shape when you use Type on a Path without making a new fill in the Appearance panel?
    Thanks

    Awesome.
    I suppose I could just duplicate the layer then, and type on that. Then group.
    Ctrl C, Ctrl F, type, select both layers, then Ctrl G
    Good enough.
    Thanks !

  • Vector shape color

    When I add color to the shape it comes up like this. Any help would be great.

    jughead,
    In addition to what Peter said, there seems to be an abundance of Anchor Points at the sides, so you may consider a cleaner version.
    But if you actually wish to have a  two coloured artwork with an outer heart shape and a partial triangle inside, you may select all, Pathfinder>Divide, Ungroup, delete the paths outside the heart shape, and recolour as desired.
    A black heart?
    Hi Peter. No show?

  • Shapes Color Correction and more Shapes

    Is there a way to apply the same color correction to different shapes? Like a copy paste function. If you save the grade it corrects the whole thing? Can you be that specific?

    on the cusp of being kick butt!
    Comparing applications on a feature-by-feature basis is sort of a dangerous game of diminishing returns, especially when the ultimate consumer cares not a jot about how a service provider ultimately delivers the product.
    A good colorist can accomplish anything with Apple COLOR that any other colorist might with any other system, but as far as development goes, the parent company does not welcome or collaborate with its practitioners in any way even remotely resembling the relationship that other grading software companies have with their customers. So... COLOR, born as Final Touch has been "on the cusp" for about 5 years or more, but as far as consulting with its professional clientele goes, other than Beta-testing with a highly select group of mostly FCP 'insiders'... nada.
    To a certain extent, if there was some requirement to come up with an instrument that anybody in the orchestra could play, then Apple has come close to delivering that. Well, actually Silicon Color did, and Apple finally admitted them into the inner sanctum. From that point though, what the virtuosi looked upon as promising, but somewhat crude and not a little bit clumsy -- especially with its notorious roundtrip complications, has not advanced much. I had to laugh when a long-time FCP practitioner announced that he was going to wait for COLOR 2 -- you just can't trust those 1.0 offerings... oh, man, what's in the box these days is FinalTouch, oh maybe about 2.8 or so... maybe 2.8.5 (Release Candidate)? But not 3.0.
    The fact that this particular app is packaged as a bonus with the Final Cut Suite makes it difficult to justify development money -- sinking more code into it will not result in a significant enough return when framed against the requirements of the general Final Cut congregation, the vast majority of whom do not even engage in color correction. My deepest fear is that they will "Shake" the app and pillage some of its features into Motion or something equally horrific. "On the cusp" could be just as easily "on the bubble".
    As it stands however, it certainly has opened the door for some -- and so we do manage to satisfy a number of clients and make life difficult for competitors while eking out a poverty-level living. ;-P
    jPo

  • Shape color is changed upon saving?

    I'm currently working on a vector in the trial version of Photoshop CS6 that I acquired this Friday(?), and I'm running into a troublesome dilemma every time I re-open the file to work on at a later date. I find that some layers -- not all, but maybe five or six -- have changed their color to whichever color is in my palette, or whatever was in my palette the last time I opened Photoshop. Is there a setting I'm missing, or is this a current glitch in this version of CS6? And in case you're wondering, yes, I have tried saving with all shape layers locked before I close; it made no difference.

    Something which comes to mind is a gradient-filled Shape layer whose gradient is defined with the special "foreground colour stop" and/or "background colour stop". These stops are identifiable by their checkered appearence and are highlighted in the images below. In the OS X version of Ps CS6, these gradient stops will take on the current Foreground Color and Background Color when a document is opened. These stops can be converted to normal fixed colour stops by clicking them, or double-clicking then OK'ing the colour.

Maybe you are looking for

  • Screenshot filename in Lion

    Hi, Anyone knows a way to rename the filename of screenshots in Lion? I'm talking about the part that comes after the prefix, that can be changed via; defaults write com.apple.screencapture name NEWPREFIX In Snow Leopard, this was achieved by chaning

  • BAPI_SALESORDER_CREATEFROMDAT2 conditions

    Hi gurus! I'm using BAPI_SALESORDER_CREATEFROMDAT2 to create SO document and need to pass SOME prices. Searched the forum, but none of the solutions is right for me. This is me test scenery: one order with two items. One has price (ZPVP) and the othe

  • Lightroom 4.0 - Two Months and still NO FIX!

    It has been over two months since the release of LR 4.0. From the start there were problems. The main issue is performance.  See http://forums.adobe.com/thread/971581?start=0&tstart=0  Over a month ago the second RC was released to address many of th

  • Calendar Rules in BPM10g

    Hello - Can we use Calendar rules and holiday rules to prevent / control the participants' activities and login into BPM workspace? Please share the use of Calendar and holiday rules. I think, following is just an introduction : http://download.oracl

  • Adding Additional Columns in LOV,That column capturing values from function

    My requirement: Adding Additional Columns in LOV,That column values capturing values returned by function..... Give me the ides to achieve this...