Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

How to call javascript

Posted on 2001-06-06
3
159 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 300 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
how can i learn adobe flex step by step 4 116
Google Chrome pepflashplayer.dll 8 170
good online free meeting tool with record audio video feature 2 153
Flash ActionScript 6 57
This is intended to introduce all collision detection principles in flash, their strengths, weaknesses and workarounds. The main method for Collision Detection in flash is using hitTestObject. But unless you'll be pushing rectangular shapes without …
The last time I worked with Flash and Socket connections was in AS1. A recent project required flash connecting to a Socket, and sending receiving information - we figured it would be easy enough - we all know about the socket policy documents and c…
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.

856 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