Syndicate

Feed

SIDEBAR : Flash as an inline element

The Strict xhtml Document Type Definition states without ambiguity that the <object> element is an inline element, not a block element.

Block-level elements versus inline elements

A block-level element is laid down on the page as if there was a linebreak before and after it. The <p> element is an example of a block element. Block-level elements pile up one on top of the other. Headlines, blockquotes, <div> tags, tables and lists are other examples of block-level elements. Inline elements don’t create a linebreak before or after them. They appear on the same line as content and elements beside them, they are inline with the text. They are laid next to one another horizontally, from left to right, until they fill the width of the container element, then they continue on, on the next line. That means that if you put two Flash objects side by side in the markup, they will end up side by side on the page if the width of the container (parent) element is large enough to accomodate their width.

While we’re at it, let’s list the five subsets of inline elements, as specified by the Strict xhtml DDT :

  • First, there is the %special subset  : br, span, bdo, object, applet, img, map, iframe.
  • Then we have the presentational markup subset : tt (teletype), i, big, small, u, s, strike, font, basefont.
  • Then we get the phrase markup subset : em, strong, dfn, code, q, sub, sup, samp, kbd, var, cite, abbr, acronym.
  • We also have the form markup subset : input, select, textarea, label, button.
  • In the fifth subset, we have elements which, depending on their container element, are either inline or block elements : ins, del, script, noscript.

Can a Flash object be used as label for an anchor element ?

A question that we may ask ourselves is : can we put a Flash <object> inside an anchor element, to make it clickable, just like we can with text or an image ? The answer is yes, we can put an <object> element between <a> tags.

According to the Strict xhtml DDT :

  • An anchor element cannot contain another anchor element.
  • An anchor element can contain any other inline element (see list in the preceding box). The definition is clear : the child element of an anchor element can be an <object> element, as the object element is part of the %special inline subset.

If we do put a Flash object element inside an anchor element, will it be clickable, and will the browser load the page with the URL specified in the href attribute... in the window ? The answer is yes in Firefox, and no in Internet Explorer. A quick and dirty way to circumvent the limitation (bug?) in Internet Explorer is to add a behavior to the Flash movie clip in the Flash Development Interface (do not bother writing ActionScript for this if the url is a constant) : the action would be Go to Web Page... and the event would be On Press. If you want to code it yourself, use the ActionScript function getURL(url:string, target:string). Use "_self" as target if you want the browser to open the page in the current window.

Flash 8 screenshot of how to add a behavior

Last edited by Caroline Schnapp about 15 years ago.

Comments

Free drupal platform?

Caroline, I've been contemplating on moving my blog to a drupal platform. Do you know of any free alternatives that I can setup a trial blog? Something like wordpress.com for wordpress fans? I don't know how I landed on your site but it's a helluva information on drupal! Thanks so much!

time-honored,

time-honored, http://lv1store.com life style for the united states States marine its issues. such a merchants can fundamentally captivate males & females in order to get using their web-site concerning the giving visuals with all the current common select, allowing it to consist of small nulled program defining for example picture is made for instruction only.

I am at present taking a

I am at present taking a shot at a work and I have been investigating your online journal for a couple of hours. Much thanks to you for your post it demonstrated accommodating for me. Web Design Company in Delhi