A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: correct me if im wrong

  1. #1
    The next Squaresoft
    Join Date
    Sep 2004
    Location
    Zanarkand
    Posts
    215

    correct me if im wrong

    hmmm, i just
    wanted to know if there is somthing wrong
    with my script:

    code:

    if(instancenameofmovieclip._currentframe == 32){
    variable -= anothervariable;
    }



    cause, i dont think it works!

    oh yeah is it possible to do this:
    variable = "hello"

    then the dynamic text would show "hello"
    when refered to that variable?

    thnx a bunch!
    "Are those gummy worms? Can I have some?"

    "Nevermind, I just saw one move by itself..."

  2. #2
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    Nothing wrong with the script, syntax-wise. Its probably where and how you use it that is wrong.

    It would depend if you placed the code on a button , in a timeline, if the path is right and so on.

    Its hard to say witout more details.

    Generally ( if the code is not on a button ), the code has to be repeated until the conditions are true, not just placed on a frame.

    Just mnake a textfield with variable name hello and have ....

    textFieldName = "hello"

    ...in the code.

    -Pelle Piano
    // Image Gallery
    www.studiobild.com
    // Photo Blog
    http://talesofthepixel.blogspot.com

  3. #3
    The next Squaresoft
    Join Date
    Sep 2004
    Location
    Zanarkand
    Posts
    215
    hmm well, it does run on a frame

    a one single frame(lets say its on frame 10)

    and i have a button that makes my timeline go and stop
    on frame 10

    is that a reason why its not working?


    textfield is also the same as instance name
    of the dynamic text?

    anyhoo, thnx!!

    (oh yeah, how the heck you got 13,000+ posts!?)
    "Are those gummy worms? Can I have some?"

    "Nevermind, I just saw one move by itself..."

  4. #4
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    The textfield needs a VARIABLE name. for you script to work.

    The movieclip you are checking need to be present on the timeline when th check is done.

    -Pelle Piano
    // Image Gallery
    www.studiobild.com
    // Photo Blog
    http://talesofthepixel.blogspot.com

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