Results 1 to 5 of 5

Thread: Milkbox (swf)

  1. #1
    Join Date
    Apr 2010
    Posts
    58
    Thanks
    5
    Thanked 1 Time in 1 Post

    Default Milkbox (swf)

    I just found this .js script 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.

    HTML Code:
    <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>
    HTML Code:
    <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.

    HTML Code:
    <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?

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    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:

    Code:
    http://www.mydomain.com/gallery/index.htm
    You should be able to type:

    Code:
    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.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Apr 2010
    Posts
    58
    Thanks
    5
    Thanked 1 Time in 1 Post

    Default

    Thanks for the reply.

    I tried your suggestion but same outcome.

    test1
    test2

    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.

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    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:

    Code:
    <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.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  5. The Following User Says Thank You to jscheuer1 For This Useful Post:

    europe451 (06-21-2010)

  6. #5
    Join Date
    Apr 2010
    Posts
    58
    Thanks
    5
    Thanked 1 Time in 1 Post

    Default

    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

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •