Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Flex, IFrame and SWFObject
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  7 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
newtriks  
View profile  
 More options Jun 17, 5:14 am
From: newtriks <newtr...@googlemail.com>
Date: Wed, 17 Jun 2009 02:14:46 -0700 (PDT)
Local: Wed, Jun 17 2009 5:14 am
Subject: Flex, IFrame and SWFObject
Hi all,

I am a strong advocate for SWFObject and first up would like to say
thanks to all for the hard work in creating it.

Onto my little head scratch issue.  Within a flex application I _have_
to embed some html and am using an IFrame as provided on
http://code.google.com/p/flex-iframe/ to achieve this.  This actually
works very well using the standard html wrapper provided by Flex
Builder 3.  I have since ported the wrapper to use SWFObject and found
that this actually now breaks the IFrame embedding.  The result is the
Iframe displays outside of the html content and is not displayed
within the Flex app?  Seeing as this _did_ work before the
introduction of SWFObject I conclude that something is happening under
the hood which I am unaware of.  Any help woul dbe appreciated.

Here some simple source as an example http://www.newtriks.com/downloads/IFrameDemo.zip

Cheers,

Simon


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Aran Rhee  
View profile  
 More options Jun 17, 9:25 am
From: Aran Rhee <aran.r...@gmail.com>
Date: Wed, 17 Jun 2009 23:25:40 +1000
Local: Wed, Jun 17 2009 9:25 am
Subject: Re: Flex, IFrame and SWFObject

Hi Simon.

The quickest way that we can try to help is if you post a link up for a
complete (and simple) use case example. This way everyone can look a the
same thing (as opposed to having to individually setup a Flex project from
your source etc). It sounds like from what you are saying that it is just
some CSS values getting messed up to position the iframe in the correct
place.

Cheers,
Aran


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
newtriks  
View profile  
 More options Jun 17, 10:34 am
From: newtriks <newtr...@googlemail.com>
Date: Wed, 17 Jun 2009 07:34:39 -0700 (PDT)
Local: Wed, Jun 17 2009 10:34 am
Subject: Re: Flex, IFrame and SWFObject
Hi Aran,

Sure, here is the url to the app:

http://www.newtriks.com/apps/IFrameExample/IFrameDemo.html

And here is the source code for it:

http://www.newtriks.com/apps/IFrameExample/srcview/index.html

Cheers,

Simon

On Jun 17, 2:25 pm, Aran Rhee <aran.r...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Aran Rhee  
View profile  
 More options Jun 17, 10:33 pm
From: Aran Rhee <aran.r...@gmail.com>
Date: Thu, 18 Jun 2009 12:33:15 +1000
Local: Wed, Jun 17 2009 10:33 pm
Subject: Re: Flex, IFrame and SWFObject

Simon.

Ok, I can see what is happening now. Can I verify that it also works for you
in IE, but not in Firefox / Safari etc?

I can get it to behave if I use firebug to modify some CSS positional
settings for the iframe in FF, so it is definitely CSS related. As the swf
is published at 100% w/h, there needs to be a bit of extra CSS added in
order for things to display correctly. See FAQ #1:
http://code.google.com/p/swfobject/wiki/faq

Also, is there any reason you are using the createCSS() method through
SWFObject rather than just defining a normal CSS declaration?

After poking around a bit in the differences in the generated code between
IE and FF, and could see that FF was missing the CSS required for it's
absolute positioning, so I added the CSS declaration for #myFrame (as seen
in IE) to the page.

All is working now, and tested in IE7/8, FF3, Safari 4 and Chrome.

See example here:
http://www.misterhee.com/tests/flex.iframe/IFrameDemo.html

I am sure you can remove a lot of the CSS declarations from #myFrame, but I
will leave that up to you to experiment with. I think the only important
ones are:
POSITION: absolute; TOP: 30px; LEFT: 10px;

Looking through IFrame.as, it looks like the moveIFrame() function may not
be getting called at the right time? Maybe you could try experimenting if
calling moveIFrame() from your Flex app (with a button press etc) after init
actually resolves it.

Another solution is to strip out the create/hide/move js functions from Flex
injecting them into the DOM invisibly and just declare them on the page or a
seperate js file. This way you can call them from the hosting page when you
like and "fix" any issues.

Anyhow, you have aw solution if your app is fixed to the top left of the
browser window...

Aran


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
newtriks  
View profile  
 More options Jun 18, 3:57 am
From: newtriks <newtr...@googlemail.com>
Date: Thu, 18 Jun 2009 00:57:59 -0700 (PDT)
Local: Thurs, Jun 18 2009 3:57 am
Subject: Re: Flex, IFrame and SWFObject
Aran thanks for your time and effort there, its much appreciated, I
will look into what you have written.  Cheers for your help,  Simon

On Jun 18, 3:33 am, Aran Rhee <aran.r...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
newtriks  
View profile  
 More options Jun 19, 9:49 am
From: newtriks <newtr...@googlemail.com>
Date: Fri, 19 Jun 2009 06:49:15 -0700 (PDT)
Local: Fri, Jun 19 2009 9:49 am
Subject: Re: Flex, IFrame and SWFObject
I have now removed the example error code and written this solution on
my blog, cheers Aran:

http://www.nutrixinteractive.com/blog/?p=465

On Jun 18, 8:57 am, newtriks <newtr...@googlemail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Aran Rhee  
View profile  
 More options Jun 21, 10:11 pm
From: Aran Rhee <aran.r...@gmail.com>
Date: Mon, 22 Jun 2009 12:11:09 +1000
Local: Sun, Jun 21 2009 10:11 pm
Subject: Re: Flex, IFrame and SWFObject

Simon.

I'm glad to managed to poke around and find what was actually causing the
issue. Being forced to use a certain doc type ain't great though... I
generally use XHTML as a doctype.

BTW - you may want to run your page through a W3C validator. it fails badly
at the moment as your tags are all XHTML style.

Aran


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google