Hi, i very much love the Chromeless Script that was written. However, there is something i wanted to modify in the script. It is to add <body style=“margin:0px;”> or something like it. I don’t know any scripting so i need help with this.
What i wanted to do is to make it so that if i open images using this script, it will open the image files without a white border around it. Also, was wondering how to use this if linking from HTML, rather than Flash … I’m sure i read it on the creator’s website but now i can’t seem to find it anymore.
Hope you could help me out. Thank you!
To launch it is HTML it is the same way you launch it in Flash except it looks like this…
As for without the white border, that isn’t done with the chromeless window. The only way to get rid of that is to put each picture in its own HTML page and remove the page margins with HTML code. Unless I, for some odd reason, am overlooking another way, but I don’t think I am.
I was reading through their chromeless script and thought i saw that they wrote script on the fly sort of … like … it wrote out the HTML code with the stuff that u were passing it when u called it in the button. I tried to add the 0px margin thing myself but couldn’t get it to work …
hmm … i have some pictures i want to be able to open using the chromeless script, but it’s kind of a large amount, somewhat like a photoalbum, and i don’t want to make individual HTML pages for them, is there a way to get around this ?
Wow, I just realized that the board messed up the code I posted before, I fixed it now, I had to add a space between “java” and “script:” and “script:” and “openIt” so just remove those.
To get rid of the margins on the html page you would have to add
to your body tag to make it have…
That will remove all possible margins.
As for a workaround, there is none that I know of. When you call upon an image itself through a URL it opens the page up in a default HTML page, with the default white background and the default margin. There is no way to change that unless you create the page for it to load in, instead of the browser creating the page it loads in.
I know how to make the margins go away in an html page, and I was just thinking, is it possible to …
- create the HTML that would load a picture with no margins
- make the name of the picture a variable
- put the name of the picture in a button
- when you click on the button, it would pass the name of the picture to the HTML file and it would load that picture’s name which is contained in the variable
although i can think of this, i’m not sure if it works, and how to make it work if it does.
You can easily do that in PHP, but I am still learning PHP so I can’t help in that department.
As for the margin thing: You said that you couldn’t get it to work.
I tried to add the 0px margin thing myself but couldn’t get it to work
That is why I added how to do it.
ooooohh … sorry … i meant i couldn’t get it to work when i added lines into the chromeless script. But it’s fine when i just write an html page with no margins …
er … would u happen to know of any other ways of opening images with no margins (without having to use the Chromeless script) and not requiring to write individual HTML pages?
photoalbums are kinda tedious if i had to write html pages one by one … hehe
Nope sorry, I don’t know of another way:(
Just use Flash, embed an swf and dynamically load jpgs into that??!
that’s an idea !
i just read a bit of that in the tutorials here.
Would that not require me to create individual swf files that hold jpg files ?
No, MX can dynamically load images into a .swf file.
So you will only need 1 .swf file. But now is the issue of finding a a way to add the images. You will have to have the links for them inside that .swf file, possible in a drop down box?