Set fill and stroke with events?

I have a SWF with Shapes created with AS. When an event
fires, I want to change the fill and stroke of the Shape.
I know how to do the event, but what's the syntax to modify
the fill and stroke?
For reference, in my Class's creator function I have:
// create the base circle
baseCircle.graphics.beginFill(0xFFFFFF,1);
baseCircle.graphics.lineStyle(2,0x69A733,1);
baseCircle.graphics.drawCircle(0,0,45);
this.addChild(baseCircle);
So what I would want to do here is change the lineStyle to
0xff0000 and the fill to 0xFFFF00 (for example).

What I wound up doing, which works but seems wonky, is to
clear the graphics and re-create them as needed (see attached).
Those event dispatchers are for things I want the parent app
to do.

Similar Messages

  • Problems with "no color" in the "Fill and Stroke"

    I am having problems with “no color” in the “Fill and Stroke” function of Flash CS4 Pro.
    I had been using CS4 for 10 days and everything worked fine. Then I tried experimenting with various color combinations (along with “no color”) for “Fill and Stroke” for a simple button. Suddenly CS4 locked up on me while I was working with the “color panel”. A second color panel appeared in the upper left corner and the program was not responding. All I could do was to end the CS4 task.
    After that, whenever I created even a simple rectangle, at first the colors would appear as indicated for “Fill and Stroke”, but when I selected the object to see its properties, either the stroke or the fill color box would have a red slash line, indicating a “no color”, and I couldn’t select the color box to change it using the ink bottle tool, although the other box worked fine.
    Rebooting did not help. So I uninstalled CS4 (and didn’t keep the preferences), rebooted, then reinstalled it. The problem was still there. Logging on as another user didn’t help. I tried restoring the Windows system to before I installed CS4 and resinstalling it and that didn’t work. I have a disfunctional CS4 now and I don’t know what to do to fix it. Please help me. Thank you.

    Have you updated flash to 10.0.2?  Have you played around with a bunch of different selections, objects, and so forth to see if this box is always incorrect?  I think there's some particular selection (order of selecting things, and so on), where the color swatches in one location don't work as expected. However, it should not happen all the time and from what I recall it was fairly easy to work around (I can't even figure out what this was - so probably not it, as it seems hard to run into or perhaps now fixed).
    Also make sure you have the stroke selected - if you don't have everything selected, either the fill or stroke will show no color and dim depending on the selection.

  • Color Swatches in Toolbar for Fill and Stroke are not working properly.

    The color swatches in toolbar for fill and stroke are not functioning as they should.  When I select an object on the artboard, the swatches display fine in the toolbar for what they should be.  However, when I double-click on those swatches from within the toolbar to modify the color, the color which comes up is #000000 instead of the actual color it should be. 
    I am using 16.2.1 (cloud) for Mac OS 10.8.2
    I've submitted a bug report, but want to know if anyone else has had this issue and what they did to resolve the issue.
    Also, the eyedropper tool is buggy and occasionally places the #000000 into an object instead of the characteristics the eyedropper is selecting.  I don't have any hidden layers or weird groupings, it just randomly decides when it is going to work or not.
    I've never had these issues on previous versions of illustrator and have been proficient in all versions since 2007.

    Double click the eyedropper, and turn on appearance, is off by default.
    For your #000000 color problem that also likely is related to appearance setting. You may have for example have some with #000000 at the character level, and another color at the type level.

  • Polygon Fill and Stroke Opacity

    I have a polygon and want to set the color and opacity of it's fill and stroke independently something like this:
    poly.Stroke = someRedColor;
    poly.Stroke.Opacity = 1;
    poly.Fill = someBlueColor;
    poly.Fill.Opacity = .2
    After running the 4th line I can see in the debugger that the Stroke's Opacity is still one, but when looking at it at runtime it has the same Opacity as the fill.  Since I can set the color of each independently with no problem, why can't I set the
    color's opacity of each independently?
    Thank you for any information you can provide.

    Hi,
    I am glad to hear that you have solved your issue, thanks for your posting.
    Best Regards,
    Jambor
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Expanding the appearance of live transform breaks up fill and stroke

    Okay, so I never ever use Effect > Distort & Transform > Transform, but with all the hubbub about the stroke scaling bugs in Illustrator CC 2014, I've been fiddling with it lately, and I'm confounded by something: once you perform a "live" transformation of an object, how do you expand the transformation so it's not live anymore, while retaining the integrity of your object? When I use Object > Expand Appearance, it breaks the fill and stroke of the object into two objects. Am I doing it wrong, or is this a bug?
    This can't be the normal behavior, since it is impossible to expand the appearance of an ordinary stroked/filled object (the menu item is grayed out).

    I can't accept that; the two issues remain:
    1) How do you expand/commit the transformation so it's not live anymore, while retaining the integrity of your object? If you can't, that's ridiculous.
    2) If this was the normal behavior, then you ought to be able to separate the fill from the stroke on a newly-created shape with Expand Appearance as well, but you can't because it's grayed out.
    Furthermore, common sense dictates that the user would rarely—if ever—want their shapes to be exploded like that. Seems more like an egregious oversight than "normal" behavior.

  • CS4 Fill and stroke option in primitive shapes not showing wtf!

    Hi, just moved up to cs4 and it's all ready starting to bring
    the pain. When drawing with the primitive shape or any shape, the
    fill and stroke propertoes along with say rectangle options are not
    showing in the properties tab!! anyone please! I thought I would
    have to go trawling throught manual this
    time....$£%£$%£$%!!!!!!!

    restart app bug gone..

  • Is there no fill and stroke palette for Photoshop 13 (CS6)?

    I'm getting a little tired of always having to switch tools to the Vector tool in order to change the colour (fill or stroke) of a vector shape that is currently selected in the Layers Palette. What am I missing? Don't force me to use the contextual control bar to change something so basic! This should be added to the Color Palette, the Properties palette, or its own Fill and stroke palette.
    I'm sure I've missed something though.

    Doubleclicking on the layer thumbnail of a shape layer will bring up the color picker and give you the option to adjust the fill, or gradient for the object.
    You don't get the stroke options there though, you'll need to select the vector tools to get the stroke options.
    If you doubleclick somewhere else on the layer in the panel (but not on the layer's name text) you'll get the effect options/layer style options.
    Doubleclicking on:
      Thumbnail gets you color picker
      Layer itself gets you layer style/effects dialog
      Layer text -- rename layer's name
      Layer thumbnail of an adjustment layer will bring up properties panel
    We know there is farther to go with the shape layer changes we've made, and the improvements are still in the works

  • How can I change the default fill and stroke colors for new shapes?

    As you can see in the following screen recording, after I change the stroke and fill color, all my subsequent rectangles are created respecting these new colors. But then when I delete all the rectangles, choose the rectangle shape tool once again, and start creating new rectangles, they start getting created with another color I had used some time ago (and I don't know how did it become the default color).
    http://tinypic.com/r/64jrwp/6
    So how can I change the defaults, so that the fill color is say #ddd, and the shape has no stroke at all?
    Thanks.

    When you have the shape tool selected you will see in the tool bar below - file edit etc a fill and stroke. This is where you can change the colours.
    You can keep drawing your shapes like you did in the video but then select the rectangle and change the colour from this tool bar. The reason it changes will be because you changed the colours you were using (foreground / background) that display in the left side tool bar.

  • Fill and Stroke properties menu grayed out...why? :(

    Just downloaded the Adobe Suite 5.5 trial...trying to change my brush size, but can't...made my head hurt. Anyone know what's going on?
    Have tried a million keyword combinations to find a solution on google nothing so far...
    Thanks...

    Hi Roman2011,
    Flash has 8 default brush sizes. You can change the brush size by selecting the brush size button in the tool panel while the brush tool is selected. The brush size button is located toward the bottom of the panel if your workspace is set to Essential.
    As for the fill and stroke properties menu being grayed out, I am not sure what you mean. Can you please explain further or take a screenshot?
    Thanks,
    Quynh
    Flash Authoring, QA

  • Set default fill and stroke from start up?

    Hello, would it be possible to set no fill and 1px black stroke as the default fill when I start up illustrator?

    Yes. Just change the Default Graphic Style in whatever New Document Profile you use most. You can do that by making an object with the attributes you want and Option(Alt)-dragging onto the left most Graphic Style and save the file.

  • Startup file with fill and stroke

    in Illustrator CS on the Mac the default startup is fill white and stroke black at 1 pt.
    I want to change it to fill none and stroke black at .5 pt.
    How can I do this. Thanks

    If indeed you are talking about CS (AI 11) then go to Applications>Adobe Illustrator>Presets>Startup-CMYK or RGB. Make an object with the desired characteristics and Option-drag the object to the default swatch (the left most one in the Swatches Palette). Save and restart AI. Open a new document and check the default. It should be as you want.

  • Problem Filling and Selecting with Paths.jsx

    I have copied Paths.jsx from the Adobe Photoshop CS5 Javascript Scripting Reference, p. 141.  It works OK.  It makes a path that is the outline of an ice cream cone and strokes it with the current foreground color.
    I then tried to fill the path and that does not work.  I have tried 3 methods using the following additional code and changing the appropriate false's to true:
    // Fill the path
    fillColor = new SolidColor
    fillColor.rgb.red = 255
    fillColor.rgb.green = 0
    fillColor.rgb.blue = 0
    try {
       if(false) {
             // This works and gives a gray fill that is neither the
                  // foreground nor background color
         // Only the ice cream part of the cone is selected and filled
                myPathItem.fillPath()
       } else if(false) {
         // With a color specified, it doesn't work
                  myPathItem.fillPath(fillColor)
           } else if(true) {
         // This makes a selection of the PathItem, selects it and fills it
         // Only the ice cream part of the cone is selected and filled
                  myPathItem.makeSelection(0, false, SelectionType.REPLACE)
                   selRef = app.activeDocument.selection;
                  selRef.fill(fillColor, ColorBlendMode.NORMAL)
    } catch(ex) {
            msg = "Error filling path:\n" + ex.message
            alert(msg, "Exception", true);
    They do as the comments say.  None of them does what I would expect.  For the second way, the error message is:
    General Photoshop error occurred.  This functionality may not be available in this version of Photoshop
    - Could not complete the command because of a program error.
    I do not understand why only the      ice cream part of the cone is filled or selected (the third array).  I can manually      make a selection from the Path in PS and it also only selects the      ice cream part.  All of the lines are stroked.  Only the top part is      filled or selected.
    Why does fillPath not work?
    I can supply the whole script if necessary.  I am an experienced programmer but new to Photoshop scripting.  Is this a bug or am I doing something wrong?
    Thanks for any help.

    This is the whole script:
    // Paths.jsx
    #target photoshop
    // Save the current preferences
    var startRulerUnits = app.preferences.rulerUnits
    var startTypeUnits = app.preferences.typeUnits
    var startDisplayDialogs = app.displayDialogs
    // Set Adobe Photoshop CS5 to use pixels and display no dialogs
    app.preferences.rulerUnits = Units.PIXELS
    app.preferences.typeUnits = TypeUnits.PIXELS
    app.displayDialogs = DialogModes.NO
    // First close all the open documents
    while (app.documents.length) {
    app.activeDocument.close()
    // Create a document to work with
    var docRef = app.documents.add(5000, 7000, 72, "Simple Line")
    // line 1--it’s a straight line so the coordinates for anchor, left, and right
    // for each point have the same coordinates
    var lineArray = new Array()
    lineArray[0] = new PathPointInfo
    lineArray[0].kind = PointKind.CORNERPOINT
    lineArray[0].anchor = Array(100, 100)
    lineArray[0].leftDirection = lineArray[0].anchor
    lineArray[0].rightDirection = lineArray[0].anchor
    lineArray[1] = new PathPointInfo
    lineArray[1].kind = PointKind.CORNERPOINT
    lineArray[1].anchor = Array(150, 200)
    lineArray[1].leftDirection = lineArray[1].anchor
    lineArray[1].rightDirection = lineArray[1].anchor
    var lineSubPathArray = new Array()
    lineSubPathArray[0] = new SubPathInfo()
    lineSubPathArray[0].operation = ShapeOperation.SHAPEXOR
    lineSubPathArray[0].closed = false
    lineSubPathArray[0].entireSubPath = lineArray
    // line 2
    var lineArray2 = new Array()
    lineArray2[0] = new PathPointInfo
    lineArray2[0].kind = PointKind.CORNERPOINT
    lineArray2[0].anchor = Array(150, 200)
    lineArray2[0].leftDirection = lineArray2[0].anchor
    lineArray2[0].rightDirection = lineArray2[0].anchor
    lineArray2[1] = new PathPointInfo
    lineArray2[1].kind = PointKind.CORNERPOINT
    lineArray2[1].anchor = Array(200, 100)
    lineArray2[1].leftDirection = lineArray2[1].anchor
    lineArray2[1].rightDirection = lineArray2[1].anchor
    lineSubPathArray[1] = new SubPathInfo()
    lineSubPathArray[1].operation = ShapeOperation.SHAPEXOR
    lineSubPathArray[1].closed = false
    lineSubPathArray[1].entireSubPath = lineArray2
    // Ice cream curve
    // It’s a curved line, so there are 3 points, not 2
    // coordinates for the middle point (lineArray3[1]) are different.
    // The left direction is positioned "above" the anchor on the screen.
    // The right direction is positioned "below" the anchor
    // You can change the coordinates for these points to see
    // how the curve works...
    var lineArray3 = new Array()
    lineArray3[0] = new PathPointInfo
    lineArray3[0].kind = PointKind.CORNERPOINT
    lineArray3[0].anchor = Array(200, 100)
    lineArray3[0].leftDirection = lineArray3[0].anchor
    lineArray3[0].rightDirection = lineArray3[0].anchor
    lineArray3[1] = new PathPointInfo
    lineArray3[1].kind = PointKind.CORNERPOINT
    lineArray3[1].anchor = Array(150, 50)
    lineArray3[1].leftDirection = Array(100, 50)
    lineArray3[1].rightDirection = Array(200, 50)
    lineArray3[2] = new PathPointInfo
    lineArray3[2].kind = PointKind.CORNERPOINT
    lineArray3[2].anchor = Array(100, 100)
    lineArray3[2].leftDirection = lineArray3[2].anchor
    lineArray3[2].rightDirection = lineArray3[2].anchor
    lineSubPathArray[2] = new SubPathInfo()
    lineSubPathArray[2].operation = ShapeOperation.SHAPEXOR
    lineSubPathArray[2].closed = false
    lineSubPathArray[2].entireSubPath = lineArray3
    // Create the path item
    var myPathItem = docRef.pathItems.add("A Line", lineSubPathArray)
    // Stroke it so we can see something
    myPathItem.strokePath(ToolType.BRUSH)
    // Fill the path
    fillColor = new SolidColor
    fillColor.rgb.red = 255
    fillColor.rgb.green = 0
    fillColor.rgb.blue = 0
    try {
        if(false) {
            // This works and gives a gray fill that is neither the
            // foreground nor background color
            // Only the ice cream part of the cone is selected and filled
            myPathItem.fillPath()
        } else if(false) {
            // With a color specified, it doesn't work
            myPathItem.fillPath(fillColor)
        } else if(true) {
            // This makes a selection of the PathItem, selects it and fills it
            // Only the ice cream part of the cone is selected and filled
            myPathItem.makeSelection(0, false, SelectionType.REPLACE)
            selRef = app.activeDocument.selection;
            selRef.fill(fillColor, ColorBlendMode.NORMAL)
    } catch(ex) {
        msg = "Error filling path:\n" + ex.message
        alert(msg, "Exception", true);
    // Reset the application preferences
    preferences.rulerUnits = startRulerUnits
    preferences.typeUnits = startTypeUnits
    displayDialogs = startDisplayDialogs

  • PATH CONTROL?  Selection of, changing fill and stroke colors, moving & arranging?  WHEN

    When is "Ideas" going to have BASIC, vector and path controls??? 
    The ability to select, move and arrange individual paths? 
    The ability to fill and change stroke colors?
    Shape tools?
    I would've expected this from the start.  This is not 1988 all over again... or is it?
    And what's this racket with "layers"?  You charge a premium for the app and then want people to pay again for simple features?  Layers would be less important if the app could do what it should to begin with. 

    Hi Mark,
    Please post ideas for improvements using the Submit an Idea button, please post each idea as a separate thread, this is so others can vote on the idea if they had the same one or like the idea, The product team reviews these when considering what features to add.
    I'm not really sure why Adobe has the option for additional layers as an in app purchase but you could create an idea post to request this changed as well.
    -Dave

  • How can I set iPad and iPhone with IOS6 to do not remember wifi and proxy credential

    My company want to implement the Password Policy to limit the failure logon count.
    Such as Lock users if they try logon with invalid password for 3 times.
    The problem occur on iPad and iPhone   my iPad using IOS6. and user had change their password.
    iPad and iPhone remember the Wifi and proxy credential. and try to connect with the saved credential.
    I monitor on my system and found Wifi connection try 2 times with saved credential and prompt for new password
    When I enter the corrected new password . So I the proxy server detected the invalid login 3 times or more and lock those account.
    So could anyone told me on how to set iPad and iPhone to do not save the user credential... ? 
    Thanks very much
    Weerayut

    Enable Airplane mode, then turn on WiFi

  • Painting with fills and strokes

    This question was posted in response to the following article: http://help.adobe.com/en_US/illustrator/cs/using/WS714a382cdf7d304e7e07d0100196cbc5f-6519a .html

    I am drawing a squiggly line in Illustrator CS6.  The line has a variable width with a gradient (imagine an intestine), and in a few places where the line bends sharply, the outside edges of the bent parts overlap.  The problem is that they are overlapping in the "wrong" order-- that is, if the squiggle were in 3D, the parts that should look like they should be behind other parts turn out looking like they are in front and vice versa.  I have tried searching the Help pages for "reverse order anchor points" and "switch stroke direction overlap" and the like to no avail. 
    What I want to be able to do is to "pull" certain anchor points of my line "forward" (in the same layer) so that that the edges of the line associated with them overlap in the other direction.  Thoughts??

Maybe you are looking for

  • One USB HD = Time Mach backup + NAS drive?

    Greetings - I have scoured the Apple forums and the net. My brain is full. May I ask a Yes/No question? I have an iMac running the latest OSX. I have an AEBS (it runs 802.11/n, so I assume it is one of the latest available, but don't hold me to that)

  • BDocs stay yellow - status I02 Written to qRFC Queue (intermediate state)

    We upgraded our system from SAP CRM 7.0 EHP3 SP3 to SP4. Now all the BDocs in smw01 stay yellow. I can manually reprocess them, then they become green. There is no error message and there are no dumps in st22. The CSA* queues are registered. The sche

  • Dayton Ohio Needs Apple Store

    Is apple going to put in a Dayton ohio area store There is two in columbus and next biggest city dont have one in Dayton area?

  • Tips for importing graphics into FCP

    Hi all, I am very new to Final Cut Pro, as my experience is as a print designer. I have to make a very simple slide show and luckily I am working with a friend who has experience with FCP. My job is to set up the graphics that we'll be importing into

  • 2.35:1 aspect ratio

    Does anyone know how much to crop the top and bottom of a picture to get the closest to 2.35:1 aspect ration?