|
|
|
|
HOW TO: Add an iFrame to a SWiSHmax movie., Putting HTML, JS
Home » Flash » 3rd Party
HTML iFrames - most people love them or hate them and yet others have no clue what they are. But if you want that HTML or PHP or JavaScript in your SWiSH movie, you need an iFrame and then some.
The iFrame is a web page element that creates an inline frame as an object to hold another HTML document. The iFrame holds a self-contained document within a container document buy simply loading another web page within the < iFrame > tags. Simple enough, but more is needed to successfully put that other web page into your movie, namely DHTML.
DHTML (Dynamic HTML) is the combination of several built-in browser features of modern browsers (fourth generation) that enable a web page to dynamically change after it has been loaded. It is not a programming language although in this example I use some JavaScript to implement and control an iFrame's size, location and content.
The main problem with DHTML is a lack of browser standards. So cross-browser DHTML basically means using various scripting techniques to sniff out which browser the user is using and execute the code intended for that browser. For me, there are too many browsers out there ...and then there are the Mac users.
So my example works on some browsers, operating systems and hardware, but not all. Need better coverage? Study up cross-browser DHTML techniques and change the JavaScript. But later for I want to show you the basics of what I already have in the example.
This implementation also uses Flash's fsCommand as an interface between the movie's scripting and JavaScript. This alone is limiting since it is not available on all machines. My previous examples (HSB) used JavaScript instead of fsCommands, but this is annoying to IE users due to the incessant navigation 'click' associated with every JacaScript command executed.
In keeping with my earlier work, this is named gsbHSBv6 for future reference. HSB simply stands for "HTML Scroll Box." I have added the gsb to better enable forum searches. (Keywords in searches must be more than three characters in length.)
|
More Tutorials by this user
|
|
|
|
|
|
|
|
|