Loading ...
Sorry, an error occurred while loading the content.

Re: Shared Objects - Resolved

Expand Messages
  • Luciano Fernandes
    It worked!!!!! Thank you, Kirk! I put the code: var login_so:SharedObject = SharedObject.getLocal( meuemail ); soInitHandler = function(so:SharedObject){ if
    Message 1 of 4 , Oct 20, 2008
    View Source
    • 0 Attachment
      It worked!!!!!


      Thank you, Kirk!
      I put the code:


      var login_so:SharedObject = SharedObject.getLocal("meuemail");
      soInitHandler = function(so:SharedObject){

      if (login_so.data.email != undefined) {
      email.text = login_so.data.email;
      } else {
      email.text = "";
      }
      }
      SharedObject.addListener("meuemail", soInitHandler);


      I also put this in other frame:
      SharedObject.removeListener("meuemail", soInitHandler);


      I lost an entire week because of this problem. Thank you again.


      Luciano Fernandes








      --- In FlashLite@yahoogroups.com, "Luciano Fernandes"
      <lucianopopo@...> wrote:
      >
      > Hi,
      >
      > I need a little help from you.
      >
      > I´m developing a software in flash lite that needs a login page. Just
      > LOGIN and PASSWORD.
      >
      > I want to record the LOGIN in the smartphone, so I can retrieve later,
      > just like any login page with "Save Login" or Save Password" when the
      > checkbox "Save Login" is checked.
      >
      > For this I used this Shared Object code:
      >
      >
      >
      >
      > if (login_so.data.email != undefined) {
      > email.text = login_so.data.email;
      > } else {
      > email.text = "";
      > }
      >
      > var login_so:SharedObject = SharedObject.getLocal("meuemail");
      >
      >
      > // on the listener for the softkey
      > if (keyCode == ExtendedKey.SOFT2) {
      >
      > if (ckbRememberEmail.selected == true)
      > {
      > login_so.data.email = email.text;
      > login_so.flush();
      > }
      > else
      > {
      > login_so.data.email = "";
      > login_so.flush();
      > }
      > }
      >
      >
      >
      >
      >
      > I found the file recorded in the smartphone and the LOGIN (email) is
      > recorded in the file, but I can´t retrieve the LOGIN because it comes
      > "undefined".
      >
      > Anyone can help me?
      >
      > Thank you.
      >
      > Luciano Fernandes
      >
    • Kirk
      You are welcome! Has anyone run into issues saving multi-dimensional arrays to Shared Objects on the device. It works on the desktop not device. I m building a
      Message 2 of 4 , Oct 21, 2008
      View Source
      • 0 Attachment
        You are welcome!

        Has anyone run into issues saving multi-dimensional arrays to Shared
        Objects on the device. It works on the desktop not device.

        I'm building a FL GPS app and it would be nice to save (name,
        latitude, longitude) to each item in the array but it looks like I
        will need to split it into 3 arrays.

        Best regards,
        Kirk Ballou

        --- In FlashLite@yahoogroups.com, "Luciano Fernandes"
        <lucianopopo@...> wrote:
        >
        > It worked!!!!!
        >
        >
        > Thank you, Kirk!
        > I put the code:
        >
        >
        > var login_so:SharedObject = SharedObject.getLocal("meuemail");
        > soInitHandler = function(so:SharedObject){
        >
        > if (login_so.data.email != undefined) {
        > email.text = login_so.data.email;
        > } else {
        > email.text = "";
        > }
        > }
        > SharedObject.addListener("meuemail", soInitHandler);
        >
        >
        > I also put this in other frame:
        > SharedObject.removeListener("meuemail", soInitHandler);
        >
        >
        > I lost an entire week because of this problem. Thank you again.
        >
        >
        > Luciano Fernandes
        >
        >
        >
        >
        >
        >
        >
        >
        > --- In FlashLite@yahoogroups.com, "Luciano Fernandes"
        > <lucianopopo@> wrote:
        > >
        > > Hi,
        > >
        > > I need a little help from you.
        > >
        > > I´m developing a software in flash lite that needs a login page.
        Just
        > > LOGIN and PASSWORD.
        > >
        > > I want to record the LOGIN in the smartphone, so I can retrieve
        later,
        > > just like any login page with "Save Login" or Save Password" when
        the
        > > checkbox "Save Login" is checked.
        > >
        > > For this I used this Shared Object code:
        > >
        > >
        > >
        > >
        > > if (login_so.data.email != undefined) {
        > > email.text = login_so.data.email;
        > > } else {
        > > email.text = "";
        > > }
        > >
        > > var login_so:SharedObject = SharedObject.getLocal("meuemail");
        > >
        > >
        > > // on the listener for the softkey
        > > if (keyCode == ExtendedKey.SOFT2) {
        > >
        > > if (ckbRememberEmail.selected == true)
        > > {
        > > login_so.data.email = email.text;
        > > login_so.flush();
        > > }
        > > else
        > > {
        > > login_so.data.email = "";
        > > login_so.flush();
        > > }
        > > }
        > >
        > >
        > >
        > >
        > >
        > > I found the file recorded in the smartphone and the LOGIN (email)
        is
        > > recorded in the file, but I can´t retrieve the LOGIN because it
        comes
        > > "undefined".
        > >
        > > Anyone can help me?
        > >
        > > Thank you.
        > >
        > > Luciano Fernandes
        > >
        >
      • Kirk
        Ah found the issue! A note for anyone else that runs into this. It was not the array but the xml data which seemed to be the issue. Shared Objects do not seem
        Message 3 of 4 , Oct 23, 2008
        View Source
        • 0 Attachment
          Ah found the issue!

          A note for anyone else that runs into this. It was not the array but
          the xml data which seemed to be the issue.
          Shared Objects do not seem to like saving direct xml data. Covert it
          to a string it works. So if you set this data to a text field it will
          then save to the SO.


          --- In FlashLite@yahoogroups.com, "Kirk" <insomz@...> wrote:
          >
          >
          > You are welcome!
          >
          > Has anyone run into issues saving multi-dimensional arrays to
          Shared
          > Objects on the device. It works on the desktop not device.
          >
          > I'm building a FL GPS app and it would be nice to save (name,
          > latitude, longitude) to each item in the array but it looks like I
          > will need to split it into 3 arrays.
          >
          > Best regards,
          > Kirk Ballou
          >
          > --- In FlashLite@yahoogroups.com, "Luciano Fernandes"
          > <lucianopopo@> wrote:
          > >
          > > It worked!!!!!
          > >
          > >
          > > Thank you, Kirk!
          > > I put the code:
          > >
          > >
          > > var login_so:SharedObject = SharedObject.getLocal("meuemail");
          > > soInitHandler = function(so:SharedObject){
          > >
          > > if (login_so.data.email != undefined) {
          > > email.text = login_so.data.email;
          > > } else {
          > > email.text = "";
          > > }
          > > }
          > > SharedObject.addListener("meuemail", soInitHandler);
          > >
          > >
          > > I also put this in other frame:
          > > SharedObject.removeListener("meuemail", soInitHandler);
          > >
          > >
          > > I lost an entire week because of this problem. Thank you again.
          > >
          > >
          > > Luciano Fernandes
          > >
          > >
          > >
          > >
          > >
          > >
          > >
          > >
          > > --- In FlashLite@yahoogroups.com, "Luciano Fernandes"
          > > <lucianopopo@> wrote:
          > > >
          > > > Hi,
          > > >
          > > > I need a little help from you.
          > > >
          > > > I´m developing a software in flash lite that needs a login
          page.
          > Just
          > > > LOGIN and PASSWORD.
          > > >
          > > > I want to record the LOGIN in the smartphone, so I can retrieve
          > later,
          > > > just like any login page with "Save Login" or Save Password"
          when
          > the
          > > > checkbox "Save Login" is checked.
          > > >
          > > > For this I used this Shared Object code:
          > > >
          > > >
          > > >
          > > >
          > > > if (login_so.data.email != undefined) {
          > > > email.text = login_so.data.email;
          > > > } else {
          > > > email.text = "";
          > > > }
          > > >
          > > > var login_so:SharedObject = SharedObject.getLocal("meuemail");
          > > >
          > > >
          > > > // on the listener for the softkey
          > > > if (keyCode == ExtendedKey.SOFT2) {
          > > >
          > > > if (ckbRememberEmail.selected == true)
          > > > {
          > > > login_so.data.email = email.text;
          > > > login_so.flush();
          > > > }
          > > > else
          > > > {
          > > > login_so.data.email = "";
          > > > login_so.flush();
          > > > }
          > > > }
          > > >
          > > >
          > > >
          > > >
          > > >
          > > > I found the file recorded in the smartphone and the LOGIN
          (email)
          > is
          > > > recorded in the file, but I can´t retrieve the LOGIN because it
          > comes
          > > > "undefined".
          > > >
          > > > Anyone can help me?
          > > >
          > > > Thank you.
          > > >
          > > > Luciano Fernandes
          > > >
          > >
          >
        Your message has been successfully submitted and would be delivered to recipients shortly.