Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 15-09-2009
Member
 
Join Date: Jan 2009
Posts: 124
How to Use javascript to control flash files?

Could someone please point me about how to control a flash movie with javascript. I am trying to control flash movie with javascript. I have few buttons that communicate through javascript my flash movie. I would like to change this animation ('toto.swf') for another ('tata.swf'). Same width, same height. Can I do this with a javascript function ?
Reply With Quote
  #2  
Old 15-09-2009
Member
 
Join Date: Jan 2009
Posts: 140
Re: How to Use javascript to control flash files?

You can use javascript inside a flash movie, but you cant control a flash movie with javascript when it was already published. you should probably look into using SWFAddress. SWFAddress is a library built around Flash and Javascript that allows deep linking in AJAX type applications, including Flash. if you want to have movie controls like PLAY, REW, FF, STOP, PAUSE. well, that was a simple one... put it inside the movie, edit your .fla, theres a lot of movie control buttons in the library of macromedia flash to choose from.
Reply With Quote
  #3  
Old 15-09-2009
Member
 
Join Date: Feb 2008
Posts: 102
Re: How to Use javascript to control flash files?

To better answer your specific question, look into ExternalInterface for Flash. You can basically register a listener function in Flash, then use Javascript to call that function. Instead of changing the movie with the buttons all the time I am using gif buttons that control the movie. It seems to me that this will be easier to update whenever it needs. It's not too complicated, but a bit too complicated to give you just a general solution for you.
Reply With Quote
  #4  
Old 15-09-2009
Member
 
Join Date: Dec 2008
Posts: 183
Re: How to Use javascript to control flash files?

I have not found any simple and not that expensive flash editors. It seems that for the mac I can only use macromedia, which is to expensive for me for the simple things I want to do. My guess is you got this code from Colin Moock? (guess comes from the text between the TITLE tags). The controller buttons are all standard html <form> element. The buttons are associated with JavaScript function calls. When a button is clicked, it "connects" to the Flash movie.
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "How to Use javascript to control flash files?"
Thread Thread Starter Forum Replies Last Post
Calling a JavaScript function from Flash Allison Software Development 5 08-02-2011 04:58 PM
What are Flow Control Statements in JavaScript? super soaker Software Development 4 09-02-2010 04:46 AM
JavaScript for Dropdown HTML control Dilbert Software Development 4 06-02-2010 04:32 AM
How to control browser properties with JavaScript? Cisco-s Technology & Internet 3 16-01-2010 08:39 PM
Javascript Control Bar Issue RAJalias Software Development 3 25-11-2009 01:31 PM


All times are GMT +5.5. The time now is 09:01 PM.