shadowbox from flash

70 messages Options
Embed this post
Permalink
1 2 3 4
funkdoobi

Re: shadowbox from flash

Reply Threaded More More options
Print post
Permalink
In reply to this post by rakuen
anyone able to get it to work properuly in IE from a flash file?

http://www.robbierussell.net/

my site ther.e if you load it in IE and click the thumbnails, it loads below the main content?...
funkdoobi

Re: shadowbox from flash

Reply Threaded More More options
Print post
Permalink
anyone with a solution to the box loading below the swf movie in IE? or doing a gallery?
humongous

Re: shadowbox from flash

Reply Threaded More More options
Print post
Permalink
For some reason I'm having a hard time making ShadowBox work on my own website. When my website is viewed in Flash CS3 Test video mode and I click a button all I get is a blank page in firefox and when it's viewed in html mode it doesn't work at all on firefox or IE. All I did was copy and paste the sintax that came inside of the FlashShadowbox onto my fla. and html. just to test it out and I also made a copy of the inc and images folders onto my flash website. Can somebody please help me out with this dilemma? Thank you in advance. By the way I'm using AS 2.
Pet

Re: shadowbox from flash

Reply Threaded More More options
Print post
Permalink
In reply to this post by funkdoobi
Yes:

params.wmode = "opaque";
neocorps

Re: shadowbox from flash

Reply Threaded More More options
Print post
Permalink
In reply to this post by humongous
humongous wrote:
For some reason I'm having a hard time making ShadowBox work on my own website. When my website is viewed in Flash CS3 Test video mode and I click a button all I get is a blank page in firefox and when it's viewed in html mode it doesn't work at all on firefox or IE. All I did was copy and paste the sintax that came inside of the FlashShadowbox onto my fla. and html. just to test it out and I also made a copy of the inc and images folders onto my flash website. Can somebody please help me out with this dilemma? Thank you in advance. By the way I'm using AS 2.
Have you found an answer yet?..

Could you post your AS, and you'r HTML please?..

I hope i can help
BiancaR

Re: shadowbox from flash

Reply Threaded More More options
Print post
Permalink
In reply to this post by neocorps
Hello,
Im trying to open youtube videos using shadowbox in actionscript 3.0 and i was looking at your coding where you fill in your URL and player and was wondering for youtube what player or filetype i would be using? I looked on the www.mjijackson.com/shadowbox and in the demos, they had one specifically for youtube but I couldnt find the actual coding. HELP!

~thanks
BiancaR

Re: shadowbox from flash

Reply Threaded More More options
Print post
Permalink
Also, in the coding there's a place for my URL (where i also put the file type which i think is iframe) and I was wondering, do I put the url for my website there and then the url for the youtube somewhere else? or where do I put the url for the youtube video.

Sorry i have a lot of questions... hope you can help me :)
neocorps

Re: shadowbox from flash

Reply Threaded More More options
Print post
Permalink
In reply to this post by BiancaR
Hello Bianca

  Let me see if i understand, you want to open shadowbox from flash, and what you want to open is a youtube video?

  If that is the case, i guess that the only thing you have to do, is to define the width and the height of the video and type the url that you get from youtube. on the right side above Embed (URL).

  First of all, make sure that shadowbox is working, that means, that at least when you click a link like this one:

  < a href="" rel="shadowbox" > LINK

  Shadowbox opens, even if there is nothing in the black box. if it works, then you should carry on with this.

  This is the code from mjijackson:

YouTube (if it shows like a link and not like code maybe this will help, its the same without the opening tabs <):

a rel="shadowbox;width=405;height=340" class="option" title="David Beckham" href="http://www.youtube.com/v/wbzLpteC8ng&autoplay=1">     YouTube       /a>


  To open a video in shadowbox  from flash with Actionscript 3.0 you would need:

  // ActionScript 3.0 code

  url_btn.addEventListener(MouseEvent.CLICK, shadowbox_open_url);
 
  function shadowbox_open_url(e:MouseEvent):void {
   
   ExternalInterface.call("openShadowbox",'http://http://www.youtube.com/watch?v=ucq0gmBNHrI','iframe','Youtube video', '425', '344');

  }

 
  //HTML code

  <script type="text/javascript">
               
  Shadowbox.loadSkin('classic', 'shadowbox/skin');
  Shadowbox.loadLanguage('es', 'shadowbox/lang');
  Shadowbox.loadPlayer(['flv', 'html', 'iframe', 'img', 'qt', 'swf', 'wmp'], 'shadowbox/player');
 
  var openShadowbox = function(content, player, title, width, height){
    Shadowbox.open({
        content:    content,
        player:     player,
        title:      title,
        width:    width,
        height:   height
               
    });
  };

  window.onload = Shadowbox.init;
  </script>


   I'm not entirely sure if iframe is the right player for youtube's videos, but you can try flv or html, or even swf if iframe doesn't work.

  please feel free to ask again if you can't manage to make it work!

   
 
