Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 5 of 5
  1. #1
    Member
    Join Date
    Nov 2005
    Posts
    55
    Member #
    11943
    Hello,

    I've been working with importing external text files into a Flash document with moderate success.

    The tutorials I've found seem to work pretty well, but only if I place the text box in the main stage. The text is placed where I want it, even formatted correctly, but I need it to work in a Movie Symbol. And everytime I move the boxes and actions into the symbol it stops displaying the text.

    I'll keep working on it, but if anyone could point me towards a comprehensive, but rudimentary tutorial on how to do this I'd appreciate it. (I'm an absolute beginner with action script)

    Thanks.

  2.  

  3. #2
    Senior Member glyakk's Avatar
    Join Date
    Nov 2003
    Location
    USA
    Posts
    1,263
    Member #
    3828
    Liked
    6 times
    Do you have the path to the text box correct? where is the load script? in your symbol or on the stage? It sounds like your only problem is specfying the correct path to your dynamic text box.


  4. #3
    Member
    Join Date
    Nov 2005
    Posts
    55
    Member #
    11943
    The path was correct. It worked on the main stage, but not in the Movie Symbol.

    Since I posted yesterday, I found a solution.

    This is the action script I used that worked on the main stage, but did not work in the Movie Symbol:

    Code:
    loadVariables("text/text1.txt","_root");
    The variable in the text file is placed in the "Var" field of the Properties. This script is in the stage, but was also in the Symbol when I tried it there.

    This is the action script I used that did work in the Movie Symbol:

    Code:
    myData = new LoadVars();
    myData.onLoad = function() {
    text2.htmlText = this.mv_text;
    };
    myData.load("text/text1a.txt");
    "text2" is placed in the "Instance Name" field of the Properties. "mv_text" is the variable in the text file. This script is in the Symbol.

    I'm dealing with a Hydra, because even when I solved this problem, another appeared.

    What I'm trying to do is to create a scrolling menu - text and images need to be dynamic so I can change them easily. It needs to scroll one way when I rollover one button, and sroll the other way when I rollover a second button. The solution I found works with a timeline - the buttons move forward by "playing" the movie on a rollover of the first button. It moves backwards with a script that sends the timeline backwards frame by frame in a loop. The new problem is that the dynamic text disappears when the frames move backward.

    The programmer who wrote the second script above seems to think I can create the same movement with an action script rather than a timeline. I'm still working on it.

    If anyone has any suggestions, I'd appreciate any help I can get.
    Thanks.

  5. #4
    Senior Member glyakk's Avatar
    Join Date
    Nov 2003
    Location
    USA
    Posts
    1,263
    Member #
    3828
    Liked
    6 times
    because of the fact that your script worked when put into your symbol is proof that your path was wrong. [minicode]_root[/minicode] referes to the main timeline. [minicode]_root.movieclip[/minicode] (where 'movieclip' was the name of your symbol) would point to your movie clip from the main timeline. [minicode]this.movieclip[/minicode] would have worked also. But glad you got it worked out.

    And yes you can create it movement and animation without using timelines in flash, in most instances it is prefered since it gives you a vast amount of control you simply cannot get though the timeline.


  6. #5
    Member
    Join Date
    Nov 2005
    Posts
    55
    Member #
    11943
    Thanks for the response. Your explanation makes sense, and clears up some confusion, but when I tried it it didn't work. :ermm:

    I changed the script in the Symbol like this:

    Code:
    loadVariables("text/text1.txt","_root.Symbol_1");
    I also tried:

    Code:
    loadVariables("text/text1.txt","this.Symbol_1");
    "Symbol_1" is the name of the symbol. The script is in the Symbol.
    Did I miss something?


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 04:54 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com