Newbie Quesion: Best way to change colour of a movie

Hi,
Could someone tell me the best way to change the colour of
one element of a
movieclip in AS2?
Say for example I had a filled white circle in the middle of
a black square,
how can I change just the colour of the circle?
I have tried this.myColor.setRGB( color ); but that sets the
entire clip to
be of one colour. Do I need ( as I suspect ) one clip on top
of another or
is there any way of keeping details of the clip being
changed?
TIA
Wil

Cheers jdh,
This is one method I'd considered.
I'll give it a bash.
Wil
"jdh239" <[email protected]> wrote in
message
news:ens1vd$ahn$[email protected]..
> Don't know if this will help, but this code changes the
color of my
> "LOADING"
> text while it is loading. Should have the essential code
to do what you
> are
> looking for.
>
> Make the white circle a movie clip and pick the
following code apart to
> get it
> to change colors:
>
>
>
> stop();
> loading.gotoAndPlay(1);
> import flash.geom.ColorTransform;
> import flash.geom.Transform;
> var colorTrans:ColorTransform = new ColorTransform();
> var trans:Transform = new Transform(loading);
> trans.colorTransform = colorTrans;
> loadI = setInterval(loadF, 100);
> function loadF() {
> percent =
Math.floor(_root.getBytesLoaded()/_root.getBytesTotal()*100);
> if (percent<=39) {
> colorTrans.rgb = 0x0000FF;
> // blue
> trans.colorTransform = colorTrans;
> } else if ((percent>39) && (percent<60)) {
> colorTrans.rgb = 0x00FF00;
> // green
> trans.colorTransform = colorTrans;
> } else if ((percent>60) && (percent<80)) {
> colorTrans.rgb = 0xFF8000;
> // orange
> trans.colorTransform = colorTrans;
> } else if ((percent>80) && (percent<99)) {
> colorTrans.rgb = 0xFF0000;
> // red
> trans.colorTransform = colorTrans;
> } else if (percent>=99) {
> clearInterval(loadI);
> _root.gotoAndPlay(16);
> } else {
> loading.gotoAndPlay(1)
> }
> }
>

