Linking Flash and HTML

I have a movie, with a swift 3d element and flash, after playing the movie, I would like in its place load a regular HTML page.
I dont want to load a new page, is it possible to do without loading to a new page??

How about if you use layers and JavaScript. You could probably place the Flash file on a layer in your HTML dicument and then find a Javascript that makes that layer disappear after a certain amount of time. I don’t have an actual script for you but it’s an idea…

good idea! anyone know?

not sure why it would load a new window without you telling it to
with _blank, but try this.

put this on the last keyframe of your movie, and it will load an
html page in place of the existing one:

getURL("page.html", "_self");

That wont work UNFLUX,
Because my animation is already on that page… its half HTML half flash, and I want the flash side, after the animation is done, to disapear and leave only the HTML, and HTML underneath it.

ok. you need to have your page set in frames then. otherwise
you can’t do it without loading an entire new page.

But whatabout that idea that lucidsurf got, the JAVA scripting?

i’m pretty sure you can’t run an external javascript to unload a flash movie, any of it’s levels, or layers, or anything to with flash.

besides, html doesn’t have layers. the easiest solution, IMO, is
frames in this case.

hmm… I am pretty sure HTML does have layers… I use all the time…

you can call to a javascript FROM flash, but no back into it, is what
I was trying to say. :slight_smile:

ohh ok thx

ok , well if you get it to work that way, I’ll have learned something
new about design. I hope you’re right.

Oh well, I tried. :whistle:

Iframes will work, or use DHTML layers, and call them either visible or invisible…

Rev

not sure why frames isn’t an option here.

I agree… if used properly, frames is fine.

that is why I suggested iFrames…

Rev

Ok… if you place a Flash SWF on an HTML layer then that layer can definitely be controlled by JavaScript. It will only be the HTML layer under JS control - not the Flash movie.

So…

 < LAYER NAME = myLayer HEIGHT = 50 WIDTH = 89 LEFT = 93 TOP = 91 VISIBILITY = HIDE>
    somemovie.swf
</LAYER >

Everything inside the LAYER tags is part of that layer. To make a layer visible, set it’s VISIBILITY parameter to “SHOW”. To hide a layer, simply tell it to “HIDE”. To control a layer through JavaScript start by defining it. For example, to define “myLayer”:

    var myLayer = document.layers["myLayer"];

Then you can set visibility using something like:

myLayer.visibility = "HIDE";

You could combine this with some kind of timer, I guess, but my JS isn’t quite so good. This is probably a contender for the Random forum as it’s not really FMX related.

Whats Iframes, reall quick…

iframes are a way of including another html page within the page you are on. They work in a similar way to normal frames. They are not compatible with some early versions of netscape and other non ie browsers. I doubt that they will solve your problem though i’d look for a javascript timer although even this might be not be the most reliable thing.

However here’s an example of how they work, copy and paste this into a html page

<iframe src=“http://www.coalporters.org” width=“500” height=“400” align=“left” hspace=“20” name="#myiframe">
<B>Sorry iframes are unsupported on this browser</B>
</iframe>

<br><br>
<a href=“http://www.bbc.co.uk” target="#myiframe">page1</a><br>
<a href=“http://www.thesun.co.uk” target="#myiframe">page2</a>

You still need an event to trigger changing the targets so thats why you would need the javascript. You can remove the scroll bars by adding extra commands to the iframe (but i cant remember what they are probably scroll=false or something similar)

Err sorry guys wasnt meant for it to do that i don’t know how to post the code I want to show you in here

you may have to attach it as an html file.