Jason,
By domains, I am assuming you mean
different domain names – is that correct?
Assuming IFrame to
Flex is not directly possible, here is what I was
proposing:
-
Create a
Flex application that can communicate with the _javascript_
of a designated page
-
Make
that designated page local to your machine (i.e. perhaps the one hosting your
.SWF)
o
embed an
additional IFrame
o
embed _javascript_ to point the embedded IFrame
to a designated URL
o
embed _javascript_ functions to support the desired drop functionality
from the “remote” IFrame to the local IFrame
o
drive
the “internal” IFrame by sending the URL
to the local page/IFrame – which then sends it
to the embedded IFrame
o
retrieve
from the “internal” IFrame by embedding _javascript_ functions that can be called by Flex to retrieve
the dropped text
From what you’ve said, the fatal
flaw in this proposal would be that the locally hosted HTML page and the page
presented in the embedded IFrame are in different
domains and therefore not able to “communicate”. Is this correct?
-Mark
-----Original Message-----
From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf
Of Jason Hawryluk
Sent: Saturday, February 11, 2006 8:02 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] IFrame
Example for Flex 2?
I
don't have any examples but, what your wanting to do sounds possible.
However you can not do this across a domain. It would take quite abit of
work to get a drag and drop from iframe to flex. The ifram drag and drop is
separate from the flex application. You can't even get a mouse x and y into
flex from html in relation to the flex app. Once you hover over a iframe flex
is no longer in control (and from my tests recives no events). The click and
drag in an iframe is intended to stay within the iframe, unless you do
significant _javascript_ work on it. I know what your after, I attempted this
myself in alpha, havn't tryed it in beta.
Why
do you need click and drag in an iframe? Load your data directly into flex.
-----Message d'origine-----
De : flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED]De la part
de stuff
Envoyé : samedi 11 février
2006 12:42
À :
flexcoders@yahoogroups.com; flexcoders@yahoogroups.com
Objet : Re: [flexcoders]
IFrame Example for Flex 2?
The goal is to drag and then drop text highlighted
on an HTML page to a Flash or Flex-based component (or for someone to tell me
it is not possible so I won't search/try any more!).
I am presuming based on my limited knowledge of
Drag-and-Drop using HTML(and its associated _javascript_) and, separately, my
experience using Drap-and-Drop within Flex that some amount of scripting will
be required on both sides to complete the task.
Since I have seen some cool examples of
Drag-and-Drop using _javascript_ and I know Flex 2 enhances the ability to
communicate between _javascript_ and the Flash platform, I assume that there may
be new ways of accomplishing this that previously either did not exist or were
less excessible than before. If anyone has experimented with them, I am hoping
they can share.
My ideal scenario would be to highlight text and
drag it directly into an TextArea (without HTML formatting would be just fine).
My hopefully manageable compromise would be to load a local HTML page that had
an HTML-based text field in it and an IFrame. The thought would be I could use
ActionScript to pass the _javascript_ the URL I was interestd in, the _javascript_
would load the URL in the specified IFrame, I could then highlight the text I
wanted, drop it in my HTML-based text field using _javascript_/AJAX and then
again using _javascript_ pass it back to Flex.
-Mark
> -------Original Message-------
> From: Manish Jethani
<[EMAIL PROTECTED]>
> Subject: Re: [flexcoders] IFrame
Example for Flex 2?
> Sent: 10 Feb '06 20:51
>
> On 2/10/06, Mark Wales
<[EMAIL PROTECTED]> wrote:
>
> > Does anyone out there have any
HTML/_javascript_-to-Flash/Flex examples
> > they can share?
>
> Can you elaborate on that? What
do you mean by
> "HTML/_javascript_-to-Flash/Flex
examples"?
>
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
> Yahoo! Groups Links
>
>
>
>
>
>
>
>
>
>
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
YAHOO! GROUPS LINKS