BiancaR

Re: shadowbox from flash

Reply Threaded More More options
Print post
Permalink
hey,
For the above comment (i apologize.. i figured i could add this onto the end of this thread, since it is regarding shadowbox from flash.. my intention was not to be obtrusive.)

As for shadowbox, yup, that's exactly what I'm trying to do. I'm very new at it and from mjijackson, I downloaded the javascript file using the options that applied to my website needs. When I need to add the html coding that you posted above, do I need to have a seperate HTML file or do I add the call functions into the shadowbox-2.0.js that's from mjijackson ? I'm not sure if I'm missing a few documents (I DLed the entire package from mjijackson) or if the components to make this work are the AS3.0 coding and the coding in JS. I looked through the given js file and it doesn't have the html or script tags at the beginning/end that im supposed to put the coding after... so I'm not really sure where to find it. Ive been looking everywhere trying to understand step by step how to incorporate flash and shadowbox and am getting closer, but dont fully understand.

neocorps

Re: shadowbox from flash

Reply Threaded More More options
Print post
Permalink
You should have the entire mjijackson package uploaded to your server, and request them in the html page where your flash object is, you dont need to change any code in the shadowbox files, just add some code to your html.

For example this is what i use to have shadowbox ready for whenever i need to call it:

<!-- Shadowbox //-->
<script type="text/javascript" src="shadowbox/jquery-1.2.6.js"></script>
<script type="text/javascript" src="shadowbox/adapter/shadowbox-jquery.js"></script>
<script type="text/javascript" src="shadowbox/shadowbox.js"></script>

Then you must configure the skin, language, and player!, we use the var openShadowbox to call it from flash, that var, has the properties that you send from flash (AS3.0).

<script type="text/javascript">
               
Shadowbox.loadSkin('classic', 'shadowbox/skin');
Shadowbox.loadLanguage('es', 'shadowbox/lang');
Shadowbox.loadPlayer(['flv', 'html', 'iframe', 'img', 'qt', 'swf', 'wmp'], 'shadowbox/player');
 
var openShadowbox = function(content, player, title, width, height){
    Shadowbox.open({
        content:    content,
        player:     player,
        title:      title,
                width: width,
                height: height
               
    });
};

window.onload = Shadowbox.init;
        </script>
<!-- End of shadobox //-->

Of course your code might be different depending on where your shadowbox files are.

As for the actionscript, you don't need to install anything, the only thing that you need is to send a call to "openShadowbox" with the properties that you need so that shadowbox understands that you are calling it, and what type of player should be used to open the url or file that you request.

and that is done with the code i sent you before.

So just to get things clear, your html should be like:

<html>
<head>
<title>Your title</title>

<script type="text/javascript" src="shadowbox/jquery-1.2.6.js"></script>
<script type="text/javascript" src="shadowbox/adapter/shadowbox-jquery.js"></script>
<script type="text/javascript" src="shadowbox/shadowbox.js"></script>
<script type="text/javascript">
               
Shadowbox.loadSkin('classic', 'shadowbox/skin');
Shadowbox.loadLanguage('es', 'shadowbox/lang');
Shadowbox.loadPlayer(['flv', 'html', 'iframe', 'img', 'qt', 'swf', 'wmp'], 'shadowbox/player');
 
var openShadowbox = function(content, player, title, width, height){
    Shadowbox.open({
        content:    content,
        player:     player,
        title:      title,
                width: width,
                height: height
               
    });
};

window.onload = Shadowbox.init;
        </script>

</head>
<body>
        your flash here.
</body>
</html>


And your AS in the button of your flash movie should be like this:

  url_btn.addEventListener(MouseEvent.CLICK, shadowbox_open_url);
 
  function shadowbox_open_url(e:MouseEvent):void {
   
   ExternalInterface.call("openShadowbox",'http://http://www.youtube.com/watch?v=ucq0gmBNHrI','iframe','Youtube video', '425', '344');

  }

Where url_btn is the instance of the button or movieclip you are using.

and that would be it.
build

Re: shadowbox from flash

Reply Threaded More More options
Print post
Permalink
G'day Neo,
Both of you have mangled this thread.

Also if you care about the users of your pages do *not* use all players unnecessarily!
Use the download page to 'build' a compressed js file.
This also keeps your html code minimised and neat.
see:
http://www.web.build.id.au/shadowbox/#fastsetup
and
http://www.web.build.id.au/shadowbox/howto.html

build
BiancaR

Re: shadowbox from flash

Reply Threaded More More options
Print post
Permalink
In reply to this post by neocorps
ohh alright.
I think I understand it all now.
Only, my flash object isn't in an HTML file, (i dont think). I'm building my website entirely from flash (its not published yet) so all my coding is in actionscript and as of now there isnt any in HTML. Do I need to make a seperate HTML file for the coding you posted above and then call that in AS? Or... is there another place to put it or another way. Thanks for all your help thus far - i'm really getting a better grasp on this.


