?
Solved

How to call javascript

Posted on 2001-06-06
3
Medium Priority
?
169 Views
Last Modified: 2008-03-06
Hi!

I have a javascript file called "show.js"
this file create a web page with document.write instructions.
I have 3 parameters, the filename (.jpg), the background and the title.

so, when I call it from a Web page, it look like this: show("image1.jpg", "ffffff", "A beautiful picture");

Now, I want to call this script from a Flash animation.  The script is in a file called show.js

How can I call the function show in this file?  Should I include my javascript in my flash movie?

Fast help would be apreciated!
Thanks
Jav
0
Comment
Question by:javascript120497
  • 2
3 Comments
 
LVL 6

Accepted Solution

by:
Jaymol earned 900 total points
ID: 6159935
Hi.

You need to use the "GetURL" command.

Include the JS file in your HTML in the normal manner, then use this....

    GetURL('JavaScript:show("image1.jpg", "ffffff", "A beautiful picture")');

That'll do the same as running it directly from the html.

Have a look at http://www.thefade.co.uk , specifically the media page.  (It takes a while - I know :(

Click one of the photo thumbnails to view the bigger one and I think you'll see that I've done what you were trying to do.  (I included the JavaScript function in the HTML that holds the Flash - that's the only difference.)

Hope this helps,

John.
0
 

Author Comment

by:javascript120497
ID: 6160273
Great!
0
 
LVL 6

Expert Comment

by:Jaymol
ID: 6162707
Thanks mate.  Glad to help out.

John.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I know the transition can be hard. We got used to the ease of use ActionScript 2 had, but honestly, it became problematic later on, especially if designers were involved in the project and found it easy to add code as they saw fit. So, this artic…
In my long career of working as an actionscript developer, I had spent sleepless night often working hard to solve some small problems which actually took a lot of my development time; later found out the solutions to be a line or two. Here are s…
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.
Suggested Courses

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question