Could you please supply a bit more information about what you have tried, and how it "didn't work", otherwise it's a bit difficult to determine where you've gone astray!
Combine literacy with curiosity and a whole world of information opens up to you
function buttonfunction(e:MouseEvent):void {
ExternalInterface.call("openShadowbox",'yourURL','thePlayer','Title');
}
where:
button_btn, is the instance of the button with which i want to open shadowbox
buttonfunction, is the name of the new function im creating for the MouseEvent CLICK (here you can have MOUSE_OVER, and stuff like that).
thePlayer, is what you want to open 'iframe' 'img' 'swf' etc..
----------------------------------------------------------
For AS2.0 it would be like this:
Its important that every flash you create you add the flash coding i give you, because it wont work if you dont use it. its also important to have the flashobject.js,and if you have more than one flash movie, you just add a number besides flashcontent, like so:
im uploading the flashobject.js file for you, because is very important that you have it, im also uploading a .rar file that i used when having your problem it helped me figure out how to do it.
I locate my flash in the same folder as your sample html, used your html, added the test swf.
Your base.swf and my test.swf both load in the html. Your flash works, but when I click on mine, it does nothing...
I tried with getURL, but not working either.
I can't open your FLA file to see what I'm doing wrong, because I'm still using FLASH8.
I must be missing something in the action, though I don't see any error message.
After I posted this question originally, I gave up and used Lightbox++ to make the same effects since it was only jpg image to load. However, I really would like to use the Shadowbox because it allows me to open more than just image.
After I poster the HTML, I realized I mixed up using which html.
So, here is what I have now. There are according to your html code posted here.
I still can't get it work...
I included text link in html which is working, but link from swf is not.
Thank you for your help.
go to the flash animation at the bottom, and click one of the left buttons, and then click on one of the orange links.. it will open shadowbox.
check the source code, so that you can see the difference betwen your code and mine.
for what i can tell, is that you have my code mixed with the code from the shadowbox.rar archive that i sent to you.
if you change myMovie.addparam to so.addparam, it will access to the js/swfobject2/swfobject.js file you got.. because my code uses a js/flashobject.swf file, and instead of using so.addparam, uses myMovie.addparam.
I guess that that should work.. if it doesnt, just change that swfobject.js to my flashobject.swf.
That's the only solution i can come up with without you sending me your swf and your html page and trying to make it work.
sorry if this doesn't help you.. but if you're willing to spend a little more time with this, you could send me a link to download your documents and try to fix it.
Thank you for posting the link of your work. I see it works perfectly.
I tried your method but couldn't make it work...
However, I'm finally able to make it work with the other html.
It now works with swfobject2 which I use.
Thanks again your help. You encouraged me to search what was wrong, and eventually it worked!
Since this was a big mistery to me, I'm posting the html and actionscript that works for me.
I had a tough time with this one too, that's why i wanted to post my solution here, cuz there's probably more people out there who has the same problem, and there's hardly any concrete solutions.
Good to hear that my tutorial helped you, no im sorry i really dont know how to do an image gallery, i have not been in the position to need that from shadowbox.
i was searching in this forum and i found this, maybe you can ask there how can it be done!.
- In my Body HTML i call the first image by the id="gallery" with rel="shadowbox[...]"
and the second one with an id="gallery1", third one id="gallery2" ............
I'm happy caus i'm a newb :)
I tried with an iframe but i understand nothing at all :)
Im a little confused with what you said about the HTML
Matz wrote:
- In my Body HTML i call the first image by the id="gallery" with rel="shadowbox[...]"
and the second one with an id="gallery1", third one id="gallery2" ............
But i'll give it a try later and if i get it to work well i'll add that to my flash_shadowbox tutorial!.