Results 1 to 4 of 4

Thread: How to Use javascript to control flash files?

  1. #1
    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 ?

  2. #2
    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.

  3. #3
    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.

  4. #4
    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.

Similar Threads

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

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,287,166.45263 seconds with 17 queries