User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 20

Thread: Expression editor question

  1. #1
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleSWF Export ModuleUnicode Add-on
    Boba Fonts's Avatar
    Join Date
    Jan 2009
    Location
    Northern Italy
    Posts
    228
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Expression editor question

    I'm having problems with this expression.
    I need to set a series of Alterable Values to the numeric conversion of a series of strings

    value( "Hotspot1 WalkTo" )
    value( "Hotspot2 WalkTo" )
    value( "Hotspot3 WalkTo" )
    value( "Hotspot4 WalkTo" )
    value( "Hotspot5 WalkTo" )
    etc.

    but I'm trying to write a single action for many strings, so I need to enter the string's name through an expression which retrieves the first part of the name from an alterable string of the objects:

    value( "Alterable String J( "Group.Indicator" )" + "WalkTo" )

    but obviously I get a syntax error. I've tried many combinations of quotes and brackets without success.

  2. #2
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleSWF Export Module
    DavidN's Avatar
    Join Date
    Jun 2006
    Location
    Boston, MA, USA
    Posts
    4,044
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Expression editor question

    You have to leave quotes off anything that's to be interpreted - in your example:

    value( Alterable String J( "Group.Indicator" ) + "WalkTo" )

    However, I'm still not sure what you're trying to do - the string "Hotspot5 WalkTo" (assuming the contents of Alterable String J is ("Hotspot 5 ") doesn't have a direct numeric conversion in the same way that, say, "6" or "94" do.

  3. #3
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleSWF Export ModuleUnicode Add-on
    Boba Fonts's Avatar
    Join Date
    Jan 2009
    Location
    Northern Italy
    Posts
    228
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Expression editor question

    Quote Originally Posted by DavidN
    You have to leave quotes off anything that's to be interpreted - in your example:

    value( Alterable String J( "Group.Indicator" ) + "WalkTo" )
    I've tried without quotes too, but I get a syntax error nonetheless.


    Quote Originally Posted by DavidN
    However, I'm still not sure what you're trying to do - the string "Hotspot5 WalkTo" (assuming the contents of Alterable String J is ("Hotspot 5 ")
    yes, the contents of alterable string J of the Group.Indicator is a "Hotspot1", "Hotspot2", etc. different for each object, so combined with + " WalkTo" (preceded by a space) they should return the names of specific string objects I've created that contain the numeric values (when retrieved as values, since they're strings) I need.

    value( Alterable String J( "Group.Indicator" ) + " WalkTo" )
    or
    value( [color:#FF0000]"[/color]Alterable String J( "Group.Indicator" )[color:#FF0000]"[/color] + " WalkTo" )

    should work, but it doesn't, and it's a problem with quotes, I suspect, not with values, since the combined names refer to existing string objects containing text (numeric coordinates) retrieved as value. :crazy:

  4. #4
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module
    Stephen's Avatar
    Join Date
    Aug 2008
    Location
    Montana
    Posts
    4,515
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: Expression editor question

    Try:

    Str$( Val( Alterable String J( "Group.Indicator" ) ) )+ " WalkTo"

    stephen1980
    _____________________________________________
    Nivram's Examples -Need extensions? Send me a PM.-


  5. #5
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module

    Join Date
    Jun 2006
    Posts
    6,773
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: Expression editor question

    I don't think you can dynamically reference alterable strings, if that's what you're trying to do.

  6. #6
    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: Expression editor question

    You can in the latest HWA build, but only by index. AltStrN$( "Active", > Enter value here <) for strings and AltValN( "Active", > Enter value here <) for values.

  7. #7
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module

    Join Date
    Jun 2006
    Posts
    6,773
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: Expression editor question

    Really? I didn't know the names were even stored at runtime.

  8. #8
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleSWF Export ModuleUnicode Add-on
    Boba Fonts's Avatar
    Join Date
    Jan 2009
    Location
    Northern Italy
    Posts
    228
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Expression editor question

    Quote Originally Posted by stephen1980
    Try:

    Str$( Val( Alterable String J( "Group.Indicator" ) ) )+ " WalkTo"

    stephen1980

    the expression editor says "Please enter a numeric expression"

  9. #9
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module
    RickyRombo's Avatar
    Join Date
    Mar 2008
    Location
    Somewhere between here and there
    Posts
    3,167
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Expression editor question

    Val(Str$( Val( Alterable String J( "Group.Indicator" ) ) )+ " WalkTo")

    :grin: lol

  10. #10
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleSWF Export ModuleUnicode Add-on
    Boba Fonts's Avatar
    Join Date
    Jan 2009
    Location
    Northern Italy
    Posts
    228
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Expression editor question

    Just tried that one too


    EDIT:
    I tried with "value", not "Val": with Val says it's a valid expression! I'm going to test it.

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Val vs. Value (expression editor)
    By Pineapple in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 28th December 2013, 06:19 PM
  2. Expression Editor Syntax - Newbie question
    By JoergB in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 18th November 2011, 06:06 AM
  3. Expression Editor and Icon Editor
    By OldGuy in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 27th September 2008, 01:21 AM
  4. Simple expression editor question
    By pinacoladaxb in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 26th July 2006, 02:22 AM

Posting Permissions

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