Menu with Iframe

 

Here is a menu which 'll use IFRAME concept. So you could import html, php, asp pages.
An html page can contain flash movie. It can be loaded as transparent in iframe.

This has been achieved from the outstanding work of gypsytrader and affords a refutation to those who wrote it's impossible to import external webpages in a swf movie.
This runs as well as possible in Internet Explorer and Mozilla Firefox browsers.

Click Menu to get back to initial state.
Download zip file :
In case you still think it's too complicated, here's a so-simple example :
( See also this example previously described )

Many newbies 'd wish immediately to build a website using SwishMax.
This can't be serious. Who could claim to drive a Nascar car right after getting his driving license?
( ... and generally, we could wonder who could ? )
Swi files are supplied, therefore I won't say how to proceed; just some explanations so that it 'd fit with your work.

First, let's remind what is IFRAME : floating frame which can be anywhere within a standard HTML document in Internet Explorer, but also accept WIDTH and HEIGHT and standard HSPACE, VSPACE and ALIGN attributes, to set the display size and alignment of the frame within the document.

Let's take a look at index.html :
In the Javascript section, you find out a function named
function Example1_DoFSCommand(command,args)
This function (except part of code inside) has been generated by SwishMax whether you use the swish function fscommand in a script, to run some user's JavaScript (not the usual alert, prompt, ...).
Of course, you 'll get it while exporting HTML+SWF.
You also can see the name of the function begins as the SWI file ( Example1 here for instance )
Switch directs some user-defined Javascript functions, to be specific : maximize, validate, iframeCommand. This last function handles arguments to run other functions. You usually shouldn't modify them.

pen Example.swi in Swishmax and take a look at scripts.
In scene preload, you find out definitions of global functions opened to all scenes, for instance : iframeResize, iframeHide, iframeDelete, iframeLoad.
These functions are calling fscommand("iframeCommand",..... with some arguments as setHW, setTL, delete, setContent, that what's make Javascript functions iframeSize(args), iframeMove(args), iframeDelete(args), iframeSetup(args) carrying out.
Same here for fscommand("validate") which runs validate().

To fit to your work, after exporting (HTML+SWF) from SwishMax, it only takes :
1 - edit html file supplied by SwishMax, delete all javascript code.
2 - copy/paste Javascript code from index.html published in zip file downloaded.
3 - replace everywhere Example1 with the name of your movie.

Whether you are methodical, it'd be fine.

 


Page chargée en 0.001 sec.

Dernière Modification : Jeu 7 Septembre 2023 10:26
Copyright © 1999-2023 Jean-Paul Molina Tous droits réservés.

 

to Google