Storing url in text file?

Hi
I have 1 buttons in my flash movie. and want to use this swf in some other projects. just this button link will change in each project, so will also the button text. I dont want to edit flash file for each project. Can I use a text file for URL of button and I change text file to edit link of buttons and text of button?
thanks in advance

thanks for the information  
if i skip the button and just have a text witch is also stored in the text file
in html or somthing, and then show this in a textarea component or something
is this possible without using xml or anything else thats hard to set up
thanks again for taking time, flash guru =)

Similar Messages

  • Read url from text file

    I am new to Adobe Air. I was able to load a web browser as an Air app with the following line:
    <mx:HTML id="myBrowser" width="100%" height="100%" location="http://www.google.com"/>
    My  question is this: is it possible to add a text file to the project (to  be stored locally) that can be read by the application so that the  location attribute (URL) can be dynamically populated?
    I want the user to be able to change the starting URL by manually editing this text file.
    Any help I can get is appreciated!
    Note:  I am aware that a URL bar can simply be added to the app, but that is  really not the solution that I'm looking for. I don't want the user to  be able to change the url using the GUI.

    Great, thank you for your response!
    Could you give me a sugestion on how to aproch the code. Specifically how to read the file itself. Would it require a specific format?
    Thanks you.

  • What get stored cookie text file if we are working with Internet Explorer

    1) The name of the Cookie
    2) The value
    3) The directory path
    4) The size of the cookie ie. 1024 bytes
    After that I am unable to make out , what are the rest of the informations
    Can any one help in understanding what are all information which gets stored in the text file apart from the 4 mentioned one.
    regards.....

    Seems I spoke too soon. The suggestion worked one time, then IE lost Java again. After disabling Java in the browser through the control panel my wife went to www.pogo.com and tried to load one of her games, and it loaded successfully. She closed the browser, finished what she had been doing, then opened IE and went back to the Pogo site. This time the game wouldn't load and the "needs Java" message popped up. This time disabling and reenabling Java in the browser through the control panel as before doesn't help. Her game still gives the "needs Java" message. I haven't tried rebooting the computer as my wife needs to finish some work, but I'll try that when she's through and see if that has any effect.
    Doc Tom

  • Transfer time stamp from text file into MS Access thru Labview

    Hello everyone,
    I am Cruz; Long time listener, First time caller.
    I am currently monotoring data being collected by an oven. The data is stored in a text file. I am using Labview to take the data from the textfile and place it in an MS access DB for manipulation. The first three columns of the text file are the time stamp of data. When i transfer the data into Access i cant get the first three columns to display as a time stamp. Can have some pointers on what how to get the first three columns to display correctly.
    Additional info:
    the text file is a 1D array that gets overitten with every new mesurement tanken. the transfer to Acces is to not loos any of the information and to better manipulate the data into forms and such.
    Running Labview 2010
    attached is code and text file.
    Any help is greatly appreciated.
    Attachments:
    Oven test other.vi ‏16 KB
    datalog032010003.txt ‏1 KB

    Your first mistake is reading the file as DBL. Your first three columns are obviously not numeric values. Did you ever look at the output array? Read it as strings. Second, you would need to combine those first three columns to create an actual time stamp before you write to the db. Unless of course you have one column for date, one column for time, and one column for AM/PM. I would not recomend that type of structure in the db.

  • Inserting line in a Text file using java

    Hi,
    I am working on a project in which the some data is required to be stored in a text file. I have lines of data in the file and I read 1 line at a time. So now I need to insert some lines of text in between. How to do this ??
    Now i'm using a temporary file and then after creating the data I replace the original file with the new one. But want to know is there any better way to do that same..?!?!

    Ok.. If I maintain a data in XML format, is it
    possible to insert a node. I'm using Xerces and DOM
    api for handling xml data.
    As a file, XML is just a text file so you insert as you would any file.
    Once parsed to a DOM model then sure you can insert nodes. Just look at the Javadoc for XML Document, Element, Node etc.

  • Appending objects in text file and searching.......

    I have been trieng to implement simple search operation on the class objects stored in the text file. but when i try to append new objects in the same file and search for the same; java.io.StreamCorruptedException is thrown. wat the problem is, that wen i append to the text file; it stores some header information before the actual object is stored and on the deserialization, this header information is causing the exception. the same header information is stored every time, i append to the file. anybody knws hw to get past it??? my code is as given below:
    package coding;
    import java.io.BufferedReader;
    import java.io.EOFException;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.FileReader;
    import java.io.FileWriter;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.io.ObjectInputStream;
    import java.io.ObjectOutputStream;
    import java.io.PrintWriter;
    import java.io.Serializable;
         class Employee implements Serializable{
              private static final long serialVersionUID = 1L;
              String name;
              int id;
              public int getId() {
                   return id;
              public void setId(int id) {
                   this.id = id;
              public String getName() {
                   return name;
              public void setName(String name) {
                   this.name = name;
              public Employee(String name, int id) {
                   this.name = name;
                   this.id = id;
         public class FileSearch{
         public static void main(String[] args) throws IOException
              /*Entering the records into the file*/
              Employee ob = null;
              File file=new File("c:\\abc.txt");
              InputStreamReader isr=new InputStreamReader(System.in);
              BufferedReader stdin=new BufferedReader(isr);
              char fileExist='y';
              if(file.exists())
                   System.out.println("File already exists!!!");
                   System.out.println("Append New Records(press y) Or Search Existing File(press any other button)?:");
                   String strTemp=stdin.readLine();
                   fileExist=strTemp.charAt(0);
              else
                   System.out.println("File doesnt exist; creating new file......");
              if(fileExist=='y')
                   FileOutputStream fos=new FileOutputStream(file,true);
                   ObjectOutputStream oos=new ObjectOutputStream(fos);
                   char choice='y';
                   System.out.println("Enter records:");
                   while(choice=='y')
                        System.out.println("enter id:");
                        String id_s=stdin.readLine();
                        int id=Integer.parseInt(id_s);
                        System.out.println("enter name:");
                        String name=stdin.readLine();
                        ob=new Employee(name,id);
                        try
                             oos.writeObject(ob);
                             //count++;
                             oos.flush();
                        catch(Exception e)
                             e.printStackTrace();
                        System.out.println("Enter more records?(y/n)");
                        String str1=stdin.readLine();
                        choice=str1.charAt(0);
                   oos.close();
              /*Searching for the record*/
              System.out.println("Enter Record id to be searched:");
              String idSearchStr=stdin.readLine();
              int idSearch=Integer.parseInt(idSearchStr);
              try
                   FileInputStream fis=new FileInputStream(
                             file);
                   ObjectInputStream ois=new ObjectInputStream(fis);
                   int flag=1;
                   FileReader fr=new FileReader(file);
                   int c=fr.read();
                   for(int i=0;i<c;i++)
                        Object ff=ois.readObject();
                        Employee filesearch=(Employee)ff;
                        if(filesearch.id==idSearch)
                             flag=0;
                             break;
                   ois.close();
                   if(flag==1)
                        System.out.println("Search Unsuccessful");
                   else
                        System.out.println("Search Successful");
              catch(Exception e)
                   e.printStackTrace();
    }

    966676 wrote:
    All what I need to elect by who this word repeated. But I don't know really how to make It, maybe LinkedListYou should choose the simplest type fullfilling your needs. In this case I'd go for <tt>HashSet</tt> or <tt>ArrayList</tt>.
    or I dont know, someone could help me?You need to introduce a variable to store the actual name which must be resetted if an empty line is found and then gets assigned the verry next word in the file.
    bye
    TPD

  • Applescript wont use a value from a text file as a number

    I want to perform math operations on a value (0.0092926025390625) that is stored in a text file, i have no problem getting it into the applescript but it says "applescript error cant make "0.0092926025390625" into a number" i know that i am inputting the correct value but it still wont work.
    This is just an example code but it does the same thing.
    set csv to choose file with prompt "select a file"
    read csv
    set csv to result
    set var1 to word 1 of paragraph 2 of csv
    set var1 to var1+1
    I get the error on the last line

    Sure...
    set var1 to word 1 of paragraph 2 of csv
    by definition, 'words' are string/text objects.
    set var1 to var1+1
    You can't add integers to strings. Sure, you see the string as being a series of digits, but they could just as easily be letters, symbols, or any other characters. How would you add 1 to "hello", for example?
    All is not lost, though. You just need to give AppleScript a hint:
    set var1 to (word 1 of paragraph 2 of csv) as number
    Now it will read the text and attempt to coerce it to a number. Once it's a number you can add 1 to it.

  • Creating a text file

    hi
    can anyone tell me how to create a number of text file using a different variable in java.the exact definition is like this "different variables are stored in a text file and each time it has to open this file, take these as their file name and create a text file"

    new File(thevariable)

  • JavaScript to store the file open count in a text file

    Hi,
    Can we write a javascript in pdf such that when the pdf file is opened, the file open count is stored in a text file locally. Every time, the pdf file is opened, the count should be incremented in the text file. This is basically to check how many time a particular pdf file is opened by an user.
    The text file path should be defined in the javascript.

    Reader is not able to write to a text file, so you will have to use a global persistent variable.
    The script you would use is very simple, and should be set up to run when the document is opened. You can do this by creating a document-level script. The code can look something like:
    // Set up a routine that creates
    // and/or increments a global count
    // variable that keeps track of how
    // many times the document has been
    // opened on this machine
    (function () {
        // Set up the variable name
        // This needs to be unique for each document
        var count_var = "my_doc_open_count";
        // Create global variable if it doesn't already exist
        // and make it persistent
        if (typeof global[count_var] === "undefined") {
            global[count_var] = 0;
            global.setPersistent(count_var, true);
        // Increment the counter
        global[count_var] += 1;
        // Notify user how many times the document has been opened
        // This is mostly for testing, so comment it out if not needed
        app.alert("This document has been opened " + global[count_var] + " times.", 3);
    Read the Acrobat JavaScript reference and the accompanying scripting guide for more information. Note that Reader users may have to enable the use of globally persistent variables for this to work.
    George

  • How is the connection info stored in a .rpt file?

    I'm writing a set of reports that are going to be distributed to many clients across the country. Each one of them will have a different connection string to use.
    I don't want to have to walk each client through setting the datasource location manually.
    Is there anyway I can have the .rpt file look at a config file or something to change the database/server name to the client's settings rather than remembering the settings I have here?
    Our app has a connection string stored in a text file that I could translate into xml or something else.
    If you need more details let me know.

    Hi,
    Need more info-
    VS version?
    CR version?
    Web or win app?
    Also you can provide the connection information in the web.config file and retrieve the information from their as per the requirement(In case of web application).
    Also you can change the connection informatin in code, but the database structure should be same as the reports been designed.
    To download sample code click [here|https://boc.sdn.sap.com/codesamples].
    You can also take help from [Dev library|https://boc.sdn.sap.com/node/7770]
    Hope this helps!!
    Regards,
    Amit

  • Text file numerical data in columns (spaces between colums) to graph after averaging each 500 columns values.ple​ase help.

    i have a text file with numerical data in three columns,(first i need to skip the few lines of text within the file above the three column of data values)then i need to convert the numerical values above "-999" to zero,then take the average of each 500 values in the first column (second and third colum needs the same operation separately),thus found average values are to be stored into a text file and finally plotted in a graph separately. Please help.Its apart of my project work.
    Solved!
    Go to Solution.
    Attachments:
    data file.txt ‏715 KB

    i have a text file with numerical data in three columns,(first i need to skip the few lines of text within the file above the three column of data values)then i need to convert the numerical values above "-999" to zero,then take the average of each 500 values in the first column (second and third colum needs the same operation separately),thus found average values are to be stored into a text file and finally plotted in a graph separately.
    " i am attaching the code tht i hv done so far, its for reading and plotting the numerical data from text, but its not working :-( "
    Attachments:
    read from text and plot.vi ‏26 KB
    sample input.txt ‏1 KB
    final input to be read and plot.txt ‏345 KB

  • Problem in showing chinese char from a Unicode based text file [*.txt]

    Hi All!
    There are some chinese characters stored in a text file [*.txt]. I'm using "Arial Unicode MS" font to show chinese in text file. The text file is showing chinese charatcres. But when I read this file and want to show each line of chinese characters. My program is showing some garbage. Here is my sample code:
    //arg[0] is a unicode text file name
    UIManager.put("OptionPane.messageFont", new Font("Arial Unicode MS", Font.PLAIN, 11));
    String chinesesample = "\u4eac \u5582";
    //this message box is showing chinese
    JOptionPane.showMessageDialog(null, "Chinese Text..: " + chinesesample);
    BufferedReader obj_line = new BufferedReader(new FileReader(args[0]),16);
        String data = null;
        while (obj_line.ready()) {
          data = new String(obj_line.readLine().getBytes("Unicode"));
          obj_line.readLine();
          JOptionPane.showMessageDialog(null, data);
        }But this code is not showing the exact chinese characters stored in text file.
    Regards,
    KS

    FileReader does not support setting a charset:
    http://java.sun.com/j2se/1.5.0/docs/api/java/io/FileReader.html
    Convenience class for reading character files. The constructors of this
    class assume that the default character encoding and the default byte-
    buffer size are appropriate. To specify these values yourself, construct
    an InputStreamReader on a FileInputStream.
    So our BufferedReader should be constructed from InputStreamReader on a FileInputStream.
                   BufferedReader br = new BufferedReader(
                          new InputStreamReader(new FileInputStream("out.txt"), "UTF8"));Here is an example:
    import java.io.BufferedReader;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    // import java.io.FileReader; // no need for this
    import java.io.InputStreamReader;
    import javax.swing.JOptionPane;
    public class DocumentRenderer{
         public static void main(String[] args){
              try{
                   String chinesesample = "\u4eac \u5582\n";
                   System.out.print(chinesesample);
                   FileOutputStream fo = new FileOutputStream(new File("out.txt"));
                   fo.write(chinesesample.getBytes("UTF8"));
                   fo.close();
                   BufferedReader br = new BufferedReader(
                          new InputStreamReader(new FileInputStream("out.txt"), "UTF8"));
                   JOptionPane.showMessageDialog(null, "Chinese Text..: " + chinesesample);
                   chinesesample = br.readLine();
                   JOptionPane.showMessageDialog(null, "Chinese Text..: " + chinesesample);
                   fo = new FileOutputStream(new File("out.txt"));
                   fo.write(chinesesample.getBytes("UTF8"));
                   fo.close();
              }catch(Exception e){
    }

  • Modifying the contents of text file ini j2me

    Hi,
    I'm developing a application in j2me wherein i need to erase the previous stored contents fromthe text file and store new content submitted thru the front end program. Kindly please suggest me how to proceed in this regard.
    Thanks

    If you want to change an ini file in the jar file: you can't do that.
    You can however store the changes in the RMS.

  • Help! Every app crashes when interacting with plain text files

    I recently bought a 13" i7 MacBook Air. I love its design and I found OS X Lion unbelievably fast on it, yet I find myself in a very dark situation, now.
    From the Finder to iA Writer, to TextEdit, every single app crashes when working with plain text files. In Finder’s column view I don’t even have to open them: the instant one .txt is selected, Finder crashes.
    Creating a new user account seems to fix the bug for that account, but I just spent one whole day copying files from my old work MacBook (where Lion opened .txt files without a problem) to the new account and losing another entire day of work because of a stupid bug is out of question. Also, I feel it would be a very temporary fix. What if the bug presented itself again? Would I have to create a third, a fourth account, and so on?
    I didn’t use any migration tool because I wanted a very clean installation.
    On top of that, the machine is as App Store–only as one could be. The only “internet” apps I have on it are Chrome (for the occasional Flash video), Movist (I can’t work with Quicktime’s flying controls), and nvALT. I didn’t even had the time to install the Creative Suite on this one. I can’t for the life of me think this is app–related. I suspect it’s some weird OS bug.
    I work in advertising, and I do some work in Adobe’s Creative Suite but *all* my copy is stored in plain text files. I always did it that way so that my files would be future–proof. It is kind of ironic now. So please, if anyone as the slightest idea of how to fix this, please, please, help. I find myself with a brand new computer I can’t use for work.
    Alessandro

    What are the files named?
    Where are they being made? (What folder?)

  • Read a text file stored in WebDynpro packages(SRc/packages)

    Hi Experts,
    I have a text file stored in the folder structure of WebDynpro Development component.
    Its stored under src>packages>com>sap>file-->data.txt
    Now i need to read data from this file and fill the context node of WD controller.
    can you guys give me an example of how to do it?
    Regards,
    Ashish Shah

    /** get file as binary */
              File file = new File(
                             WDURLGenerator.getResourcePath(
                                  wdComponentAPI.getDeployableObjectPart(),
                                  "data.txt");
              FileInputStream instream = new FileInputStream(file);
              long filelen = file.length();
              byte[] binary = new byte[(int)filelen];
              int offset = 0;
              int numread = 0;
              while(offset<binary.length &&
                        (numread = instream.read(binary,
                         offset,
                          binary.length-offset))>=0){
                   offset +=numread;
              instream.close();
              /** create Resource out of binary read */
              if(binary!=null){
                   cachedresource = WDWebResource.getWebResource(binary, WDWebResourceType.TXT);
                   url = cachedresource.getURL();
              /** create window to open document */
              IWDWindow docwin = wdComponentAPI
                                       .getWindowManager()
                                       .createNonModalExternalWindow(url, Attachment);
              docwin.show();
         }catch(Exception e){
              msgBox("error reading file");
    nikhil

Maybe you are looking for