dcsimg
A Flash Developer Resource Site

Page 1 of 2 12 LastLast
Results 1 to 20 of 37

Thread: Scroll using dynamic text from a txt file

  1. #1
    Junior Member
    Join Date
    Oct 2003
    Posts
    27

    Scroll using dynamic text from a txt file

    I'm working on a scroll that loads the text from a txt file .. But i'm having problems with a little detail..

    My Goal:

    What i'm trying to do is to have two pieces of scrollabe text on my site .. and that these texts be stored at the same txt file ..

    What Am i Doing ?

    The txt file has a "body=" statement wich i conected to the var input on the dynamic text box .. If you open the txt file i'll link right at the end of this thread you'll see what i mean ..

    what i did was add a "text=" statement on it and moved on to flash ..

    (see the fla file to understand what i'm saying now)

    In flash i put another tScroll movieclip (just duplicated it on the frame without duplicating clips) and then i breaked the movieclip once till i find the textHolder movieclip .. breaked it again and found the dynamic text box .. then i altered the var to text.. If i hadn't breaked the clips this 2 times i would have changed the original clip when i altered the var imput on the copied clip ..

    I hoped it would work but to my surprise it didn't .. there are two objetcs called mov.eventLoop and mov.process that don't allowed the clip to work since i lost them on the break deal .. If you regroup the instances (or whatever the individual elements are called) you won't get it back (obviously) and the clip won't work ..

    I really wouldn't like to have 2 txt files with 2 different texts .. part of that because to change the second movie's action (the copied) on the textHolder object and don't change the original i would have again to break the clip and lose the effect of mov.eventLoop and mov.process (wich i believed is about the scrolling itself) ..

    Bottom of line is:

    Can anyone help me to duplicate my scroll in a way i can call a different section of the txt file on each one of them ? Let me now if you didn't understand what i wanna do ...

    []s
    Calvin


    The files:

    http://www.helpme2.kit.net/original.zip

    P.S.: I'm using Flash MX and this scroll was originally made on Flash 5..
    Last edited by CalvinLean; 10-08-2003 at 08:08 PM.

  2. #2
    Huygens to Titan PCRIDE's Avatar
    Join Date
    May 2002
    Location
    PLUTO
    Posts
    1,335
    put this on the first frame

    upButton.onPress = function() {
    pressing = true;
    movement = -1;
    };
    upButton.onRelease = function() {
    pressing = false;
    };
    downButton.onPress = function() {
    pressing = true;
    movement = 1;
    };
    downButton.onRelease = function() {
    pressing = false;
    };
    _root.onEnterFrame = function() {
    if (pressing == true) {
    scrollWindow.scroll = scrollWindow.scroll+movement;
    }
    };




    or you could create an empty MC with the

    on(clipEvent)(load)
    data.txt.

    action
    All out of Honey Buffers, so i grabed a few Goose Heads

  3. #3
    Junior Member
    Join Date
    Oct 2003
    Posts
    27
    Are you sure you tryed this on the file i linked ? It didn't work ..


    I'm having som trouble making the second dynamic box to read the txt file after the left= statement .. The original Dynamic box reads all the text and don't stop before the left= .. Anyone can help ? How can i make the dynamic box stop reading a txt file after some point ?

  4. #4
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Your zip link is dead...

    Usually, starting a new variable with "&new_variable=bla...bla" within your text file, should keep your textfield from reading on...

  5. #5
    Junior Member
    Join Date
    Oct 2003
    Posts
    27
    Yeah it really worked to put the & before the statement .. thanks ..

    About the link i just tested it and it's fine .. try to download it again .. the domain is mine ..

  6. #6
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    The link still doesn't work for me...

    But your problem is solved, right?

  7. #7
    Junior Member
    Join Date
    Oct 2003
    Posts
    27
    no .. read the top of the thread again .. and you'll see the problem .. this thing you helped me was more like a doubt ..

    The link is fine .. try to right click it and save destiny as

  8. #8
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    No way I can get to that zip man!
    Can you attach it here?
    Or e-mail it to me?

  9. #9
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    PMed you an address! Check your PMs.

  10. #10
    Junior Member
    Join Date
    Oct 2003
    Posts
    27
    Already sent you the e-mail .. check your box .. meanwhile if more could help i would aprecciate it ..

  11. #11
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Do you want 2 textfields or only one in which you could load 2 different texts from the same text file?

  12. #12
    Junior Member
    Join Date
    Oct 2003
    Posts
    27
    my movie will have two scenes .. i wanna put one scroll on scene 1 and have a text 1 for it and put a scroll on scene 2 with a text 2 on it .. If to have that I have to duplicate the scroll i don't see it as a problem .. But if i could have just one scroll and different actions for it in each scene perhaps it would be better .. But i don't know if it is possible .. Understood ? I can explain it again if it isn't clear enough ..

  13. #13
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Having some difficulties in setting up 2 different scrolls... Since all involved movie clips have to be duplicated and scripted differently...
    Will look into loading 2 different sections of one text file in the same scroll, but on two different scenes or frames.

  14. #14
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Another question before I get into this...
    Does this really have to be Flash 5 compatible?

  15. #15
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    http://odin.prohosting.com/~oldnew/my_tSpeedScroll2.swf

    But this would only work with Flash player 6 and up!

    Hit the gray button to load the alternate text.

  16. #16
    Junior Member
    Join Date
    Oct 2003
    Posts
    27
    No is not that it has to work with flash 5 but it was made on flash 5 .. I don't see any problem .. can you send the fla to me or tell me what to do ?

    and thanks

  17. #17
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    See what you can make of it... And ask other questions if needed.
    Attached Files Attached Files

  18. #18
    Junior Member
    Join Date
    Oct 2003
    Posts
    27
    Can you xplain what you did ?.. I couldn't understand how does it work and it is not working .. u might have done somethin to the sample1.txt file that you didn't told me .. I saw it great on the swf you linked ..

    How can i put them in 2 scenes ? A simple copy and paste would do ?

  19. #19
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Yes I did modify the text file... Here's the whole thing, including the text file, that might clear it up.
    Attached Files Attached Files

  20. #20
    Junior Member
    Join Date
    Oct 2003
    Posts
    27
    I couldn't make them work in 2 different scenes .. i could use them in two frames but i needded the frames to have at least 5 blank keyframes between them .. how can i do that ?

    And for future use .. is that a way to make the 2 scrolls to open 2 different section of text from a same txt file but making the 2 scrolls on the same frame ? .. that should come in handy in the future ..

    But please focus on making them on 2 scenesor separated frames .. I really apreciate your help man ..

    thanks

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