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

Re: Launching Flash application from another Flash application.

Expand Messages
  • outsidemediauk
    Hi Ivan, I have been creating a very similar app myself, and encountered exactly the same issues as you. Until i put on the x-domain policy i could not access
    Message 1 of 9 , Mar 1 3:41 AM
    • 0 Attachment
      Hi Ivan,

      I have been creating a very similar app myself, and encountered
      exactly the same issues as you. Until i put on the x-domain policy i
      could not access the file, then once that was on the server , the
      movie would load but you could not access the vars and objects.

      Anyway, yesterday, after much hair pulling, i found the solution.

      Due to security issues in the flashlite player, a loaded swf can not
      read the main swf's properties,objects and functions, and vice versa,
      the main app can not read the vars/objects etc of the loaded swf
      unless they are hosted in the same domain..... without permission.

      After adding the x-domain policy, you need to add a line of code to
      each swf, allowing each other authorization to access data contain in
      another swf on another domain.

      in the main app run on the phone, you need to put in on the main
      timeline :

      System.security.allowDomain
      ("http://www.yourdomain.com/ContentFolder");

      this allows the main app to read any objects/vars in any swf from
      that specific domain.

      in the swf located on the server, you need to add the line:

      System.security.allowDomain(_parent._url)

      This is the same secuirty component, but as you will be accessing the
      content from mobile devices, there is no way to know what domain to
      allow. The _parent.url just automatically adds the domain that
      content is being accessed from.


      Hope this helps

      Matt Pollitt

      Creative Director
      Outside Media Solutions
      UK

      p.s excuse any typo's, did this in a rush :)



      --- In FlashLite@yahoogroups.com, "Dave Yang" <flashliteyahoo@...>
      wrote:
      >
      > Hi Ivan,
      >
      > Does your crossdomain.xml (at the root of your server where SWF and
      data
      > services are provided) contain domain(s) (e.g. geocities.com) where
      you're
      > loading the sub application SWF(s) from?
      >
      > Dave Yang - Quantumwave Interactive Inc.
      > Toronto, Ontario, Canada
      > http://quantumwave.com
      > http://swfoo.com
      >
      >
      > ________________________________
      >
      > From: FlashLite@yahoogroups.com [mailto:FlashLite@yahoogroups.com]
      On Behalf
      > Of Ivan Sebastian Surya
      > Sent: Tuesday, February 27, 2007 8:29 PM
      > To: FlashLite@yahoogroups.com
      > Subject: Re: [FlashLite] Re: Launching Flash application from
      another Flash
      > application.
      >
      >
      >
      > Hi Dave,
      >
      > Thanks for your reply. I did attempt to read the article and put a
      > crossdomain.xml in my server. I use jetty to run my web
      application so I
      > put the crossdomain.xml in "src/main/webapp" folder and it gets
      deployed to
      > the target folder. However, I still can't access any data from the
      servlet
      > in my server.
      > But now I move my swf files (sub application) to be loaded to the
      same
      > server as the servlet and it works.
      > What I want to know is why if the flash sub application is loaded
      to a movie
      > clip from an external URL, e.g. www,geocities.com/..., then it
      can't access
      > data from my servlet and if the sub application is in the same
      folder as the
      > parent app in my phone, then it's able to read from my servlet.
      > I read the documentation and it says that the swf requesting the
      data must
      > be in the same domain as where the data is coming from in order to
      allow the
      > swf file access to those data, but in this case, those applications
      (sub
      > applications) are in my phone memory, not in the same domain as my
      servlet
      > providing the data and it's still able to access data from the
      servlet using
      > loadVariables().
      > Thanks. Sorry in advance if it sounds stupid... I'm still
      learning. thanks.
      >
      > Ivan
      >
    • uptoyoo_up2u
      hello, I wonder if you are asking the function of up2U http://www.flash-mobile.com/up2U/up2U.zip ... i ... not ... versa, ... to ... in
      Message 2 of 9 , Mar 3 10:54 PM
      • 0 Attachment
        hello,

        I wonder if you are asking the function of "up2U" <TOOL/GAME
        section>

        http://www.flash-mobile.com/up2U/up2U.zip

        --- In FlashLite@yahoogroups.com, "outsidemediauk" <matt@...> wrote:
        >
        > Hi Ivan,
        >
        > I have been creating a very similar app myself, and encountered
        > exactly the same issues as you. Until i put on the x-domain policy
        i
        > could not access the file, then once that was on the server , the
        > movie would load but you could not access the vars and objects.
        >
        > Anyway, yesterday, after much hair pulling, i found the solution.
        >
        > Due to security issues in the flashlite player, a loaded swf can
        not
        > read the main swf's properties,objects and functions, and vice
        versa,
        > the main app can not read the vars/objects etc of the loaded swf
        > unless they are hosted in the same domain..... without permission.
        >
        > After adding the x-domain policy, you need to add a line of code
        to
        > each swf, allowing each other authorization to access data contain
        in
        > another swf on another domain.
        >
        > in the main app run on the phone, you need to put in on the main
        > timeline :
        >
        > System.security.allowDomain
        > ("http://www.yourdomain.com/ContentFolder");
        >
        > this allows the main app to read any objects/vars in any swf from
        > that specific domain.
        >
        > in the swf located on the server, you need to add the line:
        >
        > System.security.allowDomain(_parent._url)
        >
        > This is the same secuirty component, but as you will be accessing
        the
        > content from mobile devices, there is no way to know what domain
        to
        > allow. The _parent.url just automatically adds the domain that
        > content is being accessed from.
        >
        >
        > Hope this helps
        >
        > Matt Pollitt
        >
        > Creative Director
        > Outside Media Solutions
        > UK
        >
        > p.s excuse any typo's, did this in a rush :)
        >
        >
        >
        > --- In FlashLite@yahoogroups.com, "Dave Yang" <flashliteyahoo@>
        > wrote:
        > >
        > > Hi Ivan,
        > >
        > > Does your crossdomain.xml (at the root of your server where SWF
        and
        > data
        > > services are provided) contain domain(s) (e.g. geocities.com)
        where
        > you're
        > > loading the sub application SWF(s) from?
        > >
        > > Dave Yang - Quantumwave Interactive Inc.
        > > Toronto, Ontario, Canada
        > > http://quantumwave.com
        > > http://swfoo.com
        > >
        > >
        > > ________________________________
        > >
        > > From: FlashLite@yahoogroups.com
        [mailto:FlashLite@yahoogroups.com]
        > On Behalf
        > > Of Ivan Sebastian Surya
        > > Sent: Tuesday, February 27, 2007 8:29 PM
        > > To: FlashLite@yahoogroups.com
        > > Subject: Re: [FlashLite] Re: Launching Flash application from
        > another Flash
        > > application.
        > >
        > >
        > >
        > > Hi Dave,
        > >
        > > Thanks for your reply. I did attempt to read the article and
        put a
        > > crossdomain.xml in my server. I use jetty to run my web
        > application so I
        > > put the crossdomain.xml in "src/main/webapp" folder and it gets
        > deployed to
        > > the target folder. However, I still can't access any data from
        the
        > servlet
        > > in my server.
        > > But now I move my swf files (sub application) to be loaded to
        the
        > same
        > > server as the servlet and it works.
        > > What I want to know is why if the flash sub application is
        loaded
        > to a movie
        > > clip from an external URL, e.g. www,geocities.com/..., then it
        > can't access
        > > data from my servlet and if the sub application is in the same
        > folder as the
        > > parent app in my phone, then it's able to read from my servlet.
        > > I read the documentation and it says that the swf requesting the
        > data must
        > > be in the same domain as where the data is coming from in order
        to
        > allow the
        > > swf file access to those data, but in this case, those
        applications
        > (sub
        > > applications) are in my phone memory, not in the same domain as
        my
        > servlet
        > > providing the data and it's still able to access data from the
        > servlet using
        > > loadVariables().
        > > Thanks. Sorry in advance if it sounds stupid... I'm still
        > learning. thanks.
        > >
        > > Ivan
        > >
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.