PDA

View Full Version : Milkbox (swf)



europe451
06-18-2010, 05:32 PM
I just found this .js script Milkbox (http://reghellin.com/milkbox/), kind of a take on light box, but I am having some problems with it.

It is supposed to play .swf files, and I have seen demos where it does without a problem.

My problem is that it won't for me. I can get it to open .jpg's just like lightbox, but for the life of me I can't get it to work properly with the .swf.


<script src="Scripts/mootools-1.2.3-core-yc.js" type="text/javascript"></script>
<script src="Scripts/mootools-1.2.3.1-assets.js" type="text/javascript"></script>
<script src="Scripts/mootools-1.2.3.1-more.js" type="text/javascript"></script>

<script src="Scripts/milkbox-yc.js" type="text/javascript"></script>

<style type="text/css">
@import url(css/milkbox.css);
</style>


<a href="flash/demo.swf" rel="milkbox[motion]" rev="width:480, height=:320" title="Demo of motion graphics"><img src="images/portfolio/motiongraphics/thumb_demo.jpg" /></a>

The .swf doesn't come up nor do the title or any buttons. However when it is just the image, as stated above, it works fine.


<a href="images/testing.jpg" rel="milkbox[motion]" title="Demo of motion graphics"><img src="images/portfolio/motiongraphics/thumb_demo.jpg" /></a>

Does anyone have any ideas why I can't get the .swf to show?

jscheuer1
06-19-2010, 04:49 PM
The path to the swf has to be correct. Also, if your swf needs other files, the paths to those must make sense from the folder in which the page with milkbox on it is located. In other words, when viewing the page with milkbox on it, you should be able to type the address of the swf into the address bar replacing everything after the final /. So if your page's address shown in the browser's address bar is:


http://www.mydomain.com/gallery/index.htm

You should be able to type:


http://www.mydomain.com/gallery/flash/demo.swf

into the address bar, hit enter, and the flash will show. If it doesn't, either the path or filename are wrong, it isn't on the server, or it needs resources it cannot find. If it does show, but will not in milkbox, then it needs resources it cannot find in the folder where your page is.

If you want more help:

Please post a link to a page on your site that contains the problematic code so we can check it out.

europe451
06-21-2010, 03:42 PM
Thanks for the reply.

I tried your suggestion but same outcome.

test1 (http://luckyflagmedia.com/portfolio_motiongraphics.html)
test2 (http://luckyflagmedia.com/portfolio/)

The only difference between these two pages is the way it is organized on the server. Though you can see that both have the same problem.

jscheuer1
06-21-2010, 04:40 PM
There is no milkbox on test1 and the Flash there either doesn't play, or it's just a black box. From the source code it looks like it might be a player without content, so a black box might be about right for it.

On test2 you have a typo:



<a href="flash/demo.swf" rel="milkbox[motion]" rev="width:480, height=:320" title="Demo of motion graphics"><img src="http://www.luckyflagmedia.com/images/portfolio/motiongraphics/thumb_demo.jpg" /></a><br />

Get rid of that = it doesn't belong and is causing an error.

There could also be other problems.

europe451
06-21-2010, 04:56 PM
test1 was a typo, there was more to the address.


However, you were absolutely correct about the type in the code. Can't believe I left that in there. I suppose it just takes a pair of fresh eyes.

The page works now, Thank you very much