A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: help with frame navigation and xml

  1. #1
    Member
    Join Date
    Jul 2009
    Location
    Florianópolis
    Posts
    81

    help with frame navigation and xml

    Hi,

    I'd like to have a function that tells a MovieClip to go to a specific
    frame and then in this frame, look for a scpecific tag in an XML file,
    based on the frame's label, and then take some text (a bunch of
    actually) that is in the XML node and put it on a TextField.

    For example, clicking on a "Next Frame" button it will go to the next
    frame (which has a label "intro") of the movieclip and then search
    "content.xml" for the tag that contains the attribute name equal to
    "intro" and then put the content of the ".@TEXT" node into an empty
    TextField that is already positioned in this "intro" frame.

    Am I obligated to have the code in this specfic frame?

    I'm doing it because if I have too much text within textfields in an
    FLA file it becomes incredibly lagged and therefore impossible to
    work.

    I've tried to use the event ENTER.FRAME to do that but it rendered the
    SWF lagged and consomming way too much memory...

    Help !! Thanks in advance!!
    Isaac

  2. #2
    Mod cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,449
    What I recommend you is to load individual XML files in each frame. It becomes much easier to control.
    - The right of the People to create Flash movies shall not be infringed. -

  3. #3
    newb of many sorts Ralgoth's Avatar
    Join Date
    Apr 2002
    Posts
    466
    the name ENTERFRAME is a little misleading. It's not referring to the timeline, but the frame-rate of the flash movie.

    So if your movies frame rate is 30 fps, then the ENTERFRAME listener will try to fire 30 times per second, even if you tell the timeline to stop(); which would cause lag.

    If you have an empty dynamic textfield on the stage, and a string of text in your timeline actions, you shouldn't have a problem just adding myTextField.text = myString.
    Search first, asked questions later.

Tags for this Thread

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