User Tag List

Results 1 to 8 of 8

Thread: replace color

  1. #1
    Clicker Fusion 2.5
    ayejes's Avatar
    Join Date
    Feb 2008
    Posts
    83
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    replace color

    Still having problems with replacing a pixel color.

    In a pervious post "Color Array", I was asking about wanting a color structure to hold 14 different colors that I could randomly pick. This would mean 14 indexes that would hold the three different values for rgb.

    drnebula suggested using the array object and setting it up so that x=14 and y = 3. The x 1 through 14 would hold the index. The y =1 through 3 would hold the three rgb colors.

    I tried this and all I get is a back screen.

    This first example (stars.mfa) shows the stars being changed from yellow to white without using the array object.


    The second example (stars_101.mfa)is my attempt to use the array object with only one color value (white). But as I have stated it comes up just a black screen.




    Attached files Attached files

  2. #2
    Clicker Multimedia Fusion 2 DeveloperiOS Export Module
    Nifflas's Avatar
    Join Date
    Jul 2006
    Posts
    2,613
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: replace color

    Due to an MMF limitation, you can't continuously replace colours within a fastloop and paste it into the background.

    In this case, it would however not have worked anyway, as your example do have a few bugs. I've attached a solution that works as long as you don't involve a fastloop into the creation process. It can help you track down the other bugs you had in your application.

    If you want to do it with fastloops though, the best solution is to store a few differently coloured stars in different directions of the object. At start of frame, replace those colours with colours from the palette, and when the loop that pastes them is running, just randomize the direction.

    Here's a list of problems and bugs in your example:

    #1 You use the fast loop object. Why? The feature is built into MMF2, you don't need an extension for it.

    #2 You use 3 values in the array to store the Red, Green, and Blue values. You only need one. Just save the value as an integer using GetRGB(>red<, >green<, >blue<)

    #3 You can't change the colour of an object by using an expression like red,green,blue - to get the correct result you must use GetRGB(>red<, >green<, >blue<) - except if you did what I suggested in #2 (you'll already have the right colour value in the array in that case).

    #4 You must replace the previous colour with the new one. Assuming your object is white, if you first change white into red, it will work. If you then change white into blue, nothing will happen as nothing white now exists in the image - you should change red into blue.

    ...I think that was all I hope this can help!
    Attached files Attached files

  3. #3
    Clicker Fusion 2.5
    ayejes's Avatar
    Join Date
    Feb 2008
    Posts
    83
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: replace color

    I have been working with your example but I am having one problem. The line of code which says to "replace colour with previous colour("star")by ...

    Anyways, I know where to find replace colour, which is under animation, but I am not seeing how you get the rest of that line from.

    Could you take me through the steps of how you get that line of code for replacing colour.


    Thanks

  4. #4
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module

    Join Date
    Feb 2007
    Location
    Queensland, Australia
    Posts
    317
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: replace color

    It's a named alterable value.

  5. #5
    Clicker Fusion 2.5
    ayejes's Avatar
    Join Date
    Feb 2008
    Posts
    83
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: replace color



    I still need one more bit of help with that line of code. I have figured out all but the "by Val(...)" I have not been able to figure out where you get that from.


    Thanks

  6. #6
    Clicker Fusion 2.5
    ayejes's Avatar
    Join Date
    Feb 2008
    Posts
    83
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: replace color

    Just to clarify. I understand where the "by" comes into play. It is the "Val(...)" that I can not find. I have been looking through every object but I can't seem to figure out where this comes from. Every value comes up with something other than just "Val".


    Thanks

  7. #7
    No Products Registered

    Join Date
    Oct 2006
    Location
    Sweden
    Posts
    1,141
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: replace color

    Val(...) is a function for converting strings to numbers... It's on a button in the expression editor.

  8. #8
    Clicker Fusion 2.5
    ayejes's Avatar
    Join Date
    Feb 2008
    Posts
    83
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: replace color

    And here I spent half a day going through all the various possibilities in the various objects.

    Well slap me silly(figuratively), for all the hundred or more times I had the expression editor open and I never bothered to look at the editor itself. I kept going to the retrieve object info button.

    THAAAANK YOU!

Similar Threads

  1. [BUG 256.34] Replace color doesn't always work in standard 256 color mode
    By Corlen in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 26th October 2014, 10:21 AM
  2. Replace color: bug?
    By Pineapple in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 10th January 2012, 11:53 PM
  3. A bug with replace color
    By Grim in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 23rd October 2009, 08:26 PM
  4. Color bug in 'replace color' option
    By N64Mario in forum Multimedia Fusion 2 - Technical Support
    Replies: 27
    Last Post: 7th June 2009, 03:18 AM
  5. Replace Color?
    By TheUpperHand in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 24th March 2008, 10:02 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
  •