1 Reply Latest reply on Dec 19, 2007 4:36 AM by Newsgroup_User

    sprite() to member() - looks simple

    bS_nickname Level 1
      I have working a loading of a txt file to establish cuepoints in a video sprite/member. I would like this to be loaded before the movie begins. Unfortunately, I can only get this to work if the sprite in on the stage in the first frame.

      on loadCuePoints
      fileio=new xtra("file")
      fileio.openfile(the moviePath & "settings.txt", 0)
      sprite(2).cuepoints=value(fileio.readfile())
      end

      what I thought should work would be just replacing the sprite() with the member() – not so…

      member("member name").cuepoints=value(fileio.readfile())

      I keep getting an error when using the member() and not the sprite() and the sprite is not on the stage of frame 1.

      Thoughts? thanks

        • 1. Re: sprite() to member() - looks simple
          Level 7
          > I would like this to be loaded before the movie begins.
          Why? Loading the data in an on BeginSprite handler sounds like a much better
          approach. If you need to load the data on startup, store it in a global, and
          then, set the cuepoints in the beginsprite handler.

          "bS_nickname" <webforumsuser@macromedia.com> wrote in message
          news:fka04k$hnk$1@forums.macromedia.com...
          >I have working a loading of a txt file to establish cuepoints in a video
          > sprite/member. I would like this to be loaded before the movie begins.
          > Unfortunately, I can only get this to work if the sprite in on the stage
          > in the
          > first frame.
          >
          > on loadCuePoints
          > fileio=new xtra("file")
          > fileio.openfile(the moviePath & "settings.txt", 0)
          > sprite(2).cuepoints=value(fileio.readfile())
          > end
          >
          > what I thought should work would be just replacing the sprite() with the
          > member() ? not so?
          >
          > member("member name").cuepoints=value(fileio.readfile())
          >
          > I keep getting an error when using the member() and not the sprite() and
          > the
          > sprite is not on the stage of frame 1.
          >
          > Thoughts? thanks
          >
          >
          >