A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: meaning of trace(

  1. #1
    Junior Member
    Join Date
    Jan 2002
    Posts
    28
    if (_currentFrame==45) {
    trace("The movie is now on 45");
    } else {
    trace("The movie is not on 45");
    }

    may someone plaeas just explain the meaning and function of trace(

  2. #2
    hehe

    trace just outputs a bit of text, used when you're debugging stuff. I suggest you check out the tutorials on this site.

    you don't need the traces in there for thecode to work, put whatever you want into each bit...


    if (_currentFrame==45) {
    ******put your code in here which should run*****
    ******when the user is on frame 45 *********
    } else {
    *** they are not on 45 at all *******
    }


  3. #3
    Senior Member
    Join Date
    Jun 2001
    Location
    las vegas,nv
    Posts
    694
    Traces can also give you an idea of how much processor your code uses in the event you have a lot of clips, animation, and fades. Tracing variables can help you design a more efficient movie and, of course as was mentioned, de-bug it in the event something goes haywire. Colin Moock (ASDG) uses a lot of traces in his book and many posters here just plug that in or say "yourActionsHere" in place of more chunky code when answering questions.

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