build - thanks for the advise i'll look into it
neocorps

Re: shadowbox from flash

Reply Threaded More More options
Print post
Permalink
You will need to create an html to publish your website in internet, that's for sure.

Flash does that automatically when you select publish html, it codes everything so that the flash can be displayed, you will need to add the code i told you before to your html, to be able to use shadowbox in that page with that flash object.

please check this page:

http://clientes.neocorps.com/pulula/

the first link on the left, opens shadowbox, check the code of the page and how flash its embeded, i hope this helps you understand completly.

Build - Thanx for the info, i didn't know that i could use the download to compile a js file with all that i need in just one file.

build

Re: shadowbox from flash

Reply Threaded More More options
Print post
Permalink
Yes, and you'll save yourself and your users a lot of bandwidth.
Also you won't need Shadowbox.loadLanguage or Shadowbox.loadPlayer.

Also, BiancaR if you publish your page and post a link we can see if there are potential problems. You should know that flash will limit your audience as quite a chunk of users do not have the plugins.

beers,
build
neocorps

Re: shadowbox from flash

Reply Threaded More More options
Print post
Permalink
Thanx, i was having trouble with the bug that comes when you click a link before the page is fully loaded, i checked a thread about that, and i will implement your solution in a web page that I'm about to publish.
build

Re: shadowbox from flash

Reply Threaded More More options
Print post
Permalink
In reply to this post by BiancaR
G'day Bianca,
It would be a good idea to edit the first post and add the word "flash" so folk searching later on can find the thread.

If you are planning on coding web pages may I suggest you use the firefox browser with the Firebug plugin. Then when you want to see the code behind a page use "Ctrl + u" that will open the source in a new window. Then to find a specific bit of code press "Ctrl + f" and type the name in your case "youtube" you'll be taken to that text and it will be highlighted.

Further, with the Firebug plugin you will be able to easily see errors on your page. In the bottom right hand corner click the green icon (no errors) or the red icon (has errors). You'll also find Firebug in the tools menu. The 'net' > 'flash' tabs may be of interest to you. The rest should be self explanatory, if not go to http://getfirebug.com/

beers,
build
BiancaR

Re: shadowbox from flash

Reply Threaded More More options
Print post
Permalink
thank you both sooo much for your help. I understand how to do this now :) im going to look further into the firebug and hopefully everything runs smoothly from here on out.

thanks again

build

Re: shadowbox from flash

Reply Threaded More More options
Print post
Permalink
In reply to this post by neocorps
Neo,
That is only one solution, there are others ... I liked that one.
There is a thread on this forum about that issue. Try searching "click before page loads" also there are many many solutions to be found through google.

beers,
build
BiancaR

Re: shadowbox from flash

Reply Threaded More More options
Print post
Permalink
Hello Neocorps,
I added the html coding and the AS coding that you posted for me earlier. Where in the html do it put the link (does this a href link the shadowbox to the flash?) earlier you posted this < a href="" rel="shadowbox" > LINK. is this the same link that my flash button is linking to shadow box?

ugh guess im still a little confused. Sorry, hopefully this post made a little sense...
BiancaR

Re: shadowbox from flash

Reply Threaded More More options
Print post
Permalink
here's my coding so you can see. I test published it and the webpage comes up but the flash object button doesnt do anything when i click on it.

//html coding//

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <script type="text/javascript" src="prototype.js"></script>
<script type="text/javascript" src="shadowbox-prototype.js"></script>
<script type="text/javascript" src="shadowbox.js"></script>

 
  <script type="text/javascript">
               
  Shadowbox.loadSkin('classic', 'shadowbox/skin');
  Shadowbox.loadLanguage('es', 'shadowbox/lang');
  Shadowbox.loadPlayer(['flv', 'html', 'iframe', 'img', 'qt', 'swf', 'wmp'], 'shadowbox/player');
 
  var openShadowbox = function(content, player, title, width, height){
    Shadowbox.open({
        content:    content,
        player:     player,
        title:      John Legend Performance "Slow Dance" w/Allen Arthur,
        width:    "425" ,
        height:   "344"t
               
    });
  };
 
    window.onload = Shadowbox.init;
  </script>

//i dont know where in this i put the a rel or a href//

//AS3.0 coding//

  johnBtn.addEventListener(MouseEvent.CLICK, shadowbox_open_url);
 
  function shadowbox_open_url(e:MouseEvent):void {
   
   ExternalInterface.call("openShadowbox",'"http://www.youtube.com/v/YYhGmDfiscU&hl=en&fs=1"','iframe','John Legend Performance "Slow Dance" w/Allen Arthur', '425', '344');
  }
1 2 3 4