A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: setRGB

  1. #1
    Junior Member
    Join Date
    Oct 2001
    Posts
    23
    i have a MC which changes the colour of the MC (instance name toolbar) on stage.
    it changes the colour but when the "close setting box" button,"cross box on the corner" the colour changes back to the original...

    please have a look at my SWF then click"setting"
    http://www.gomi.btinternet.co.uk/3g.htm

    thank you

    10reynard

  2. #2
    Senior Member
    Join Date
    Apr 2001
    Posts
    433
    What code do you use to
    A) inititially set the color of the bar
    B) change the color of the bar
    C) close the tool box

    When posting, please include details that people will need to know to answer your Q

  3. #3
    Junior Member
    Join Date
    Oct 2001
    Posts
    23
    hello, ArcticX

    A) inititially set the color of the bar
    eh, i just drew it normally...i see. i need to set the colour with script here. but how?
    B) change the color of the bar
    that is;

    on (release) {
    setColour = new Color(_root.toolbar);
    setColour.setRGB( 0x666666);
    }

    C) close the tool box
    on (release) {
    this.gotoandstop(1);
    _root.gotoandstop(1);
    }

    regards,

    10reynard

  4. #4
    Senior Member
    Join Date
    Jul 2000
    Location
    Not on the dole any more
    Posts
    1,040
    I think I see your problem: when you close the Settings box, you're sending the movie back to frame 1 -- which effectively 'resets' everything.

    A better way to do this would be to have the box hidden (_visible=0) at first. Then to make it appear, set _visible=1. To make it disappear, set _visible=0 again.

  5. #5
    Junior Member
    Join Date
    Oct 2001
    Posts
    23
    oh, that's a really good idea! thank you.
    yes it works! i almost gave up on learning... thanks so much!

    is there any books you could recommend to any actionscript beginners? i don't have much time so would like to avoid bible- i'm now using VQG flash advanced.

    10reynard

  6. #6
    Junior Member
    Join Date
    Oct 2001
    Posts
    23

    oops, problem again

    hi,

    thought it worked but problem again.
    i have two frames in the main in order to disable buttons while the MC is being played.
    (got help from here http://board.flashkit.com/board/show...hreadid=214212)

    is ther anyway to parse the value of new colour to the first frame?
    please get FLA (.rar) http://www.gomi.btinternet.co.uk/3g.rar sorry the file is large-(1mb) i removed irelevant stuff though.

    thank you,

    10reynard

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