How can i store a variable to a file?

for some reason i can't find much on writing to files, is
this not possible?
and if it isnt possible, how can i keep a variable? i don't
want the variable to reset to 0 every time someone loads a new
instance of the page.
also, for some reason.. it seems to me that if statements
dont work as they should. the vote() function always executes the
countVote() function even if choice doesn't = ans.
anyone know what im doing wrong
example..
private function vote(choice):void {
text1.text=choice
if (choice=ans){
countVote();
private function countVote():void {
total=total+1
totalS=total.toString();
text2.text=totalS
text2 displays the total count and every time i submit the
vote, the count goes up no matter what i choose
i also get a warning for all of the variables saying
"1084: var 'total' will be scoped to the default namespace:
sv1: internal. It will not be visible outside of this package."
(sv1 is the name of the project)
how to i make it visible outside of the package?

In this case, the if statement will not work as you intended.
You need to use the double-equals, ie, if (choice == ans)
Also, the flash player is inside a sandbox for security
reasons. Consequently, you can not write directly to files. To get
around this, make a call to a php, python, java or .net script
residing on the webserver that will write to a file for you. You
can do this using the HTTPService object.

Similar Messages

  • How can we store an image in the file the image is int he form of bytes

    hi
    How can we write an image to a file and save it to hardisk the i mage is in the form of bytes please if any body knows please send the code for it
    Thanks for u reply

    can u send the code for me
    my image is in the form of bytes its size is=78K;
    now i want to store image in database using BLOB type i blob datatype size is25k;
    how i should store
    Help me if know anything about this
    Thanks In Advance

  • How can i Store rtmp streaming into local File System?

    I use socket and netstream.appendBytes to receive and play flv frames.
    now I got the BytesArray,but how can i store them into local File?
    FlashPlayer can't use Air File APIs.

    This is by design.  Content on the Internet does not have access to your local filesystem.  We offer Local Shared Objects (LSOs) for storing small amounts of information, but this would not be suitable for scraping a video feed to disk.

  • How can I store and retrieve a Word file after it's been converted to a pdf?

    How do I store and retrieve a Word file after it's been converted to an PDF?  My file has been trapped in PDF"hell" assigned to a folder that cannot be opened or read, but when deleted, also deletes the original Word file...

    I think we need some more info here like, how are you converting to PDF. This is the Reader forum and it doesn't convert files to PDF.

  • How can I store and view a pdf file ?

    I have an iphone 3GS 32Gb and want to store a pdf file on my phone so that I can view it later.
    Email is the only way I have been able to view my pdf file, but I dont really want to do it this way.
    On previous phones I could save a file on the phones memory card and then open the file in the necessary app.
    This is something I know the iphone doesnt do, but I was wondering if there is a way around it or an app.

    sky_rat wrote:
    Which is the best of those apps, can you recommend any ?
    [File Magnet|http://itunes.apple.com/gb/app/filemagnet-read-and-e-mail-your/id2847971 61?mt=8] is pretty good.
    I did find one app (I cant remember the name, thought it was Air Share) and it said Apple had told them to change the app so that you cant transfer files over USB, only Wi-Fi.
    I think that was [FileApp|http://itunes.apple.com/gb/app/fileapp-previously-fileaid-document/id2 97804694?mt=8], (previously File Aid).
    Apple dont like people being able to use their phone like this.... bloody control freaks.
    You can vote with your feet remember.

  • How can I define global variable in user exit whic I can use anywhere.

    Hi all,
    How can I define global variable( Table ) which I can use when it come back to same user exit where I defined and stored some data.
    What I mean is I want to define 1 global table.
    In user exit when it comes I store some information. and again when it will come I will have that stored information so I can use it.
    Thanks a lot in advance.

    You can use EXPORT  TO MEMORY ID and IMPORT FROM MEMORY ID Statement for this.
    EXPORT T_ITAB FROM T_ITAB TO MEMORY ID 'ABC'.
    IMPORT T_ITAB TO T_ITAB FROM MEMORY ID 'ABC.'

  • How can i view the variables of the session memory

    Hi experts
       How can i view the variables of the session memory.Such as I want display the variables of memory which id is 'BULRN' in ABAP debug.
    In program i can use import from memory id visit the momery of session,but i don't know the name of variables which store in momery of my session.

    Its not possible to view in the debug mode..
    SAP memory is a memory area to which all main sessions within a SAPgui have access. You can use SAP memory either to pass data from one program to another within a session, or to pass data from one session to another. Application programs that use SAP memory must do so using SPA/GPA parameters (also known as SET/GET parameters). These parameters can be set either for a particular user or for a particular program using the SET PARAMETER statement. Other ABAP programs can then retrieve the set parameters using the GET PARAMETER statement. The most frequent use of SPA/GPA parameters is to fill input fields on screens
    SAP global memory retains field value through out session.
    set parameter id 'MAT' field v_matnr.
    get parameter id 'MAT' field v_matnr.
    They are stored in table TPARA.
    ABAP memory is a memory area that all ABAP programs within the same internal session can access using the EXPORT and IMPORT statements. Data within this area remains intact during a whole sequence of program calls. To pass data
    to a program which you are calling, the data needs to be placed in ABAP memory before the call is made. The internal session of the called program then replaces that of the calling program. The program called can then read from the ABAP memory. If control is then returned to the program which made the initial call, the same process operates in reverse.
    ABAP memory is temporary and values are retained in same LUW.
    export itab to memory id 'TEST'.
    import itab from memory Id 'TEST'.
    Here itab should be declared of same type and length.

  • How can i store data in term of a tree structure

    how can i store data in term of a tree structure

    What a tree is the question. If you just want a fast access, ehats about Hashtable or dictionary classes ? The data there is structured in a tree. For a simple binary tree, you can use something like
    class Node {
    Node(Object data){
       Node left;
       Node right;
       Object data = data;
    void insert(Object data, Node parent){
      int test = data.compareTo(parent.data);
      if(test < 0 ){
        if(parent.left == null){
          parent.left = new Node(data);
        else{
          insert(data, parent.left);
      else{
        if(parent.right == null){
          parent.right = new Node(data);
        else{
          insert(data,parent.right);
    }And so build up a binary tree. The traversing methods can be found in almost any good book (pre-order, post-order, in-order), for search you have just to look at greater/smaller and descend in the tree.
    The Object data can be changed to what you want for storage, String, or primitive Numbers, Vectors ...
    Is that what you search for?

  • How can I store my iTunes library on an NAS (Fritz Box)?

    How can I store my iTunes library on an NAS (Fritz Box)?

    1. Drag the library to the external drive, launch iTunes with the Option key held down, click on Choose Library, and point it there.
    2. Get a second. Having the backups on the same drive as the original data won't help when that drive fails.
    (66929)

  • How can I use environment variables in a controller?

    Hi all,
    How can I use environment variables in a controller?
    I want to pass a fully qualified directory and file name to FileInputStream and would like to do it by resolving an env variable, such as $APPLTMP.
    Is there a method somewhere that would resolve this??
    By the way,Did anyone used the class of "oracle.apps.fnd.cp.request.RemoteFile"?
    The following is the code.
    My EBS server is installed with 2 nodes(one for current,and other is for application and DB).I want to copy the current server's file to the application server's $APPLTMP directory. But the result of "mCtx.getEnvStore().getEnv("APPLTMP")" is current server's $APPLTMP directory.
    Can anyone help me on this?
    private String getURL()
    throws IOException
    File locC = null;
    File remC = new File(mPath);
    String lurl = null;
    CpUtil lUtil = new CpUtil();
    String exten;
    Connection lConn = mCtx.getJDBCConnection();
    ErrorStack lES = mCtx.getErrorStack();
    LogFile lLF = mCtx.getLogFile();
    String gwyuid = mCtx.getEnvStore().getEnv("GWYUID");
    String tmpDir = mCtx.getEnvStore().getEnv("APPLTMP");
    String twoTask = mCtx.getEnvStore().getEnv("TWO_TASK");
    // create temp file
    mLPath = lUtil.createTempFile("OF", exten, tmpDir);
    lUtil.logTempFile(mLPath, mLNode, mCtx);
    Thanks,
    binghao

    However within OAF on the application it doesn't.
    what doesnt work, do you get errors or nothing ?XX_TOP is defined in adovars.env only. Anywhere else this has to go?
    No, it is read from the adovars.env file only.Thanks
    Tapash

  • How can I set a variable number of values in a SQL IN clause?

    Hi,
    How can I set a variable number of values in a SQL IN clause without having to change the text of the SQL statement each time?
    I read the link http://radio.weblogs.com/0118231/2003/06/18.html. as steve wrote.
    SELECT *
    FROM EMP
    WHERE ENAME IN (?)
    But we need the steps not to create type in the system and would there be any other solution if we would like to use variable number of values in a SQL IN clause ?
    We are using JDeveloper 10.1.3.2 with Oracle Database 10.1.3.2
    Thanks
    Raj

    Hi,
    can you please explain why the solution from steve is not the right solution for you.
    regards
    Peter

  • How can I access global variables in a loaded Applescript?

    How can I access global variables in a loaded script, in Xcode, ApplescriptObjC? Basically, I have a global variable defined in my parent script using "property", and I need to modify objects connected to those variables inside of a loaded script.
    Example:
    Parent script:
    script AppDelegate
    property myTextField : missing value
    //linked to a text field object
    tell myScript to myAwesomeHandler_()
    end script
    Loaded script:
    on myAwesomeHandler_()
    myTextField's setStringValue_("The new Xcode is so glitchy ugh")
    //changes value of linked text field of parent script
    end myAwesomeHandler_
    The problem is, the variable is undefined in the Loaded script, and I need it to have the same value as the parent script, and I don't want to pass the variable through the Handler. Any ideas?

    I think want you are looking to do will need to be done in two steps. Because myTextField needs to be a property for the ObjectiveC part of the code you cannot turn it into a global.
    However if you make a temporary variable global assign the string to it in the handler then set myTextField off of it.
    global myTextFieldGlobal
    script AppDelegate 
    property myTextField : missing value 
    //linked to a text field object 
    tell myScript to myAwesomeHandler_() 
    myTextField's setStringValue_(myTextFieldGlobal)
    end script 
    on myAwesomeHandler_() 
    set myTextFieldGlobal to "The new Xcode is so glitchy ugh"
    //changes value of linked text field of parent script 
    end myAwesomeHandler_ 
    I know you stated you did not want the handler to return a value but I have to ask why? Global's, imo, are not a good idea and really should be used as a last resort.
    One other possibility is to pass a reference to the property to the handler. Not sure if that works in AS of if that would satisfy our requirement of not passing the variable through the handler
    <edit>
    Another though have you tried to define the property outside the script?  That is
    property myTextField : missing value
    script AppDelegate
    Not sure if that will work.
    You might also want to have a look at Scope of Properties and Variables Declared in a Script Object

  • How can I store received email in a folder on my iPad *

    How can I store received email in a folder on my iPad *
    I am trying to save certain messages on my iPad but don't know how to make a folder with email!

    You can only add folders to the email account if it is an IMAP account. If you see an EDIT button at the top of the window when you are in the email account - where you can see your inbox, sent and trash folders - if there is an edit button at the top of that window - you can tap that and then an Add Mailbox option appears at the bottom of the window.
    If you do not see that edit button, you do not have an IMAP account and you cannot add folders.

  • How can i store the data from the list to MS-Access?

    Hi all,
    We all know that from alv it is possible to export data to Ms-excel or word or text file. Can anyone tell me how can i store the data from alv or reports to Ms-Access?
    Thanks in Advance,
    Abhijit

    Hi,
    If you want that without code, i suppose there is a option in MS-Access to import data from Excel, so you have to first export to excel and then import to Access.
    If you want to code it yourself then have a look at FM TABLE_EXPORT_TO_MSACCESS, as said in Exporting Data from R/3 to MS ACCESS
    You can also see the search results in SCN for [export data to MS-Access (45 Results)|https://www.sdn.sap.com/irj/sdn/advancedsearch?query=exportdatato+MS-Access&cat=sdn_all].
    Regards
    Karthik D

  • Using action script 2 how can i send a variable value to a dynamic textbox on a different keyframe?

    using action script 2 how can i send a variable value to a dynamic textbox on a different keyframe?

    Thanks for your swift response.
    That sounds like a good solution, but the code I have on frame 2 is this
    timer = 0;
    countup = function(){
    timer++;
    countupInterval = setInterval(countup,100);
    If I added the same actionscript to frame 3 which has a dynamic textbox with a variable timer attached wouldn't it just put the timer back to 0? What I want is the last known value that was given when it was in frame 2.
    I am thinking of temple run here, I am trying to caculate the total distance(set in the timer variable) from the previous try.
    Hope this makes sense.
    Chazwick

Maybe you are looking for

  • How do I re-install my iTunes Playlist

    I updated my iTunes 10.7 to the new and improved iTunes 11, and I hate it. So I deleted it from my laptop and re-installed iTunes 10.7. However, iTunes 10.7 will not recogize my Playlist, or the back-up Playlist. Is there a way to re-install my iTune

  • Rich text default values not appearing in content entry template

    Hello all, Sorry for the repost, but no one seems to have an answer for me in the other forum and I thought I might be able to reach more people here. I have created a base text item and would like to include default values in some of the attributes.

  • OBIEE report to calculate avg daily demand by month and product line

    Hello, I have a requirement to calculate the average daily demand by month for each product line. Each Manufacturing Org has the list of working days for the month. Mfg Org Month Working days M1 Jan-14 23 M1 Feb-14 20 M1 Mar-14 21 M2 Jan-14 20 M2 Feb

  • LSMW procedure

    Hi Could  Anybody guide me the  LSMW  procedure step by step. to uplad the data from notepad to R/3 thank u regards sesidhar Edited by: Somnath Manna on Sep 18, 2008 5:59 AM

  • Expose JSF app as a remote portlet on OAS 10.1.3.1

    Hello, We have a requirement to expose our JSF app as a remote portlet via WSRP. Our production platform is OAS 10.1.3.1 SOA and we are using JDeveloper 10.1.3.1 for the development. We are new to the portal technologies, but what we understood readi