Help please with 'if text file changes'...

Ask a Question related to Macromedia Flash Actionscript, Design and Development.

  1. #1

    Default Help please with 'if text file changes'...

    I need to have a .swf that loads an image and text from a text file that looks
    like this:
    'john' [url]http://mysite/1.jpg[/url]
    I need the .swf to moniter for changes in that same text file every 2 seconds.
    If the text file changes to:
    'sue' [url]http://mysite/2.jpg[/url]
    I need that text and that image loaded...
    Any help is apprecitated
    Thanks,
    Trint


    trints Guest

  2. Similar Questions and Discussions

    1. text field including text from a text file *.txt
      Hi, I would like to insert a text field which includes text from a text file. I know it must be possible but unfortunately I cannot find any help...
    2. Animating text from a external text file
      Hi, can someone please guide me on how to animate text in flash which is loaded from a external text file. The way we load text in dynamic text box...
    3. Load Text from Text file with html links?
      Try http://opensource.brajeshwar.com/downloads/dynamictextscroll/ and just change it to your liking, it have html links as far as I can remember. ...
    4. displaying text from an external text file
      Hi Guys I have created a basic Flash 'thing' that fades in and out about 10 words from various angles. What I would like to be able to do is...
    5. Field Text vx Regular Text File Size
      Why is regular text so much larger in file size than regular text? Is there some "magic" way to reduce the file size of regular text blocks?
  3. #2

    Default Re: Help please with 'if text file changes'...

    You have an input textField with instance name myInput, and it's located on the
    main timeline. Now put this actionscripton the main timeline:
    nameArray = new Array("John", "Sue", "George"); //holds possible names
    imgArray = new Array("images/1.jpg", "images/2.jpg","images/3.jpg"); //holds
    their corresponding images

    this.onEnterFrame = function(){ //every time flash plays the frame
    currentSelection = myInput.text; //assign the input text into a
    variable
    if(currentSelection=="enter a name"){ //if there is an image already
    showing...
    break; //do
    nothing
    }
    else{ for(x=0,x<nameArray.length,x++){ //loop through the array
    of names
    if(currentSelection==nameArray[x]){ //check the input
    for a match
    getURL(imgArray[x],"imageHolder_mc"); //display the image!
    myInput.text="enter a name"; //reset
    the textfield and variable so it doesn't keep "getting the URL"
    }
    }
    };


    pazzoboy Guest

  4. #3

    Default Re: Help please with 'if text file changes'...

    Thank you pazzoboy...do you know of an existing flash file I can add this to? I'm a real newbee, but this site is helping me get this right...
    Trint
    trints Guest

  5. #4

    Default Re: Help please with 'if text file changes'...

    No, I don't actually....if you give me your email, I'll do a template and shoot it to you tomorrow morning.
    pazzoboy Guest

  6. #5

    Default Re: Help please with 'if text file changes'...

    Thanks -
    [email]trintsmith@hotmail.com[/email]

    Trint
    trints Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139