A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: I need to remove those quotes

  1. #1
    Junior Member
    Join Date
    Nov 2000
    Posts
    6
    Hi folks,

    I just recently upgraded to Flash 5 from 4 and am having a little problem setting a variable to be something other than a string. When I am adding an action and use the Set Variable predefined action I do not know how to get rid of the quotes so as I can make it numeric instead of a string. This is probably very simple and I will kick myself for asking. Thanks in advance.


  2. #2
    Member Pepember
    Join Date
    Jul 2001
    Location
    Berlin
    Posts
    886
    the actions panel turned to normal mode, there's a checkbox in the bottom right corner, which makes the variables value an expression or not. check expression and you get your number as number instead of string.
    but you might want to use the expert mode and just type in
    variable = value ;
    you don't need setVariable() anymore in flash 5

  3. #3
    i regularly kick myself..........
    but this one regularly kicks me:

    im setting variables like so:
    set ("_root.b" add a add "mod" add b add "origx", _root.globx)

    deep breath......

    as an example above should do this...

    _root.b1mod1origx = -1000

    unfortunately the -1000 is coming through as a string (how do i change it to a number) i tried:


    Number (_root.globx)


    but it returned NaN


    this has happened before and is driving me insane!
    if this makes no sence i had just done a LocalToGlobal to the coordinates..... that involved an object as per the help... (i didnt understand the process fully, but it seems to return the right number.... or string or object or whatever it is.... DAMN IT!)

    thanks...

  4. #4
    Senior Member
    Join Date
    Mar 2001
    Posts
    436
    Maybe try using the slash notation instead of the dot notation since i'm guessing you know flash 4, the dot notation is probably new to you since it's new to flash 5.

    AlPhA
    http://www.cyberpitstop.net

  5. #5
    hmmmm...
    just so you know, the

    Number (expression)

    thing worked, but i had to do it to earlier expression... odd, very odd indeed....

    OI! my dot notation is on the money

    thanks all the same

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center