View Full Version : Slider extending beyond dimension set on IFRAME

Vijay Venkat
03-13-2008, 04:39 AM
Hi Group,

I have the following requirement.

We have a flash content that is rendered on to a iframe which is of dimension 300x250px. The dimension of the content is same as that of the iframe. The content renders a button. Click on this button should display another container of same dimension similar to the one that is being displayed. This container is used for displaying a flash movie. This movie clip is expected to slide to left on click of the button and display the movie.

The problem i see is that, it will not be possible to display this new movie clip, since it constrained by the dimension set on the iframe. The requirment is to overlay this movie clip on the page, so that the end user is able to view the video.

I can think of two options:

1. Resize the iframe dimension appropriately and display the movie clip. But this has a side effect of moving the contents with in the page.

2. Other option is to create a div as child element of the top most document, position it absolutely and the identify the position of the current iframe and display the movie clip to its left. But i feel this will have cross domain issues.

Can anyone validate my thinking and give me some pointers to achieve what i am looking for? Any pointers is highly appreciated.


03-13-2008, 06:02 AM
Well...why not drop the iframe and just use a Flash box in which it stops on the first frame with the button to play, and then you can have the movie clip slide into view then?

Vijay Venkat
03-13-2008, 12:05 PM
Thanks a lot for taking time and responding.

We cannot go without the iframe. Actually we give out javascripts to the client and this script renders a iframe inside which the actual flash movie exists. Hence not having a iframe is not possible.

Also there is no guarantee the end user of our script will not embed the script with in a IFRAME, since it is rendering much more than just the flash unit. We render javascript files and the flash.

Another thing that came up was to bump the z-index of our iframe to a very high value, so that it sits on top and hence have our video slide out. But this will again suffer the same problem, if the end user adds his IFRAME and constrains the size


03-13-2008, 04:33 PM
I'm sorry I'm not following what you are actually trying to accomplish, do you have a link to show this?

Are you looking for a way to make a frame in which the content can slide within a window of the page? Check this: http://demos.mootools.net/Fx.Scroll

What do you mean the end user add his iframe? If its part of the page, it will be there right? He/she doesn't have an option to load it, and do you mean that it constrains the size of the page or the flash constrains the iframe?

More clarification please.

Vijay Venkat
03-14-2008, 07:07 AM
Once again thanks for taking a more closer look.

Think like google ad sense. We have publishers who use the script provided by us in their page. Our script now pulls content from our server and displays it.

The publisher allocates some space with in which the content we deliver exits. This content is normally of size 300x250. So normally publisher or folks who own the site would normally add our script. This script pulls the content from our server. While doing so, we render our content with in a IFRAME so that we deliver XHTML content in standards mode. This way we don't have to be bothered of the main page rendering mode and couple of other browser quirkiness(IE box model hacks).

When the publisher or the web page author places our script, they might themselves place the script with in iframe of size 300x250(dimension set) so that our content is restricted to the dimension.

What i am trying to achieve is display a flash content with in this space of 300x250. In this flash unit there is a button, onclick of which i need to show a movie. But this movie which comes up, should not be on top of the existing content (300x250), but should be outside of it to the left. Which means the new movie which i am showing should get overlayed on top of the document, so that the viewer of the page will get to see the video, what ever be the nesting or the dept of the content we deliver.

Again this is a bad idea to show the content outside the dimension. But we are requesting for explicit permission to do so. That is the request from publisher itself. They are interested in only providing a space of 300x250 but when required we can overlay the new content on the document, which also has a close button in it, thus the page viewers can close the overlayed content.

I hope i have clarified. Unfortunately i don't have public domain where i can host what i am trying to achieve.

once again. Thanks a lot.

03-14-2008, 08:07 AM
So you are wanting to open flash content in another box outside of your predefined iframe? So you click the button, another window slides out and shows a video. Gotcha I think. Think MSN Soapbox but backwards (http://video.msn.com/video.aspx?mkt=en-us&tab=soapbox)

Do you send the iframe with your content, or does the publisher make the iframe and you just fill it? I think that will make the difference as to how simple this would be.

If you are the ones who send the code for the iframe, you could also design a box to exist underneath that will slide out (like the example above). If you don't code the iframe in your content delivery, you will have to work with each publisher to allow you the code needed to make the sliding box.

This is actually a question for the HTML forum, or the JS forum perhaps. It doesn't really matter what is inside of the boxes, flash or text, the functionality you are talking about is not directly related to flash.

Vijay Venkat
03-14-2008, 12:25 PM
Hi jeremywilken,
The link you posted, shows the kind of experience i am talking about and you are exactly right, that it is backwards.
To answer you questions:
1. Yes we are sending the iframe.

If you are the ones who send the code for the iframe, you could also design a box to exist underneath that will slide out (like the example above). If you don't code the iframe in your content delivery, you will have to work with each publisher to allow you the code needed to make the sliding box.

Yes. We can slip a 'div' underneath the iframe and do what you are mentioning. But, most of the times we have seen that the publisher place our script with in a iframe with dimensions set on it, to make sure the content from our server does not affect their layout. So we are unable to rely on the publisher to have or not have a iframe.

3. I agree, this should be in HTML or JS forum. Initially i wanted to know if flash has some ability to make this possible. I am new to flash, so i was not very confident about the what can be and cannot be done from flash end. From the perspective of JS and HTML i was almost aware of what i can achieve. Now as i work more and more on this, it is obvious that flash has no control over it.

I think, at the end of the day we are going to request publishers to allow content from our domain. So that i can create a 'div' on the fly and overlay it on the top of the document. This way, it will take care of cross domain scripting problem.

Probably i can move this to js forum if it is easy to do so. I will look at that option.

Once again. Thanks for your patience. Your inputs helped me a lot.