Similar Messages

  • Best way to change colour of shapes

    Hi, i am using the code below:
    public static Color shapeColor; for storing the current colour
    public void paint(Graphics g)
                Graphics2D g2D = (Graphics2D) g;
                for (Shape tempS : allShapes)
                    g2D.setPaint(shapeColor);
                    g2D.fill(tempS);
            } note that allShapes is an arraylist which stores all my shapes
    In another class i call the static variable and change it according to wat the user has selected.
    My problem is that when i change the colour, the colour for all my shapes change. For example if i create a shape with the colour green and then create another shape with colour blue, both will be blue.
    Thanks for your time.

    Ravi:
    Here's an example for you:
    import java.awt.Color;
    import java.awt.Dimension;
    import java.awt.Graphics;
    import java.awt.Point;
    import java.awt.Polygon;
    import java.util.ArrayList;
    import java.util.Random;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    public class Junk{
      Color[] starColor = {Color.RED, Color.WHITE, Color.BLUE};
      public Junk(){
        Random r = new Random();
        JFrame f = new JFrame("Junk");
        f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        MyJPanel p = new MyJPanel();
        p.setBackground(Color.BLACK);
        Star star = null;
        for(int i=0; i<50; i++){
          star = new Star(new Point(r.nextInt(490), r.nextInt(490)));
          star.setColor(starColor[r.nextInt(3)]);
          p.add(star);
        f.add(p);
        f.pack();
        f.setVisible(true);
      public static void main(String[] args){
        new Junk();
      class Star extends Polygon{
       Point location = null;
       Color color = Color.YELLOW;
       public Star(Point location){
         int x = location.x;
         int y = location.y;
         this.location = location;
         this.addPoint(x, y+8);
         this.addPoint(x+8, y+8);
         this.addPoint(x+11, y);
         this.addPoint(x+14, y+8);
         this.addPoint(x+22, y+8);
         this.addPoint(x+17, y+12);
         this.addPoint(x+21, y+20);
         this.addPoint(x+11, y+14);
         this.addPoint(x+3, y+20);
         this.addPoint(x+6, y+12);
       public void setColor(Color color){
         this.color = color;
       public Color getColor(){
         return color;
      class MyJPanel extends JPanel{
        private ArrayList<Star> l = new ArrayList<Star>();
        public MyJPanel(){
          this.setPreferredSize(new Dimension(512, 512));
        public void add(Star star){
          l.add(star);
        public void paintComponent(Graphics g){
          super.paintComponent(g);
          for(Star star: l){
            g.setColor(star.getColor());
            g.fillPolygon(star);
    }

  • Best way to change fund posted in an EBS document

    What is the best way to change the fund in one line item in a document produced when the electronic bank statment is processed? The bank charges fees that come through the statement and should post to a different fund then any other item such as checks, etc.
    I am trying a substitution but coming across the error Field COBL-KOSTL. does not exist in the screen SAPLKACB 0002.

    The error message that I was receiving...Field COBL-KOSTL. does not exist in the screen SAPLKACB 0002, was coming from function module EXIT_RFEBBU10_001 and include ZXF01U01. The programming code was attempting to default a cost center when the external transaction code = 661. The coding was removed and the default acct assignment cost center was added to the cost element master data. The substitution also worked correctly as it should.

  • Best way to change partition key on existing table

    Hi,
    Using Oracle 11.20.3 on AIX.
    We have a table about 800 million rows and 120gb in size.
    Want to try copies oif this table to evalaute different partitiong strategies.
    What is the quickest way to do this?
    Would have liked say datapump table 1 tro disk and datapumo import the data to new table but do the tables need to be of the same format.
    Thanks

    >
    Using Oracle 11.20.3 on AIX.
    We have a table about 800 million rows and 120gb in size.
    Want to try copies oif this table to evalaute different partitiong strategies.
    What is the quickest way to do this?
    Would have liked say datapump table 1 tro disk and datapumo import the data to new table but do the tables need to be of the same format.
    >
    First your subject asks a different question that the text you posted: Best way to change partition key on existing table. The answer to that question is YOU CAN'T. All data has to be moved to change the partition key since each partition/subpartition is in its own segment. You either create a new table or use DBMS_REDEFINITION to redefine the table online.
    Why do you want to export all data to a file first? That just adds to the time and cost of doing the op.
    What problem are you trying to use partitioning to solve? Performance? Data maintenance? For performance the appropriate partitioning key and whether to use subpartitions depends on the types of queries and the query predicates you typically use as well as the columns that may be suitable for partition keys.
    For maintenance a common method is to partition on a date by year/month/day so you can more easily load new daily/weekly/monthly data into its own partition or drop old data that no longer needs to be kept online.
    You should use a small subset of the data when testing your partitionings strategies.
    Can you do the partitioning offline in an outage window? If not then using the DBMS_REDEFINITION is your only option.
    Without knowing what you are trying to accomplish only general advice can be given. You even mentioned that you might want to use a different set of columns than the curren table has.
    A standard heap table uses ONE segment for its data (ignoring possible LOB segments). A partitioned/subpartitioned table uses ONE segment for each partition/subpartition. This means that ALL data must be moved to partition the table (unless you are only creating one partition).
    This means that every partitioning scheme that uses a different partition key requires ALL data to be moved again for that test.
    Provide some information about what problem you are trying to solve.
    >
    Is this quicker than datapump?
    >
    Yes - exporting the data simplying moves it all an additional time. Ok to export if you need a backup before you start.
    >
    Found artcle which talks about using merge option on datapump import to convert partitioned table to non-partitioned table.
    >
    How would that apply to you? That isn't what you said you wanted to do.

  • Best Way to Change Source System Client

    We initially had a ECC source client for BI as 35.  But over time, we suffered with good test data because the ECC team use client 15 and not 35.  We want to change BI 7 to use client 15.  I have created a new source system in RSA1 for Client 15 but when I try to delete client 35 and /or change the source client on a datasource, all the data mappings are deleted!
    I would really appreciate any advice or information on the best way to change the source R3 client for Bi without losing data mappings.  Point awarded and much respect
    Warm regards
    Lee Lewis

    Hi,
    Yes. There is a way to change the source system without deleting the old system. Please use the T.code BDLS and for more information refer the below link
    Re: Changing a Source System.
    OSS note 886102 will also give more information about this.
    Hope it helps.
    Thanks.

  • Best way to change config then change it back after a while.

    I spent some time today trying a couple approaches to this, but they all seemed a little klunky.
    I'm looking for the best way to change the BGP prefixes which are advertised out to an ISP, based on some check.  I want to set a timeout so the router won't attempt to send the route again for say 30 minutes after it is triggered, but then will start advertising it again, and monitor to see if the trigger condition returns.  If the trigger condition returns then again withdrawl the route for 30 minutes and so on.
    I'm using a prefix-list already to limit outbound route advertisments, so it seems simplest to just make a config change to remove one line in the prefix-list, then a few minutes later put it back.
    I tried just using the "cli command wait", but if I set the wait period too long, the applet seemed to die, and never ran the later cli commands to put the prefix-list line back.  There is also a exit-time clause for the event, but I couldn't figure out how to put the line back after the exit-time expired.  Lastly I tried doing an event with a watchdog timer, but also couldn't get that to work either.  Before I spend too much time working on differant options, I wanted to see if anyone had any recommendations.
    I've done some TCL scripting on Cisco routers, but that seemed to be overkill for this, and I wanted to keep the config easy to manage for peers who might not be as proficient in TCL scripting.
    This is intended for ASR-1002X routers if it matters.
    Any suggestions would be much appreciated.
    Thanks
    Derek

    Thanks for all your help Joe. 
    Ok, so here is my current script, which seems to be working pretty well (changing to entry-type "value" fixed the variability in detection times).  For testing in the script below, I'm using a 30 second timeout for when the line gets put back, and a 60 second timeout for when monitoring should resume after the event is triggered. The script checks the value of the OID every 5 seconds.
    The only other thing I would like to do with it that I can't figure out, is how to use an environment variable for the exit-time.  Ideally, I would just add a value, like 10 seconds, to the ATimeout variable.  However I can't figure out the syntax to just use a var for the exit-time.  Anyone know the secret (or if it is possible?)
    event manager environment ATimeout 30
    event manager environment q "
    no event manager applet DDOS_RESPONSE01
    event manager applet DDOS_RESPONSE01
    event snmp oid 1.3.6.1.4.1.9.9.166.1.17.1.1.21.80.65538 get-type exact entry-op gt entry-val "0" entry-type value exit-time 60 poll-interval 5
    trigger
    action 001 cli command "enable"
    action 002 cli command "config term"
    action 003 cli command "no ip prefix-list PUBLIC_NETWORKS seq 140 permit 10.4.1.0/24 le 32"
    action 004 syslog msg "DDoS Attack Detected. Removing Web Srvr Subnet from PUBLIC_NETWORKS for ($ATimeout) seconds."
    action 005 cli command "event manager applet RESTORE_PREFIX"
    action 006 cli command "event timer countdown time $ATimeout "
    action 007 cli command "action 101 cli command $q enable $q"
    action 008 cli command "action 102 cli command $q config term $q"
    action 009 cli command "action 103 cli command $q no event manager applet RESTORE_PREFIX $q"
    action 010 cli command "action 104 cli command $q ip prefix-list PUBLIC_NETWORKS seq 140 permit 10.4.1.0/24 le 32$q"
    action 011 cli command "action 105 syslog msg $q DDoS Attack Timeout ($ATimeout) reached. Re-adding Web Srvr Subnet to PUBLIC_NETWORKS. $q "
    action 012 cli command "action 106 cli command $q no event manager applet RESTORE_PREFIX $q"
    exit
    event manager environment ATimeout 30
    event manager environment q "
    event manager applet DDOS_RESPONSE01
    event snmp oid 1.3.6.1.4.1.9.9.166.1.17.1.1.21.80.65538 get-type exact entry-op gt entry-val "0" entry-type value exit-time 60 poll-interval 5
    trigger
    action 001 cli command "enable"
    action 002 cli command "config term"
    action 003 cli command "no ip prefix-list PUBLIC_NETWORKS seq 140 permit 10.4.1.0/24 le 32"
    action 004 syslog msg "DDoS Attack Detected. Removing Web Srvr Subnet from PUBLIC_NETWORKS for ($ATimeout) seconds."
    action 005 cli command "event manager applet RESTORE_PREFIX"
    action 006 cli command "event timer countdown time $ATimeout "
    action 007 cli command "action 101 cli command $q enable $q"
    action 008 cli command "action 102 cli command $q config term $q"
    action 009 cli command "action 103 cli command $q no event manager applet RESTORE_PREFIX $q"
    action 010 cli command "action 104 cli command $q ip prefix-list PUBLIC_NETWORKS seq 140 permit 10.4.1.0/24 le 32$q"
    action 011 cli command "action 105 syslog msg $q DDoS Attack Timeout ($ATimeout) reached. Re-adding Web Srvr Subnet to PUBLIC_NETWORKS. $q "
    action 012 cli command "action 106 cli command $q no event manager applet RESTORE_PREFIX $q"
    exit

  • Best way to change workstation

    What is the best way to change the workstation name and import it into
    edirectory.
    We constantly have user change computer name. Most of the time when we
    change the computer name it takes day to reflect on the edirectory. When
    rename the workstation object, we cannot even remote to the workstation.
    I have problem remote to through user name, I keep getting user does login
    when in fact the user is login. We have netware 6.5 with the latest
    service pack.

    Sang,
    It appears that in the past few days you have not received a response to your
    posting. That concerns us, and has triggered this automated reply.
    Has your problem been resolved? If not, you might try one of the following options:
    - Do a search of our knowledgebase at http://support.novell.com/search/kb_index.jsp
    - Check all of the other support tools and options available at
    http://support.novell.com.
    - You could also try posting your message again. Make sure it is posted in the
    correct newsgroup. (http://support.novell.com/forums)
    Be sure to read the forum FAQ about what to expect in the way of responses:
    http://support.novell.com/forums/faq_general.html
    If this is a reply to a duplicate posting, please ignore and accept our apologies
    and rest assured we will issue a stern reprimand to our posting bot.
    Good luck!
    Your Novell Product Support Forums Team
    http://support.novell.com/forums/

  • Best way to change TreeMap value?

    Hello,
    I am wondering what is the best way to change a value in a TreeMap? I have retrieved a value by .get on the key i.e.
    String aString = (TreeMap) aTreeMap.get(aKey);but would now like to change aString and ?.put? it back into the map?
    How would I do this?
    Thank you,
    Poot.

    but would now like to change aString and ?.put? it
    back into the map?Do I just have to keep a note on the (key,value) - especially key - change the value and then .put(key,value) back in? Though I'll need to remove the initial pairing if I do this since TreeMap won't allow duplicate keys!
    There must be an easier way as this.
    Thank you for your reply,
    Regards,
    Poot.

  • Best way to change the speed of a sequence of linked short clips?

    I have a sequenced project of about 150 short 1 second clips linked together via a crossfade transition... I would like to make the timelapse faster. What is the best way to change the speed of the sequence or the clips themselves? I would rather change the sequence for it would be less labor intensive I would imagine!!
    Thanks
    RD

    Or...select all the clips in the timeline, control-click (or right-click) on them and select 'Duration'. Change the duration to whatever will fit/fill the timespan you need, then hit OK.
    If you're needing to change the dissolve as well, you should remove all but one of them first, then drag the remaining transition into the browser. Dbl-click it into the viewer, set the duration of what you want, then use the hand icon at top right and drag it back into the browser. Rename it relevent to it's new duration, then control-click on it and select "Make Default".
    Now, set an inpoint at the first frame of your clips in the timeline, then drag all the shortened clips from the timeline into the canvas and release where it says 'Overwrite with Transition'.
    That's another way to accomplish this.
    K

  • I have an iphone4s and my two daughters have an iPod each. They both have used my apple id. How is the best way to change our their ids as I have been told we all need separate ids to be able to message each

    I have an iPhone and my two daughters both have iPods. They both use my apple Id and I would like to change their Id. . How is the best way to do this? My younger daughter had her iPod only last week and when she set it up, she ended up with all my phone contacts on Her iPod. If I change her apple Id will this remove the contacts from her iPod and leave mine intact on my phone?

    Anyone...anyone? Bueller...Bueller?

  • Best way to change Matrices/Articulations in VSL...

    Hi...
    I've been using VSL for quite a while now, but with things getting more complicated I was hoping to streamline how I change matrices/articulations.
    Firstly, I'm not a fan of keyswitching. I think it's messy and an odd way of doing things. It interferes with scores and isn't displayed clearly in the event list.
    So my usual technique is to assign them to a controller (usually #73) and write the data in the hyper editor. That works to an extent, but when you have more than 3 articulations, it becomes difficult to work out which articulation you are selecting (either physically or as data). I have further issues though...
    1/ When this data is written to (say) controller #73, it doesn't appear in the Hyper Editor (like vol/mod etc). So every time I have to select 'Create Hyper Set for Current Events' to see it which is a pain. How can I get this to always display in Hyper Editor?
    2/ Is it right that VSL won't change articulation in time if it receives the matrix change and the note at the same time: on the beat. Currently I always have to write the matrix change just before the note change otherwise its not picked up in time.
    3/ How do you guys do it?!
    Thanks as always - Barack Obama

    Well I think keyswitching in VSL combined with velocity/cell crossfading techniques is the best way to go. If you don't want to see your keyswitches in the score editor just set the note range of your Staff style so it doesn't display them. So if you have keyswitches from e.g. C1-F#1 set the note range in the staff from C2-G8 and you´ll be fine.
    Also I susally use a combination of the piano roll and in the "view" tab click->Hyper Editor->Other->a little menue opens with Controller numbers, choose the Controller number (e.g.#73)->your controller data gets displayed below the piano roll-> save that as a screenset, so you can always switch screensets to see that combination of the Piano Roll and the selected Corntroller.

  • What would be the best way to change the color of part of this image? (image attached)

    I am on XP using PS CS4.
    Please see the photograph below. I would like to change the color of the shirt/apron of this lady & I was wondering what the best way is to do that. I know if I try replace color, the white bowls change color as well. In the past I have isolated parts of images using paths, but I wanted to know if that was the most efficient way. Maybe masking is the answer. I just wanted to hear from the pros
    Thank you.

    You're welcome!
    Refine Edge button is in the options bar when the QST is active.
    Refine Mask should be available whenever a mask is targeted.

  • Best way to change my Apple id on iPhone

    Years ago my wife and I shared my apple id.  She now has her own account and id, but we still see linking in our calendar and other places - unwanted linking, but cannot seperate it.
    I'm getting a new device in a couple of days and want to be able to link with my self only.  I'm guessing creating an all new id is going to be my solution.
    Any advice on the best way to set up a new id, and keep all of my paid for apps?

    You can share the same ID for purchasing from the iTunes and App stores without creating any issues.  But you should use separate IDs for other services such as iCloud, iMessage, FaceTime, etc.  When you get your new phone, restore it to the backup of your old one to transfer your data and settings (http://support.apple.com/kb/HT2109) and set up your shared iCloud account to sync your iCloud contacts, etc. to your phone.  Then to migrate your data to a new iCloud account, go to Settings>iCloud and turn all data that is syncing with iCloud (contacts, calendars, etc.) to Off.  When prompted choose to keep the data on the iPhone.  (If you are syncing iWork documents with iCloud, also open your iWork apps and turn off iCloud syncing and choose to keep the documents on your phone.)  After everything is turned off, scroll to the bottom and tap Delete Account.  (This will only delete the account from this phone, not from iCloud.  Your wife's phone will not be effected by this.)  Next, set up a new iCloud account on your phone using a separate Apple ID and turn iCloud data syncing for contacts, etc. back to On.  When prompted, choose Merge.  This will upload the data to this new account.  At this point you will have two different iCloud accounts, one for each phone, with identical data on them.
    You will then have to go to icloud.com on your computer and sign into each iCloud account separately and manually delete the unwanted data (such as deleting your wife's contacts from your account, and vice versa).  These changes will be reflected on each phone.
    If you are sharing the same ID for iMessage, go to Settings>Messages>Send & Receive, tap the ID, sign out, then sign back in your your new ID.  If you are sharing the same ID for FaceTime, do the same thing in Settings>Facetime.

  • Best way to change IPTC phone number?

    The phone number I have in the IPTC data for pretty much all (40k+) my photos needs to be changed.
    Looking for any suggestions as to the best way to go about that. Thanks

    In Library Module, select all photos, go to Metadata tab, change your Phone#, hit enter. It will update everything.

  • Best way to change from Oracle 11gR2 Standard Edition to Standard one..?

    Hi,
    I have installed Oracle 11gR2 Standard edition+ installed database and additional software (which looks into the Oracle 11g database) in around 20 PCs (company)
    But now the management says that they got license only for 11g Standard one edition (Standard one is significantly cheaper than standard edition)
    So I have to change the Oracle edition from Standard to Standard one now..We only need standard one edition features in the PCs.
    Can somebody please advise what would be the best way to do this? Do I have to uninstall all database and reinstall standard one edition again?
    I will be grateful if somebody says some kind of upgrade is possible(in this case degrade!)..
    Pls ..waiting for a reply..its very urgent!
    Thanks&regards..

    Yes I agree there was standard and standard one options and I selected standard.
    But how to confirm?
    SQL> select banner from v$version;
    BANNER
    Oracle Database 11g Release 11.2.0.1.0 - Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE 11.2.0.1.0 Production
    TNS for 32-bit Windows: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    It doesnt say anything..where else will I check?
    Also as said in the previous post,
    1) SE max. 4 sockets , SE1 2 sockets <======== hardware restriction
    2) No RAC on SE1
    3) No Automatic Workload Management (a RAC feature) on SE1
    These apply to us.
    So can we get a SE1 license, since we are not on RAC and satisfy all criteria for standard one.
    Thanks&Regards

Maybe you are looking for

  • Can i recover data from an app to my new iphone ? (Sleep talk recordings)

    Love the sleep talk app and i have some old recordigs i would like to recover. As they are not included when i synced the app to my new 4S, the only thing i can think of is restoring everything from my old iphone by syncing the old backup stored in i

  • Adobe audition 3... chanel R and L get mix during recording ?

    Hi, I have the new Adobe Audition 3 intsalled. I don't know what's happening... When I try to record a song it won't be recorded in Stereo, I mean both tracks R and L get mixed... For example on R there's a guitar sound and L the singer's voice, so w

  • BAPI for Depriciation simulation data of Internal order(Investment tab K01)

    Hi experts, I am new to asset accounting. I have to a requirement where in the Asset class(ANIA-ANLKL) and capitalization data(ANIA-AKTIV) will be provided to me in an input file for a particular internal order(AUFK-AUFNR) and through my custom ABAP

  • Selected G/L a/c doesnot exist

    Hi I have defined a House Bank Account, now i am creating an outgoing cheq payment method for that bank account.  The system gives the following error message : "Selected G/L A/c does not exist. Payment methods for payment wizard default A/C. Message

  • Very Annoying Problem Installing i-Tunes Ver 8.02

    This rambles... But bear with me... So I moved from London to some small village in the middle of nowhere. I had broadband before moving and when I got here I found that I COULD NOT GET IT HERE ONLY DIAL-UP. Now I know that some of you are rolling yo