473,699 Members | 2,363 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Flash return to JavaScript

43 New Member
So i got a question is it possible to do this
in my flash file is a button and when i press that button i what what flash would return to my javascript code that i pressed what button
so is it possible to do this and if it is how???
Jan 7 '09 #1
8 3454
Fary4u
273 Contributor
yes just assign javascript function in flash
it's works fine.
Jan 8 '09 #2
tader
43 New Member
and hot to do that can you write me a demo or something
Jan 8 '09 #3
Fary4u
273 Contributor
Expand|Select|Wrap|Line Numbers
  1. on (release, rollOver) 
  2. {
  3. getURL ("javascript:NewWindow.close(); void(0);");
  4.  }
  5.  
advance thing is create the function in html file & just call it on simple way.
Jan 10 '09 #4
chaarmann
785 Recognized Expert Contributor
let's say you inserted your flash with:
Expand|Select|Wrap|Line Numbers
  1.    <object id="MY_FLASH" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/s...ersion=5,0,0,0" width="402" height="190">
  2.     <param name='wmode' value='transparent'>
  3.     <param name=movie value="myFlash.swt">
  4.     <param name=quality value=high>
  5.     <embed src="myFlash.swt" quality=high pluginspage="Adobe - Adobe Flash Player" type="application/x-shockwave-flash" width="402" height="190" wmode="transparent" name="flashRedirect" swLiveConnect="true">
  6.     </embed>
  7.    </object>
  8.  
  9.  
into your html-page. Then you need to insert for example:

Expand|Select|Wrap|Line Numbers
  1. <SCRIPT language="Javascript" event=FSCommand(command,args) for=MY_FLASH>
  2.  alert("You pressed" + command);
  3. </SCRIPT>
  4.  
Jan 13 '09 #5
gopan
41 New Member
getURL is not a good way to calling javascript function

its better to use ExternalInterfa ce.call( );

Expand|Select|Wrap|Line Numbers
  1. if(ExternalInterface.available){
  2.    ExternalInterface.call("alert","This call is from flash movie!");
  3. }
  4.  
See Adobe Live Docs
Apr 23 '09 #6
NitinSawant
270 Contributor
@chaarmann

can you pls tell me how to call that FSCommand(comma nd,args) from javascript??
May 18 '09 #7
unauthorized
81 New Member
ExternalInterfa ce.addCallback( )

Look up the Adobe documentation on it.
May 20 '09 #8
NitinSawant
270 Contributor
Thanks @unauthorized

Hello tader,
you can use JavaScript and Flash Integration Kit ( http://weblogs.macromedia.com/flashjavascript/ ),

Expand|Select|Wrap|Line Numbers
  1. http://weblogs.macromedia.com/flashjavascript/
it can call javascript from flash actionscript and vice versa.

regards,
Nitin Sawant
May 20 '09 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

1
1359
by: Eric | last post by:
I have the following code I am calling from a flash file. Everything works fine except that the string it returns for the file location does not include the slashes. It is returning G:SwaneyDownloadsReadme.txt instead of G:\Swaney\Downloads\Readme.txt. Is it something in my code that is causing this, or how flash is interpreting the variable? <!-- function browse() {
6
3567
by: Cliff R. | last post by:
Hi, I use a handy little Javascript Flash detection script on a number of sites (copied below). Usually works great, but I just started trying Firefox and it's not working. A few browsers are referenced in the script so I presume that Firefox needs to be added somewhere -- does anyone know how I could update this to be supported by Firefox? Thanks! <SCRIPT TYPE="text/JavaScript">
1
1755
by: Nawed | last post by:
We are experiencing a browser freeze when implementing a large number of javascript calls. It seems that there is a random 'hiccup' which loses some data. This causes a disparity between client- and server-side information. Has anyone encountered this issue when sending information from Flash to a database via javascript calls to a webservice?
1
1984
by: Torunn | last post by:
Using javascript I'd like to run multiple istances of flash in order to watch differents video at same time. Is there anyone that can help me ? Thanks Torunn
4
2028
by: kidalex | last post by:
I'm a programmer but I have never programmed in Action Script or very advanced JavaScript. So, please be gentle :-) I'm looking to develop a simple ( or is it? ) system with 2 parts to it: Part I: I would have an invisible Flash running on the client side ( browser ) for the only sake of being able to "listen" to a Perl script on the server that'll push the information to it as it becomes available. I'd like this Flash app to be able...
1
1241
by: teenIce | last post by:
Hi, I don't know in what forum should i post this discussion. I'm trying to communicate between flash and javascript and it works. But the problem now, I have to pass a string that had e.g paragraph from flash to javascript and show them in html. The paragraph is ignored and all the text became one. What can I do? Thanks in advance
1
2398
by: skeem | last post by:
I am having issues viewing flash that has been inserted via javascript in Internet Explorer. I had to uninstall my flash about a week ago. I've since reinstalled flash and reinstalled flash player for all my browsers. All flash shows where it hasn't been inserted via javascript (ie. youtube.com) but javascript flash is not showing at all in IE. Firefox is working fine. Any help in resolving this issue for IE would be greatly appreciated. here...
0
8701
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8623
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9049
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8932
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8892
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7772
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6539
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5879
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4636
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.