RE: [flexcoders] IFrame Example for Flex 2?

2006-02-13 Thread Jason Hawryluk





As 
I said all "seems" possible. 

With 
domains you can not talk to a domain outside your own domain (the domain the swf 
originates from) to an outside domain (www.yahoo.com) with out a cross domain xml 
file"physically" 
on the outside domain (very unlikely). 

So 
if the Iframehas a loadedpage from some other domain that you don't 
have access to you can't talk to it. This is normal for security reasons, and 
that is how the sandbox security methods work. If 
you are in control of both domains then it's possible.

I 
am also interested in the possibility to integrate regular HTML/_javascript_, 
however during my research found no real solid way to do it. I.E. drag and drop 
etc... Cross browser/os support etc... The problem is that the swf 
container and the iframe parent, control the drag and drop respectively and 
independently. If you drag an item from ie (link, whatever)over top of a 
flex button for example, no events are dispatched.

You 
can read, copy, write information etc.. which is good. You can even inject 
_javascript_ into the html parent of the swf and then run it. I just have yet to 
figure out a drag and drop solution. I haven’t given up mind you :) When I get 
back to it I’ll share my findings with you.

Your 
solution below is sound "except" how does flex know that there is text dragged 
or dropped if it receives no events? Unless you use callback's. You would have 
to cancel the drag operation in the iframe the same time you mouse out of it and 
trigger the call back to flex to take the lead. It may just 
work.

I will spend some more time this week on it. If you 
make progress please let me know...

Keep the thread going, I'm sure others are also very 
interested in this sort of thing.

Jason



  -Message d'origine-De: 
  flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]De la part 
  de Mark WalesEnvoyé: samedi 11 février 2006 
  21:39À: flexcoders@yahoogroups.comObjet: RE: 
  [flexcoders] IFrame Example for Flex 2?
  
  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 HawrylukSent: Saturday, February 11, 
  2006 8:02 
  AMTo: 
  flexcoders@yahoogroups.comSubject: RE: [flexcoders] IFrame Example 
  for Flex 2?
  
  
  I 
  don't have any examples but, what your wanting to do sounds possible. 
  Howeveryou 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.
  
  
  
  Jason
  
-Message 
d'origine-De: 
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]De la part de stuffEnvoyé: samedi 11 février 2006 
12:42À: 
flexcoders@yahoogroups.com; flexcoders@yahoogroups.comObjet: 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.Si

Re: [flexcoders] IFrame Example for Flex 2?

2006-02-11 Thread stuff

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 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




RE: [flexcoders] IFrame Example for Flex 2?

2006-02-11 Thread Jason Hawryluk





I 
don't have any examples but, what your wanting to do sounds possible. 
Howeveryou 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.

Jason

  -Message d'origine-De: 
  flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]De la part 
  de stuffEnvoyé: samedi 11 février 2006 
  12:42À: flexcoders@yahoogroups.com; 
  flexcoders@yahoogroups.comObjet: 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
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  









RE: [flexcoders] IFrame Example for Flex 2?

2006-02-11 Thread Mark Wales











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 youve 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.
Howeveryou 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.











Jason





-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
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS

RE: [flexcoders] IFrame Example for Flex 2?

2006-02-10 Thread Mark Wales

Manish - thanks for the reply. 

Does anyone out there have any HTML/Javascript-to-Flash/Flex examples
they can share?

-Mark


-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Manish Jethani
Sent: Thursday, February 09, 2006 1:36 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] IFrame Example for Flex 2?

On 2/8/06, Mark Wales [EMAIL PROTECTED] wrote:

 Like a few before me I have tried to get the IFrame example that
 Christophe Coenraets put together for an earlier version of Flex. Has
 anyone been able to successfully port this to either the Alpha or
Beta?

Brian has:
http://www.deitte.com/archives/2006/02/embedding_html.htm

 Also, as a conceptual question, might a working example of this allow
 Drag and Drop from the HTML pages that are loaded to Flex? I'm afraid
I
 do not yet understand the Flex-HTML-Javascript combination well enough
 to grasp what is technically possible or not.

