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

php to flashlite2

Expand Messages
  • gilkahanagil
    hello, I have a flashlite file which access a php script and returns the following variables: &item_1=john.3gp&item_2=dan.jpg&item_3=dave.jpg to access them i
    Message 1 of 4 , Jan 31, 2007
    • 0 Attachment
      hello,
      I have a flashlite file which access a php script
      and returns the following variables:
      &item_1=john.3gp&item_2=dan.jpg&item_3=dave.jpg
      to access them i can trace
      lv.item_1

      the problem is that I try to access them with a loop like
      for (i=0;i<lv.count+1;i++){
      trace(String("lv.item_"+i))
      }
      this returns the variable name
      lv.item_1
      rather then
      john.3gp

      Any idea why this happens?
      Thanks,
      Gil
    • Darren Osadchuk
      Hi, ... That s happening because String() returns the expression it is given as a string. Try: trace(lv[ item_ +i]); which should return the value of
      Message 2 of 4 , Jan 31, 2007
      • 0 Attachment
        Hi,

        > I have a flashlite file which access a php script
        > and returns the following variables:
        > &item_1=john.3gp&item_2=dan.jpg&item_3=dave.jpg
        > to access them i can trace
        > lv.item_1
        >
        > the problem is that I try to access them with a loop like
        > for (i=0;i<lv.count+1;i++){
        > trace(String("lv.item_"+i))
        > }
        > this returns the variable name
        > lv.item_1
        > rather then
        > john.3gp
        >
        > Any idea why this happens?
        > Thanks,
        > Gil

        That's happening because String() returns the expression it is given as
        a string. Try:

        trace(lv["item_"+i]);

        which should return the value of lv.item_1, lv.item_2, etc.

        Darren
      • Matheus Henrique Gorino
        The correct is: for (i=0;i
        Message 3 of 4 , Jan 31, 2007
        • 0 Attachment
          The correct is:

          for (i=0;i<lv.count+1;i++){
            trace(lv["item_" + i]);
          }

          matheusgorino

          On 1/31/07, gilkahanagil <gilkahana@...> wrote:

          hello,
          I have a flashlite file which access a php script
          and returns the following variables:
          &item_1=john.3gp&item_2=dan.jpg&item_3=dave.jpg
          to access them i can trace
          lv.item_1

          the problem is that I try to access them with a loop like
          for (i=0;i<lv.count+1;i++){
          trace(String("lv.item_"+i))
          }
          this returns the variable name
          lv.item_1
          rather then
          john.3gp

          Any idea why this happens?
          Thanks,
          Gil


        • gilkahanagil
          thank you! that is really helpful! Gil
          Message 4 of 4 , Jan 31, 2007
          • 0 Attachment
            thank you!
            that is really helpful!
            Gil

            --- In FlashLite@yahoogroups.com, "Matheus Henrique Gorino" <mlistas@...> wrote:
            >
            > The correct is:
            >
            > for (i=0;i<lv.count+1;i++){
            > trace(lv["item_" + i]);
            > }
            >
            > matheusgorino
            >
            > On 1/31/07, gilkahanagil <gilkahana@...> wrote:
            > >
            > > hello,
            > > I have a flashlite file which access a php script
            > > and returns the following variables:
            > > &item_1=john.3gp&item_2=dan.jpg&item_3=dave.jpg
            > > to access them i can trace
            > > lv.item_1
            > >
            > > the problem is that I try to access them with a loop like
            > > for (i=0;i<lv.count+1;i++){
            > > trace(String("lv.item_"+i))
            > > }
            > > this returns the variable name
            > > lv.item_1
            > > rather then
            > > john.3gp
            > >
            > > Any idea why this happens?
            > > Thanks,
            > > Gil
            > >
            > >
            > >
            >
          Your message has been successfully submitted and would be delivered to recipients shortly.