dcsimg
A Flash Developer Resource Site

Page 2 of 2 FirstFirst 12
Results 21 to 38 of 38

Thread: Help me please!!!!!

  1. #21
    Senior Member
    Join Date
    Nov 2000
    Location
    Columbus OH
    Posts
    178
    very true, very true.

    thanks again.
    delstrange

  2. #22
    Senior Member
    Join Date
    Nov 2000
    Location
    Columbus OH
    Posts
    178
    one more thing oldnewbie. I'm wondering if you can help me with something else if you're not too sick of me yet?

    I have 5 textfields in a mc called newsbox that reads in a txt file called news.txt. I have them scroll upwards and stop on each textfield to display the text in them for a few seconds and then continue scrolling to the next one. I want it to check to see if any of the textfields contain and empty string and if so, go to an play the first frame so that you don't see any dead space.

    This way, if I only have 2 pieces of news to tell you about, it won't continue to play through the other empty text fields that aren't reading anything from the news.txt file.

    How can I check to see if one is empty and then play the first frame to start the loop over again?

    I tried using this but it doesn't work:
    if(news3.text == null){
    gotoAndPlay("start");
    }

    The text file looks like this:
    news1=This is some news.
    &news2=This is some more news.
    &news3=
    &news4=
    &news5=

    Thanks for your help.

    I have attached the files if you want to take a look.
    Attached Files Attached Files
    delstrange

  3. #23
    Senior Member
    Join Date
    Feb 2001
    Location
    On the fifth floor.
    Posts
    1,202
    Now it's my turn to be faster then Oldnewbie.
    Attached Files Attached Files

  4. #24
    Senior Member
    Join Date
    Nov 2000
    Location
    Columbus OH
    Posts
    178
    Thanks sergwiz, but it's still not working. If one of the textfields is empty it still plays through the whole loop instead of going back to the beginning as if it doesn't even recognize the code. But if I put a ! in front of the code it goes back to the beginning but it also ignores the text even if there is some in there. Also if I place text in all of the variable fields and it plays to the end, it then loops back but doesn't display the same text. You'll see what I mean if you look at the attached zip.

    Thanks again.
    delstrange

  5. #25
    Senior Member
    Join Date
    Nov 2000
    Location
    Columbus OH
    Posts
    178
    forgot to add the zip.
    Attached Files Attached Files
    delstrange

  6. #26
    Senior Member
    Join Date
    Feb 2001
    Location
    On the fifth floor.
    Posts
    1,202
    To say true I don't understand what's going on? The variant I've sent to you is working for me. I've checked it with 3-4-5 items in "news" and it works OK. However I use font "Arial" cause I don't have your font. Maybe the problem is in the font? But I doubt it.
    Try this fla. I've checked it many-many times with different number of news items. It works!!!! If it does not for you – I give up.
    Oldnewbie, where are you? Come on here and check it, please.
    Attached Files Attached Files

  7. #27
    Senior Member
    Join Date
    Nov 2000
    Location
    Columbus OH
    Posts
    178
    sergwiz, okay it works for part of it now. I looked at the one you did and it looped like it is supposed to. But if I take out the text for news3 lets say, it doesn't jump back to the beginning. If it comes to any text field that is empty it should go back and play the beginning. Because if I don't have any news in textfield news3, then there won't be any news in textfields news4 or news5, so it doesn't need to keep playing to the end of the loop because it will just show dead space until it reaches the end and starts over again.

    But one part of it is fixed now, so I thank you.
    delstrange

  8. #28
    Senior Member
    Join Date
    Feb 2001
    Location
    On the fifth floor.
    Posts
    1,202
    If it comes to any text field that is empty it should go back and play the beginning.
    It works exactly this way!!! It jumps to beginning and loops again.
    Send you swf with text file. Not a fla, but swf.

  9. #29
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Sergwiz is right!

  10. #30
    Senior Member
    Join Date
    Nov 2000
    Location
    Columbus OH
    Posts
    178
    Okay, I have attached the .swf and .txt for you to look at. I don't understand, but if I take out news3 in the .txt it still continues to play. There is just a long pause before it shows news4. So I don't know. Even the one you sent me does the same thing. Maybe it's my computer, but I don't see how.

    Thanks.
    Attached Files Attached Files
    delstrange

  11. #31
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Ah! But you shouldn't be doing it that way!

    In the text file, if you want the text to cut off after the third one then don't leave text4 & text5 in there...

    This is what the text file should look like:

    news1=This is some news. &news2=This is some more news. &news3=holy crap. &


    Nothing after the last &.

  12. #32
    Senior Member
    Join Date
    Nov 2000
    Location
    Columbus OH
    Posts
    178
    okay, got it. I didn't think it would matter. I thought it would recognize the empty string after the = and still work. Guess not. Thank you very much.

    I'm stupid, my fault.

    Thanks.
    delstrange

  13. #33
    Senior Member
    Join Date
    Feb 2001
    Location
    On the fifth floor.
    Posts
    1,202
    Dear Oldnewbie, thank you very much! You rescued me from getting crazy.
    delstrange take a look at http://flash-abovo.narod.ru/delstrange.htm

  14. #34
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Slow server! But yep!

  15. #35
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Mind you Delstrange, this could all be done with AS, using LoadVars() (much better than loadVariables) and using setInterval (other variables in the text files), so that the text can stay on the screen longer or not, depending on it's lenght.

  16. #36
    Senior Member
    Join Date
    Nov 2000
    Location
    Columbus OH
    Posts
    178
    okay, I'll try that now that it is finally working due to my stupidity. Thanks again for both of your help.
    delstrange

  17. #37
    Senior Member
    Join Date
    Feb 2001
    Location
    On the fifth floor.
    Posts
    1,202
    delstrange,one more thing I should tell you.
    If you use writing in the news.txt this way:

    news1=bla-bla-bla&
    news2=ops=ops-ops&
    news3=shut-shut-shut&
    news4=&
    news5=&

    It should be better to use script in the frames like this:

    if(........ == ""){
    gotoAndPlay("start");
    }

    But, if you write that way:
    news1=bla-bla-bla&
    news2=ops=ops-ops&
    news3=shut-shut-shut& // and nothing more

    then script should be this:

    if(.......== NULL){
    gotoAndPlay("start");
    }

  18. #38
    Senior Member
    Join Date
    Nov 2000
    Location
    Columbus OH
    Posts
    178
    that is actually how I first had it with the if(...... == "") but it didn't seem to work either. But that doesn't mean it wouldn't work, it was probably something else I was doing wrong in conjunction.

    Thanks again.
    delstrange

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