×

Discussion Board

Results 1 to 1 of 1
  1. #1
    Registered User
    Join Date
    Nov 2010
    Posts
    1

    SharedObject on Nokia 5610

    I can't get sharedobjects to work on my 5610 even though the code is working on the emulator.
    I'm using the exact code from a tutorial on Nokia Wiki (In portuguese)

    Code:
    fscommand2("FullScreen", true);
     
    var handler_obj:Object = new Object();
     
    var persist_so:SharedObject;
     
    this.createTextField("display_txt", 
                           this.getNextHighestDepth(), 
                           0,
                           0,
                           Stage.width, 
                           Stage.height);
     
     
    function getSharedObject(info_obj:SharedObject) {    
    
        if(persist_so.getSize() <= 0) {
            persist_so.data.numeroAcessos = 1;
        } else {
            persist_so.data.numeroAcessos += 1;
        }    
     
    
        display_txt.text = "Tamanho: " + persist_so.getSize() + "\n";
        display_txt.text += "Número de acessos: " + persist_so.data.numeroAcessos + "\n";
        display_txt.text += "Armazenamento máximo: " + SharedObject.getMaxSize();
     
        persist_so.flush();
    }
     
    
    handler_obj.onKeyDown = function() {
    
        if(Key.getCode() == ExtendedKey.SOFT1) {
            display_txt.text = "Dados limpos";
            persist_so.clear();
        } else {
    
            if(Key.getCode() == ExtendedKey.SOFT2) {
                fscommand2("quit");
            }
        }
    }
     
    Key.addListener(handler_obj);
     
    SharedObject.addListener("meusDados", getSharedObject);
    
    persist_so = SharedObject.getLocal("meusDados");
    Never mind now its working.
    I guess it wasn't working because my other flash file flushes too fast and kinda broke it, so i had to restart my mobile
    Last edited by Iroshirou; 2010-11-08 at 23:49. Reason: Solved

Similar Threads

  1. why SharedObject.getMaxSize()=4096???
    By shpe11 in forum [Archived] Flash Lite on Nokia Devices
    Replies: 0
    Last Post: 2009-07-28, 13:27
  2. Nokia 5610 XpressMusic
    By yuzaimie in forum General Development Questions
    Replies: 2
    Last Post: 2008-10-23, 08:41
  3. SharedObject is not working
    By mikih in forum [Archived] Flash Lite on Nokia Devices
    Replies: 8
    Last Post: 2008-09-05, 14:37
  4. nokia 5610
    By badgerboyjim in forum General Development Questions
    Replies: 1
    Last Post: 2008-09-02, 15:15
  5. Nokia 5610 problems
    By madeener in forum General Development Questions
    Replies: 3
    Last Post: 2008-06-30, 15:20

Posting Permissions

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