[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

How to call javascript

Posted on 2001-06-06
3
Medium Priority
?
167 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
[X]
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
  • 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

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 …
I have found that much of my time doing support ends up being a constant repetition of the same steps to different people.  Early on I stated using web pages with Frequently Asked Questions (FAQs) to alleviate most of the burden.  Sometimes this jus…
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.
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.

650 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