There's on direct drag-n-drop between HTML and Flash, although it
might be possible to implement it (primitive data like string/int can
be exchanged between these environments).


--
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 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





Re: [flexcoders] IFrame Example for Flex 2?

2006-02-10 Thread Manish Jethani
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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





RE: [flexcoders] IFrame Example for Flex 2?

2006-02-10 Thread Matt Horn
This might help:
http://livedocs.macromedia.com/flex/20beta1/docs/1296.html

Doesn't talk about iFrames, but it shows JavaScript-Flex and
Flex-JavaScript interaction with the ExternalInterface API.

Matt Horn 

 -Original Message-
 From: flexcoders@yahoogroups.com 
 [mailto:[EMAIL PROTECTED] On Behalf Of Mark Wales
 Sent: Friday, February 10, 2006 3:49 PM
 To: flexcoders@yahoogroups.com
 Subject: RE: [flexcoders] IFrame Example for Flex 2?
 
 
 Manish - thanks for the reply. 
 
 Does anyone out there have any HTML/Javascript-to-Flash/Flex 
 examples they can share?
 
 -Mark
 
 
 -Original Message-
 From: flexcoders@yahoogroups.com 
 [mailto:[EMAIL PROTECTED] On Behalf Of Manish Jethani
 Sent: Thursday, February 09, 2006 1:36 AM
 To: flexcoders@yahoogroups.com
 Subject: Re: [flexcoders] IFrame Example for Flex 2?
 
 On 2/8/06, Mark Wales [EMAIL PROTECTED] wrote:
 
  Like a few before me I have tried to get the IFrame example that 
  Christophe Coenraets put together for an earlier version of 
 Flex. Has 
  anyone been able to successfully port this to either the Alpha or
 Beta?
 
 Brian has:
 http://www.deitte.com/archives/2006/02/embedding_html.htm
 
  Also, as a conceptual question, might a working example of 
 this allow 
  Drag and Drop from the HTML pages that are loaded to Flex? 
 I'm afraid
 I
  do not yet understand the Flex-HTML-Javascript combination 
 well enough 
  to grasp what is technically possible or not.
 
 There's on direct drag-n-drop between HTML and Flash, 
 although it might be possible to implement it (primitive data 
 like string/int can be exchanged between these environments).
 
 


--
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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





RE: [flexcoders] IFrame Example for Flex 2?

2006-02-09 Thread David Mendels





Hi,

Brian Deitte posted a port of this sample to Flex 2 a few 
days ago on his blog.

-David
Adobe



  
  
  From: flexcoders@yahoogroups.com 
  [mailto:[EMAIL PROTECTED] On Behalf Of Mark 
  WalesSent: Wednesday, February 08, 2006 9:05 PMTo: 
  flexcoders@yahoogroups.comSubject: [flexcoders] IFrame Example for 
  Flex 2?
  Like a few before me I have tried to get the IFrame example 
  thatChristophe Coenraets put together for an earlier version of Flex. 
  Hasanyone been able to successfully port this to either the Alpha or 
  Beta?Also, as a conceptual question, might a working example of this 
  allowDrag and Drop from the HTML pages that are loaded to Flex? I'm afraid 
  Ido not yet understand the Flex-HTML-_javascript_ combination well 
  enoughto grasp what is technically possible or not.Thanks for 
  anyone who can provide some insights...-Mark





--
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
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  









Re: [flexcoders] IFrame Example for Flex 2?

2006-02-08 Thread Manish Jethani
On 2/8/06, Mark Wales [EMAIL PROTECTED] wrote:

 Like a few before me I have tried to get the IFrame example that
 Christophe Coenraets put together for an earlier version of Flex. Has
 anyone been able to successfully port this to either the Alpha or Beta?

Brian has:
http://www.deitte.com/archives/2006/02/embedding_html.htm

 Also, as a conceptual question, might a working example of this allow
 Drag and Drop from the HTML pages that are loaded to Flex? I'm afraid I
 do not yet understand the Flex-HTML-Javascript combination well enough
 to grasp what is technically possible or not.

There's on direct drag-n-drop between HTML and Flash, although it
might be possible to implement it (primitive data like string/int can
be exchanged between these environments).


--
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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/