User Tag List

Results 1 to 5 of 5

Thread: Get height of string as an expression

  1. #1
    Clicker Fusion 2.5 (Steam)

    Join Date
    Oct 2010
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Get height of string as an expression

    I'm trying to make a popup tooltip-like object, using an active system box and a string that displays its alterable paragraph. I'd like for the system box to change size according to the length of the string, but I can't find a way to get the number of lines in a string or similar as an expression. Is there a way to do this?

  2. #2
    Clicker Fusion 2.5 Developer
    PBarwick's Avatar
    Join Date
    Jul 2014
    Posts
    390
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    There's a 'calculate text rect' object which I've never used, but I imagine will help you.

  3. #3
    Clicker Fusion 2.5 (Steam)

    Join Date
    Oct 2010
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I found the extension, and it looks like it will work for my needs. Now I just need to figure out how to use it. :\

    Edit
    I figured it out. Thanks!

  4. #4
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Mystr's Avatar
    Join Date
    May 2014
    Posts
    61
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Could you explain how it works, I just can't find it anywhere.

    Plus, when I try to understand, it seems to give wrong numbers... Does this work with a String Object ?

  5. #5
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Mystr's Avatar
    Join Date
    May 2014
    Posts
    61
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I double post just to give the community the answer to my question.

    To calculate the area of a string, you just have to "set font" "set text " and "set max width" to the string you want to calculate (if you don't do that, the CTR will give you wrong values). Then, you can "Calculate area", you are now able to retrieve the height or the width of the string you asked your CTR to calculate.

Similar Threads

  1. Replies: 4
    Last Post: 30th January 2014, 01:47 PM
  2. Can't resize the text of an string with expression. What should I do?
    By Fuuriokun in forum Multimedia Fusion 2 - Technical Support
    Replies: 9
    Last Post: 9th September 2013, 06:08 PM
  3. Setting global string via an expression
    By MJK in forum SWF/Flash Export Module Version 2.0
    Replies: 5
    Last Post: 14th June 2010, 11:30 AM
  4. string object missing expression
    By MrMan in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 22nd April 2007, 10:56 AM
  5. How to write " in a string using Expression Editor
    By MelliGeorgiou in forum Multimedia Fusion 2 - Technical Support
    Replies: 10
    Last Post: 15th August 2006, 01:58 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
  •