-
11 May 2012 8:11 AM #1
Adding my own link within Animator
Adding my own link within Animator
Hi.....I have an image within an animation which I want to put the following link in:
onMouseClick="shadowbox;height:300px;width:500px;controls=autoplay" href="video.html" title="Video Example">
So I go to ACTIONS / CUSTOM JAVASCRIPT.......and place the link in.........But I'm getting a javascript error.
Can anybody help me (I'm a bit of a noive with java script)
Thanks
-
11 May 2012 4:15 PM #2
So sounds like what you entering is not valid JS. Would you mind explaining what you are trying to accomplish?
-
12 May 2012 12:05 AM #3
Adding my own link within Anumator
Adding my own link within Anumator
When viewing the animation in my browser, I want to click on the individual images and that should open up an external html page using Shadowbox. (http://www.shadowbox-js.com/ ) (opens the html page with a requried width and height).
Hope this explains what I need.
Thanks for your help.
-
14 May 2012 4:14 PM #4
Ok, so I would try something like this. Put the following (but put in a real URL for the shadowbox js library) in the Property Panel -> Project -> Head Html
and then for a custom JS action you could add the following for exampleCode:<link rel="stylesheet" type="text/css" href="shadowbox.css"> <script type="text/javascript" src="shadowbox.js"></script> <script type="text/javascript"> Shadowbox.init({ skipSetup: true }); </script>
and you could change player to whatever you want to display. See http://www.shadowbox-js.com/usage.html for more helpCode:Shadowbox.open({ content: '<div id="welcome-msg">Welcome to my website!</div>', player: "html", title: "Welcome", height: 350, width: 350 });
-
15 May 2012 2:31 AM #5
Hi again.............yeah that is nearly working. The shadowbox opens up but my html page donesn't appear. Do you know why.........it's probably a simple soultion but I can't solve it
This is what I have on the link:
Shadowbox.open({
content: 'http://www.google.com',
player: "html",
title: "google",
height: 365,
width: 648,
autoplayMovies: true
});
Thank you for all of your help.
E
-
15 May 2012 9:43 AM #6
I don't know if you can open open html pages like that, you might have to use an iframe, like this.
if you want an image, you can use the image player like thisCode:Shadowbox.open({ content: '<iframe src="http://example.com" style="width:400px;height:400px;border-width:0;"></iframe>', player: "html", title: "Test", width: 400, height: 400 });
Code:Shadowbox.open({ content: 'path/to/image.png', player: "img", title: "Test" });
-
16 May 2012 1:22 AM #7
-
16 May 2012 9:10 AM #8
Hmm, it works fine for me. Maybe you should try the shadowbox forums?
-
23 May 2012 2:42 AM #9
I finally got it working so thanks for the help!!!
Quick question for you. Is it possible when I click to open up the shadowbox iframe.......that it pauses the image animation in my browser...............and resumes playing when I close the iframe?
Thanks for you help
Regards
E
-
23 May 2012 7:58 AM #10
It should be possible, but don't think it will be easy at the moment. You'll have to add your own JS for that and for more info you could look into the animation-play-state css property.


Reply With Quote