Edgewall Software
Modify

Opened 15 years ago

Closed 15 years ago

#8669 closed enhancement (invalid)

About Flash and mootools, swiff instead of swfobject

Reported by: info@… Owned by:
Priority: normal Milestone:
Component: web frontend Version: none
Severity: normal Keywords: flash, swf, swiff, mootools
Cc: info@… Branch:
Release Notes:
API Changes:
Internal Changes:

Description

Hello, i'm a fan of Typolight. Congratulation for the good work guys.

I would contribute with some considerations of mine about the use of flash plugin and the Typolight functions to embed it.

I tested the flash module of Typolight (2.7.3) and i noticed that in front end you call swfobject. This is a great script but in some cases there are problems:

  • if i call the module in the "Layout" all is fine.
  • if i call the module using the "wildcards" example {{insert_module::34}} where 34 is the id of my flash module, Typolight can't recongnize it, and in front end there is no swfobject, so the script is broken. (it works only if in the page i have another flash, as the first way, so swfobject is included)

Then i find another weird thing using this module: in my front end i have a little space of some pixels under the swf, and i won't it. But if i use a custom html code of mine using Swiff instead of the swfobject(see forward), i have all fine. So i wonder what swfobject is making the thing different.

Swiff is part of the core of Mootools, i think you know it already, anyway here is the link: http://mootools.net/docs/core/Utilities/Swiff

I think we have all the flash params like before (and we can import variables too), but the javascript code is different, so the module needs changes in the output functions.

Typolight is Mootools powered so i think it should be a good thing to keep all in the core and kick out swfobject. Also, in this way you don't need to intercept if you want swf and include extra js… bug solved in one move.

Note: Swiff doesn't need a div tag to replace with the swf (like swfobject), the div you call in the function is just the container. I find this little difference very good for design, we have the id for the container and the id for the swf. Using swfobject i was disappointed about the replace, i design a div for the swf and in output i find it removed (replaced) :D, so i need to add a wrapper.

Example using Swfobject, this is the output i got from TL (must have swfobject.js in head):

<div class="mod_flash block" id="flashtop"> <div id="atletitop"> This is the alternate text </div> <--[if gte IE 5]> <script type="text/javascript" event="FSCommand(command,args)" for="atletitopCom"> atletitopCom_DoFSCommand(command, args); </script> <![endif]—> <script type="text/javascript"> <--—><![CDATA[><-- function atletitopCom_DoFSCommand(command, args) { } swfobject.embedSWF("tl_files/kl_theme/header.swf", "atletitop", "1000", "272", "6.0.0", false, false, { allowfullscreen: "true", flashvars: "URL=http://demo5.fsw.it:8085/clienti/kombat/portale/www/", swliveconnect: "true" }, { id: "atletitopCom", name: "atletitopCom" }); —><!]]> </script> </div>

Example using Swiff (no swfobject.js required), assuming the module is the same, called "flashtop":

<script type="text/javascript">

var obj; window.addEvent( "domready", function() {

obj = new Swiff('tl_files/kl_theme/header.swf', {

width: 1000, height: 272, params: { wmode: 'opaque', bgcolor: '#ff0000'

},

container: $('flashtop')

});

});

</script>

<div id="flashtop"> here we have the alternate text, the swf is inside here </div>

Attachments (0)

Change History (1)

comment:1 by Emmanuel Blot, 15 years ago

Resolution: invalid
Status: newclosed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The ticket will remain with no owner.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from (none) to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.