How to increase RGB values of a radial gradient of shapes every 1 or 3 frames?

Hello everybody. I really need help. Indeed, i would like to inrease the RGB values of my radial gradient of my shape every 1 or 3 frames. I did it manually, but its very long. So i would like to know if anyone can help me to make it with code, it's will be most efficient and fast. I've already created my shape with a radial gradient. Now i would like just to increase the RGB values of my radial gradient. Can you help me please!
This code create my shape with a radial gradient:
var radType:String = GradientType.RADIAL;
var radMatrix:Matrix = new Matrix();
radMatrix.createGradientBox(120,120);
var tabCouleurs:Array = [0xFFFFFF, 0xAEAEAE];
var radColours:Array = tabCouleurs;
var radAlphas:Array = [1, 1];
var radRatios:Array = [0, 255];
var gradients:Sprite = new Sprite();
gradients.graphics.beginGradientFill(radType, radColours, radAlphas, radRatios,radMatrix);
gradients.graphics.drawRect(0, 0, 120, 120);
gradients.x = 50;
gradients.y = 50;
addChild(gradients);

Not really sure what you mean by increase RGB values. But if that is what you want to do then that is what you need to do.
clear() your graphics
increase the values
redraw
Nothing particularly difficult there. What is the problem you are having?

Similar Messages

  • How to get RGB value from pixel of an image.

    hi, i need a little help... Is there any EASY way to get RGB value from point of an image? I searched javadoc but i only found very complex getRGB method working only with regions, and saving data into arrays.
    Is there any other way that can use for example image.getGraphics() (so, i mean to get RGB from point of Graphics object) ?
    Btw.: If you know, how Sprite.collidesWith(Sprite s, Boolean pixellevel) is working (with pixellevel = true), please write me. It could solve my problem too.
    Thanks

    Is there any other way that can use for example image.getGraphics() (so, i mean to get RGB from point of Graphics object) ?You can think of the graphics object like a pencil or paintbrush. Does a paintbrush know the color of the surface it is painting on? No.
    Btw.: If you know, how Sprite.collidesWith(Sprite s, Boolean pixellevel) is working (with pixellevel = true), please write me. It could solve my problem too.Download the reference implementation from this site and see for yourself.
    luck, db

  • How to read RGB values into Set

    Hi,
    I have been told that to count the total number of unique colors in an image is by reading each pixel RGB values into a set.
    I have checked this and it is true that the set can do this fine if considering only either one channel of the R,G or B (this does not allow me to know the exact number of color exist). However, I am confuse on how to have all three R, G and B values into a set so that the set can consider the whole 3 values of RG and B as a color which can then be differentiated separately.
    I think pixelgrabber allow to getPixel RGB values but I am working with JIU getsample method. Perhaps I missed out other methods in JIU which have the same functionality as in pixelGrabber.
    I am working on an image analysis so I need to figure out this out first.
    I am hoping anyone can help me out with this and I thank you.

    as mentioned, pack the rgb values into an integer.
    instead of a set, you will get better performance and
    memory useage using a sorted, dynamically allocated
    int array. With some minor work, you better this
    structure by using more than one sorted array and a
    cheap rgb mask hashing mechanism. I don't know what
    JIU is, but look at the source of java.awt.Color for
    details on how to pack/unpack rgb values.Hi,
    Thank for your feedback. I have tried to pack the rgb values into an integer. At the moment I just making used of Set (will look into probably ArrayList after I get the rgb values correct). However, I am not sure whether my code is correct (which I doubt) or not. Not sure how the output looks like that. If you could have a look at it and confirm me, I would be very much thanking you.
    the code snippet:
    public void countColour() {
    int r, g, b;
    int[] rgb1DArray = new int[h * w];
    int[] rgb = new int[4];
    Set set = new HashSet();
    int alpha = 255;
    for (int i = 0, cnt = 0; i < w; i++) {
    for (int j = 0; j < h; j++) {
    r = intImg.getSample(0, i, j);
    g = intImg.getSample(1, i, j);
    b = intImg.getSample(2, i, j);
    System.out.println(r+ "," g "," +b); // just checking rgb values
    //rgb[0] = alpha;
    rgb[1] = r;
    rgb[2] = g;
    rgb[3] = b;
    System.out.println(rgb[0]+ "," rgb[1] "," rgb[2] "," +rgb[3]);
    rgb1DArray[cnt] = ((rgb[1])<<16)|
    ((rgb[2]<<8))|(rgb[3]);
    System.out.println("rgb["+cnt+"] :" +rgb1DArray[cnt]);
    output:
    Image file size is 230 x 236
    204,221,203
    0,204,221,203
    rgb[0] :13426123
    204,212,191
    0,204,212,191
    rgb[1] :13423807
    180,166,140
    0,180,166,140
    rgb[2] :11839116
    236,209,166
    0,236,209,166
    rgb[3] :15520166

  • How to Get RGB Values from a CMYK Color in the DOM (CS5)

    (CS5, Actionscript)
    Hi all,
    I have an InDesign document containing TextFrames whose border colors are specified as a CMYK array.
    I would like to be able to get its color specification as its closest RGB equivalent.
    Does the InDesign DOM contain a method for doing this for me automatically?  If not, what workarounds are there?
    TIA,
    mlavie

    Here's how to convert RGB to CMYK:
    function rgb2CMYK (r,g,b){
        var color = app.documents[0].colors.add({space:ColorSpace.RGB,colorValue:[r,g,b]});
        color.space = ColorSpace.CMYK;
        var retVal = color.colorValue;
        color.remove();
        return retVal;
    The same idea for the reverse.
    For info on converting to grayscale, check out this:
    http://in-tools.com/article/scripts-blog/convert-colors-to-grayscal-in-indesign/
    HTH,
    Harbs

  • Sun Java 7.0: How to increase the value of

    Hi everyone,
    In Sun Java 6.1 and former webservers there used to be certain parameters in magnus.conf file like:-
    RqThrottle 128
    DNS off
    Security off
    PidLog /export/agent6/amit_server/https-server1/logs/pid
    User agent6
    StackSize 131072
    TempDir /tmp/https-server1-0430e9ef
    But in the new web server Sun Java 7.0 there are no such parametes.
    The application which i am running needs to increase the value of the parameter "StackSize".
    I added this parameter in magnus.conf file of the new Sun Java 7.0 web server but it is ignoring it and giving a warning as "StackSize directive ignored".
    Can you all suggest some way by which i can increase the StackSize as my application doesn't run without it.

    In WS 7.0 TP release, the magnus.conf configuration file is retained for NSAPI plug-in configuration, but all functionality not related to NSAPI plug-ins has been moved to server.xml. Most of these configuration parameters are now new elements that will be created/defined in server.xml. For StackSize, I believe the server.xml will have an element like follows:
    <stack-size>131072</stack-size>
    where 131072 is the stack size in bytes. You should be able to configure using GUI or the admin CLI.
    Thanks
    Manish

  • How to find RGB values of an image in MIDP 2.0?

    I am builiding a midlet in which i m supposed to take an image and than i want to find RGB values of all pixels
    .After Finding the RGB values i want to store them in an array,and sort that array to find 5 Most repeated element of that array.Also i wanna construct color from those 5 Values and Display Those Colors.Can Anyone
    Guide me Through This?

    I have not used Vision much but I would be very surprised if you would be able to do this directly.  It should be straight forward to get an average intensity with or without Vision (convert image to 2D matrix and average the values, for instance) -- the difficulty will be correlating the calculated values back to Lumens, etc. This could likely be done but it would probably require you to come up with the calibration curve and would be sensitive to setup changes, dust on the lens, equipment aging, etc. and these things should not be discounted.  This is why, particularly if  you're in a production environment, you'd probably better off buying a commercial meter and talking to it via a driver than to try to do it yourself -- they've already taken these things into account. 
    One more thing, in the picture you attached, any luminosity calculations you made would probably be skewed low as the white is saturated (railed) in spots and those under-reported values would affect your average.  If you did try to come up with a Lumen calculation, you would probably want to turn your aperature and/or exposure down before creating the calibration curve.

  • How to drag out a series of radial gradients on one layer?

    Please pardon me, I am new to Photoshop. I am following this tutorial I got on the net and I have come unstuck on a stage which says,
    "Drag out a series of purple to transparent radial gradients on the "highlight purple" layer".
    I am failing to drag out more than one gradient on the layer. so my question is, how do I drag out more than one gradient on the same layer???

    If the Gradient is set to fade several Gradient Tool applications should be no problem.
    Or one could set the Blend Mode for the Gradient Tool to something else than Normal depending on the Gradient.

  • How to extract node value by using xpath in orchestration shape

    i want extract the node value by using xpath in expression shape in orch, then assign to variable.
    then decide shape in if branch im using check condition based nodevalue .
    str = xpath(Message_3, ("string(/*[local-name()='Root' and namespace-uri()='http://BizTalk_Server_ProjectRNd2.Schema3']/*[local-name()='no' and namespace-uri()=''])"));
    but i got below error:
    xlang/s engine event log entry: Uncaught exception (see the 'inner exception' below) has suspended an instance of service 'BizTalk_Server_ProjectRNd2.BizTalk_Orchestration1(f3c581d3-049f-8a8a-9316-fc1235b03f99)'.
    The service instance will remain suspended until administratively resumed or terminated. 
    If resumed the instance will continue from its last persisted state and may re-throw the same unexpected exception.
    InstanceId: 020779be-713d-408c-9ff4-fd1462c2e52c
    Shape name: Expression_1
    ShapeId: b865a3e1-7ebe-410d-9f60-8ad2139ad234
    Exception thrown from: segment 1, progress 10
    Inner exception: There is an error in the XML document.
    Exception type: InvalidOperationException
    Source: System.Xml
    Target Site: System.Object Deserialize(System.Xml.XmlReader, System.String, System.Xml.Serialization.XmlDeserializationEvents)
    The following is a stack trace that identifies the location where the exception occured
       at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
       at Microsoft.XLANGs.Core.Part.XPathLoad(Part sourcePart, String xpath, Type dstType)
       at BizTalk_Server_ProjectRNd2.BizTalk_Orchestration1.segment1(StopConditions stopOn)
       at Microsoft.XLANGs.Core.SegmentScheduler.RunASegment(Segment s, StopConditions stopCond, Exception& exp)
    Additional error information:
            <no xmlns=''> was not expected.
    Exception type: InvalidOperationException
    Source: System.Xml
    Target Site: System.Object Read_string()
    The following is a stack trace that identifies the location where the exception occured
       at System.Xml.Serialization.XmlSerializationPrimitiveReader.Read_string()
       at System.Xml.Serialization.XmlSerializer.DeserializePrimitive(XmlReader xmlReader, XmlDeserializationEvents events)
       at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)

    Hi,
    as per your  code i got below error 
    Uncaught exception (see the 'inner exception' below) has suspended an instance of service 'BizTalk_Server_ProjectRNd2.BizTalk_Orchestration1(f3c581d3-049f-8a8a-9316-fc1235b03f99)'.
    The service instance will remain suspended until administratively resumed or terminated. 
    If resumed the instance will continue from its last persisted state and may re-throw the same unexpected exception.
    InstanceId: f5fffb05-e6d6-4765-83da-4e6c9696dd8a
    Shape name: Expression_1
    ShapeId: b865a3e1-7ebe-410d-9f60-8ad2139ad234
    Exception thrown from: segment 1, progress 10
    Inner exception: There is an error in the XML document.
    Exception type: InvalidOperationException
    Source: System.Xml
    Target Site: System.Object Deserialize(System.Xml.XmlReader, System.String, System.Xml.Serialization.XmlDeserializationEvents)
    The following is a stack trace that identifies the location where the exception occured
       at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializat
    this is my schema:
      <?xml version="1.0" encoding="utf-16"
    ?>
    <xs:schema xmlns="http://BizTalk_Server_ProjectRNd2.Schema3" xmlns:b="http://schemas.microsoft.com/BizTalk/2003"
    xmlns:ns0="https://BizTalk_Server_ProjectRNd2.PropertySchema" targetNamespace="http://BizTalk_Server_ProjectRNd2.Schema3" xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:annotation>
    <xs:appinfo>
    <b:imports>
      <b:namespace
    prefix="ns0" uri="https://BizTalk_Server_ProjectRNd2.PropertySchema" location=".\PropertySchema.xsd"
    />
      </b:imports>
      </xs:appinfo>
      </xs:annotation>
    <xs:element name="Root">
    <xs:annotation>
    <xs:appinfo>
    <b:properties>
      <b:property
    name="ns0:no" xpath="/*[local-name()='Root' and namespace-uri()='http://BizTalk_Server_ProjectRNd2.Schema3']/*[local-name()='no' and namespace-uri()='']"
    />
      </b:properties>
      </xs:appinfo>
      </xs:annotation>
    <xs:complexType>
    <xs:sequence>
      <xs:element
    name="no" type="xs:string" />
      <xs:element
    name="name" type="xs:string" />
      </xs:sequence>
      </xs:complexType>
      </xs:element>
      </xs:schema>

  • How to increase budget value

    hello everyone,
    I want to increase the budget value for my user for purchasing(making a PR) a new material.
    so please tell me how can i do it.

    You may want to check below web page
    http://sap.ittoolbox.com/groups/technical-functional/sap-acct/budget-controlling-in-sap-46c-1857690
    http://help.sap.com/saphelp_em70/helpdata/en/e9/ea21fed8344747870dd12b95f525a0/content.htm

  • How to Increase distributed Transaction parameter value in oracle 10g r2

    Hello,
    Can you please let me know how to increase the value of Distributed Transaction Parameter in oralce 10g R2
    Thanks
    Usman

    Why do you want to increase this?
    If you are getting ORA-02042, you have to reduce the number of concurrent distributed transactions you are running or restart your database to clear existing ones.

  • How to increase Reconciler threads

    I am running reconciler against AD and I can see 6 threads are doing jog. Do you know how to increase its value?
    Reconciler is running very slow. I am not sure how to increase its value
    Any idea will be highly appreciated
    Thx

    Hi;
    AFAIK there is no way to increase it
    Regard
    Helios

  • How can I convert (or switch) the RGB percent values from the LR histogram into RGB values which are shown e. g. in PS/CameraRAW?

    In LR 5.5 (same in previous versions) the RGB values in the histogram are shown in percent (relativ) values. I prefere to see the absolute values, but I can`t find any way to switch. Maybe this option is intentional disabled, because LR works in 16-Bit mode this would result in values up to 2^16. But as i compared the relativ values from LR with the absolute values from PS i run into a conversion problem. The following example shows the differences:
    CameraRAW : RGB, 128,0,0
    Lightroom: RGB, 43,8%, 19,0%, 6,2%
    CameraRAW: RGB, 0,128,0
    Lightroom: RGB, 29,8%, 47,5%, 17,5%
    Mainly i have two questions:
    1. Is there any possibility to change the percent RGB values in LR to absolut values?
    2. How can i convert CameraRAW values to LR values (see above)?

    TThe reason that a design decision was made from the beginning of LR to show only the percentage values was that RGB values are dependent on the color space and the LR histogram and numerical readout are derived from the Develop module's display space which is a hybrid color space with ProPhoto RGB primaries and the sRGB TRC. Thus the numerical values in the display would be different from the exported RGB image (in an orthodox space) and it was feared that this would be misleading. When soft proofing was introduced, because it involved converting the display to an orthodox space, it became possible to use the 0-255 scale in that mode.

  • How to find the RGB Values of a Color for Hyperion

    When customizing your Hyperion forms, we come across situations where we need the exact RGB value of a given color. This article explains a simple technique to find the RGB values using MS Paint and the Calculator applications that come as standard applications with your operating system.
    Here are the steps to find the exact RGB value of a given color.
    1) View your Hyperion form using IE, scroll down until you see the color you want to find the RGB value and press the "Print Screen" button (in your keyboard).
    2) Open MS Paint and click Edit -> Paste or simply Ctrl+V. What you saw in the browser will be copied as a new untitled image.
    3) Select the Color Picker tool and click on an area that has the color you want to match.
    4) Now go to Edit Colors... option and click on the "Define Custom Colors >>" button. The color you picked will be selected on this palette. At the bottom right hand corner you will see the Red, Green and Blue values you need. Note down the R,G,B values (given in decimal).
    5) Now we need to find out the hexa-decimal values that correspond to those decimal values. This is where we use the simple Calculator. Open the Calculator application from Program -> Accessories. Switch to the scientific mode by clicking View ->Scientific.
    6) By default it will be in the decimal number mode. Enter the R value (238 in this example) and click on the Hex radio button. The corresponding hexa-decimal value (EE in this case) will be shown in the dial.
    The selected color in this case has the same value for R, G and B. (In fact, all shades of gray has the same values for R, G and B.) Therefore, the RGB value of the background color that we need is #eeeeee. Repeat step 6 to find out the hex value for the Green and Blue elements, if they are different.
    Tip:
    If you find it difficult to pick a color, zoom the image by pressing Ctrl+PageDown or using View -> Zoom -> Custom... option.

    These tips are to find the RGB color of HFM default row where row is text and text lines in data columns are also visible to business users as Yellow as an input cell. By applying the same RGB color you can apply the same color to your data cells or rows. This post shows how to identify color from any web view-able object.
    Regards,
    Manaf

  • How to change the text color of a label by using RGB values without changing the background colour?

    xCode interface builder:
    When I try to change the color property of a label's text by using the RGB values, the background color also changes to the same value automatically.
    in other words:
    While setting the RGB values for text colour of labels, the background colour also changes unless we use the sliders.
    How to make sure that only the color of text changes and not the background?

    You can simply do this.
        [labelname setTextColor:[UIColor colorWithRed:38/255.0f green:171/255.0f blue:226/255.0f alpha:1.0f]];

  • How to increase on(press) movie Clip value

    I have a variable at frame 1,
    var a=0;
    i have a movie clip and i am writing a code on it
    on(press){
    a=a+1;
    trace(a);
    bt the tracing value is showing NaN, how can i increase that
    value ??
    even if i am doing the same thing with button then its
    working fine.
    but the problem with Movie Clip. so any one can tell me, how
    can i solve this problem ?
    Thanks

    to make a variable global just put _global. in front of it...
    like _global.a = 0
    As for tracking clicks on several movies, here is what I
    would do:
    All this code would go on your main time line, but change
    yourMC1 and yourMC2 to the names of your movies. duplicate as
    needed.

Maybe you are looking for

  • Windows 7 left side is cutted!

    I dont know how it happened i shuted down my computer and on the other day when I switched it on the left side was cutted i need help i looked in google for a solution but i didnt find nothing!I think that the problem is in the screen resolution so i

  • MaxDB and R3ta - Note 1385089

    I need to start a heterogeneous copy using R3load (Linux --> HP-UX IA64) of a 2,6 TB MaxDB 7.7 and checked beforehand some notes and found the above note stating The general R3ta support for MaxDB will be available for SAP Systems with MaxDB 7.8 and

  • Unable to upgrade to Mavericks from OS X 10.6.8

    I am unable to upgrade to Mavericks. I have all of the required requirements. Enough RAM and Hardrive space. I am running 10.6.8 Snow Leopard. HELP!

  • Shortdump using F4

    Hi Experts, I am getting a dump like: Runtime Errors SAPSQL_WHERE_UNKNOWN_OPERATOR Except. CX_SY_DYNAMIC_OSQL_SYNTAX Error in the ABAP Application Program The current ABAP program "SAPLSDH3" had to be terminated because it has come across a statement

  • Smart folders and drag&drop

    Morning. Is there a way to create a smart folder and then drag&drop some emails into this smart folder, so that I can find in this folder all emails I've collected in it without that these emails are moved out of their respective original mailbox? Th