Problem getting the color of a scaled object (gradient)

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • Hi guys!

    I'm trying to get a specific color of a gradient based on the position of an Active (an arrow in this case) in order to change the background color to the one obtained. The problem is that I also want to make the gradient scalable but by doing this the color is no longer obtained correctly, it's like the gradient is not really scaled and the color is still obtained as if it were the original size.

    Please login to see this attachment.

    I don't think I've done something wrong so it definitely looks like a bug.

    I leave an example with the problem. Tell me what you think... and if anyone knows a way to do it without this bug. Thanks!

    Please login to see this attachment.

    Hispanic Community of MMF2 and CF2.5 / Comunidad Hispana de MMF2 y CF2.5: Please login to see this link.

  • I have no idea why this is happening? im not sure on what the math would be exactly but for example you could try adding the scaling into the get rbg event?

    Set Background Colour: RGBAt( "Color bar", X( "Arrow" ) - ( X Left( "Color bar" ) * value( "Trackbar" ) ) / 100, 0 )

    im not sure if this will work but maybe a workaround for it but you are right i have alot of issues with scalling in mmf.

  • Hi, bump this up as I would like to know why this is happening also, if someone can explain.

    I managed to work around it using individual actives for each colour, scaling and moving them.

    Please login to see this attachment.

    I was worried this problem would happen when scaling an application, but I tried it and seems ok .

  • Hi, bump this up as I would like to know why this is happening also, if someone can explain.

    I managed to work around it using individual actives for each colour, scaling and moving them.

    Please login to see this attachment.

    I was worried this problem would happen when scaling an application, but I tried it and seems ok .

    For gradients with few colors it's fine but it is not an option if you want to use a gradient with many colors.

    Anyway, I did a few more tests and was able to solve it using the following formula:
    Set RGB coefficient to RGBAt( "Gradient", ( X( "Arrow" ) - X Left( "Gradient" ) ) / XScale( "Gradient" ), 0 )

    Please login to see this attachment.

    Hispanic Community of MMF2 and CF2.5 / Comunidad Hispana de MMF2 y CF2.5: Please login to see this link.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!