User Tag List

Page 2 of 2 FirstFirst 1 2
Results 11 to 17 of 17

Thread: How can I set the RGB of an object to the current value of the line selected on list?

  1. #11
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,159
    Mentioned
    28 Post(s)
    Tagged
    1 Thread(s)
    This may be a little handyer to pre-set

  2. #12
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export Module
    Robotica's Avatar
    Join Date
    Jul 2015
    Location
    Las Vegas, NV and Orange, CA.
    Posts
    263
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Schrodinger, yes that is for sure the name of the list!

    Muddymole, I've never been familiar with colors being one value. I am not sure how that works.

  3. #13
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export Module
    Robotica's Avatar
    Join Date
    Jul 2015
    Location
    Las Vegas, NV and Orange, CA.
    Posts
    263
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Schrodinger, your example works. I guess I didn't think of adjusting the name of the list. LOL thanks man!

    I will try to have it delete the entry after applying the color... then later copying the list back from a secondary list so it's ready for the next rotation. I will try to do that all on my own so I don't bother anyone. Thanks for the example!!

  4. #14
    Clicker Fusion 2.5 Developer

    Join Date
    Jul 2008
    Location
    UK
    Posts
    1,393
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)
    Yes, a color is just a single value.
    All the GetRGB() expression does is calculate this value using the following formula:

    Color = Red + (Green * 256) + (Blue * 65536)

    I'm not suggesting you need to use that formula though. All I'd suggest is that the list starts out empty, and you have an event at the start of the frame to fill it with the desired values.

    + Start of frame
    -> List: Add line: str$( GetRGB( 255, 0, 0 ))
    -> List: Add line: str$( GetRGB( 0, 255, 0 ))
    etc...

    + Whenever...
    -> Something: Set color to: val( List Select$( "RGB_LIST" ))

    That way it's still easy to edit, and the list only contains the color values, ready to use.

    Not that there's anything wrong with Schrodinger's method - it's just more complicated.

  5. #15
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,159
    Mentioned
    28 Post(s)
    Tagged
    1 Thread(s)
    The example works, I guess I didn't think of adjusting the name of the list. LOL thanks man!
    No problem, just told you three times to check that name
    Glad it works now!

    As for Muddymole's advice, you can obtain an RGB int value this way:
    R*256*256 + G*256 + B = RGBValue
    (or use Fusion's GetRGB function)

    Your delete-reload solution should work, good luck.

    edit:
    Muddymole's formula is correct, Fusion handles RGB values this way.
    I guess there is not a unified model?
    i.e.:
    http://www.shodor.org/stella2java/rgbint.html
    this evaluates using the above formula, as many other online resources

  6. #16
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export Module
    Robotica's Avatar
    Join Date
    Jul 2015
    Location
    Las Vegas, NV and Orange, CA.
    Posts
    263
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Awesome guys, thank you for the guidance. I am very thankful for the advice.

    I have to leave tomorrow out of town for a week or two and I will return September to finish this project. Very excited to be just over 50% done so this thread has helped A LOT. Really, thank you guys!

  7. #17
    Clicker

    Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCHTML5 Export ModuleiOS Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)Universal Windows Platform Export Module (Steam)
    ratty's Avatar
    Join Date
    Apr 2012
    Posts
    1,165
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    My method is to have each line contain a string such as "255, 255, 255" without the quotation marks. Then set the String Tokenizer to parse that line, with ", " delimeter. Then use the following expression:

    GetRGB(Val(Element$( "String tokenizer", 0 ) ), Val(Element$( "String tokenizer", 1 ) ), Val(Element$( "String tokenizer", 2 ) ) )

Page 2 of 2 FirstFirst 1 2

Similar Threads

  1. Customizable line in a list object
    By Ls2 in forum Fusion 2.5
    Replies: 2
    Last Post: 12th August 2015, 09:47 PM
  2. Selected Object List Object - was it ever made?
    By Dines in forum Extension Development
    Replies: 5
    Last Post: 21st October 2011, 09:34 AM
  3. [BUG] - List object "Set Current line" action
    By Nico in forum Android Export Module Version 2.0
    Replies: 3
    Last Post: 10th September 2011, 12:01 PM
  4. Change List Object Line Color - One Line Only?
    By drnebula in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 21st December 2008, 05:58 PM
  5. List Object can't tell if any line is selected?!
    By jayklik in forum Multimedia Fusion 2 - Technical Support
    Replies: 10
    Last Post: 3rd September 2006, 06:18 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •