# Javascript in actionscript

**URL:** <https://forum.kirupa.com/t/javascript-in-actionscript/251370>\
**Category:** Uncategorized\
**Created:** [February 7, 2008, 8:05pm UTC](https://forum.kirupa.com/t/javascript-in-actionscript/251370 "2008-02-07T20:05:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jetsfaneh](https://avatars.discourse-cdn.com/v4/letter/j/e47774/32.png) [@jetsfaneh](https://forum.kirupa.com/u/jetsfaneh)\
**Post date:** [February 7, 2008, 8:05pm UTC](https://forum.kirupa.com/t/javascript-in-actionscript/251370/1 "2008-02-07T20:05:22Z")

</div>

Hey all. I am new here and am seeking help. I am trying to get actionscript to call a javascript function and am having some difficulty. I am setting up a photo gallery in flash and want it to call up the following script:

[http://www.dynamicdrive.com/dynamicindex4/lightbox2/index.htm](http://www.dynamicdrive.com/dynamicindex4/lightbox2/index.htm)

So in my HTML file I have this working fine using the following code:  
\<a href=“images/image-1.jpg” rel=“lightbox[roadtrip]”\>image #1\</a\>

I have the following in the head of my HTML file:  
\<script type=“text/javascript” src=“js/prototype.js”\>\</script\>  
\<script type=“text/javascript” src=“js/scriptaculous.js?load=effects”\>\</script\>  
\<script type=“text/javascript” src=“js/lightbox.js”\>\</script\>  
\<link rel=“stylesheet” href=“css/lightbox.css” type=“text/css” media=“screen” /\>

Is there a way that I can use the \<a href=“images/image-1.jpg” rel=“lightbox[roadtrip]”\>image #1\</a\> in actionscript? I have been trying really hard to figure this out and am having no luck.

I would be very appreciative if anyone could give me some assistance with this. I thank you in advance.
