height & width settings
IT100 - October 6, 2008 - 13:23
| Project: | Flash Node |
| Version: | 6.x-3.1 |
| Component: | User interface |
| Category: | feature request |
| Priority: | normal |
| Assigned: | flevour |
| Status: | needs review |
Description
would it be possible to make 100% width and hight values available in the flashnode basic settings , current validation give's error when 100% is entered in this formfield.
100% would mean the size of the flashnode content container. Height 100% could be troublesome with browsers if isn't available. But 100% width could be done I think.
Its a suggestion.
Chris.

#1
Its some kind of fix. I hacked page and node, set height and width of swf to 100%, added an id to the container which holds swf (check using firebug) and added code (which you can find under need) that detects screen.height: its a brutal solution but it works, its not compatible with an upgrade. Maybe it can start deeper inquiries into some nice swf adjustments for displaying a singel swf in an as large as possible screen area without setting the body to 100% height. (which gives other problems)
[code]
if(screen.height < 769) filename = "screensize-768.css";
else
if(screen.height < 801) filename = "screensize-800.css";
else
if(screen.height < 1025) filename = "screensize-1024.css";
else
filename = "screensize-1280.css";
loadjscssfile("http://www.100it.be/css/"+filename, "css") ////dynamically load and add this .css file
function loadjscssfile(filename, filetype){
if (filetype=="js"){ //if filename is a external JavaScript file
var fileref=document.createElement('script')
fileref.setAttribute("type","text/javascript")
fileref.setAttribute("src", filename)
}
else if (filetype=="css"){ //if filename is an external CSS file
var fileref=document.createElement("link")
fileref.setAttribute("rel", "stylesheet")
fileref.setAttribute("type", "text/css")
fileref.setAttribute("href", filename)
}
if (typeof fileref!="undefined") document.getElementsByTagName("head")[0].appendChild(fileref)
}
css example
.swftools-wrapper {
height: 400px;
}
[code]
#2
Automatically closed -- issue fixed for two weeks with no activity.
#3
Hello,
I'm actually greatly interested with the possibility of setting the flashnode width and height parameters in percent (%).
To solution above is working but I really think it's a "brutal" one...
Does anybody have another solution to fix this problem ?
Thanks !
#4
Hello,
Subscribing to this one. Flashnode is a great module, but I'd like to set width and height as percentages. It's quite a common practice for embedded animations.
Thanks!
#5
Hello,
I decided to make a hack on flashnode module, and it's working. It's a quick fix, probably the scaling options will stop working (not using them). I did the following:
alter table flashnode modify column height varchar(20) not null;
alter table flashnode modify column width varchar(20) not null;
Regards.
#6
I am attaching a cleaner patch here against 3.1 CVS with support for upgrade path.
I am currently keeping the validation with is_numeric on width and height, stripping away any % char from the strings.
Probably would be better to move this logic to a separate flashnode_sanitize function.
Cheers,
Francesco
#7
I changed to swftools because I wanted to put swf's between texts, swf tools gives the ability to set width to 100%