User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 15

Thread: General questions about sending data to the web

  1. #1
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,310
    Mentioned
    28 Post(s)
    Tagged
    0 Thread(s)

    General questions about sending data to the web

    I am trying to send data out from a swf, but I don't know where to start. I know how to use CommandItem$ to read data from the web page a swf is embedded in, but I also need a way to send out data once a game is finished.

    Ideally, I need a way to connect to javascript. Any suggestions?

    Thanks in advance,

    Mobichan

  2. #2
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module

    Join Date
    Jun 2006
    Posts
    6,773
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: General questions about sending data to the web

    The Flash Player object can call JavaScript functions. You could also use the Get object to call a PHP script.

  3. #3
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,310
    Mentioned
    28 Post(s)
    Tagged
    0 Thread(s)

    Re: General questions about sending data to the web

    I need to send data, not receive.

  4. #4
    No Products Registered

    Join Date
    Jun 2006
    Posts
    1,630
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: General questions about sending data to the web

    I guess we'd need a "POST" object then?

  5. #5
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module

    Join Date
    Jun 2006
    Posts
    6,773
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: General questions about sending data to the web

    Just include it in the URL if it's short..

    Get myscript.php?some=data&more=data

  6. #6
    Kaytoo
    Guest

    Re: General questions about sending data to the web

    Is there an example of how the Flash Player object calls JavaScript functions anywhere? With string parameters, in particular, would be useful.

  7. #7
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,310
    Mentioned
    28 Post(s)
    Tagged
    0 Thread(s)

    Re: General questions about sending data to the web

    I am not sure of the syntax for this. Let's say I have a javascript function called "showInfo()". I am using:

    +Start of Frame
    -(FlashObj) call function "showInfo()"


    But the javascript is not returning the data from the script.

    Ideas?

  8. #8
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleSWF Export Module
    DavidN's Avatar
    Join Date
    Jun 2006
    Location
    Boston, MA, USA
    Posts
    4,044
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: General questions about sending data to the web

    The Flash Object has to have parameters added to it before the Javascript function is called, rather than passing the parameters with the call. It works something like:

    + When function on page getThings(sometext, somemoretext, evenmoretext) needs to be called
    -> Flash Object: Clear parameters
    -> Flash Object: Add string parameter "string"
    -> Flash Object: Add string parameter "belgium"
    -> Flash Object: Add string parameter "elephant"
    -> Flash Object: Call function "getThings"

    I think the () is unneeded, but I'm not sure if it actually prevents it from working.

    It may be useful to install Firebug or some other Javascript debugger, too, so that you can trace what's happening within the function or tell whether it's being called at all.

  9. #9
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,310
    Mentioned
    28 Post(s)
    Tagged
    0 Thread(s)

    Re: General questions about sending data to the web

    I think I understand how I need to setup the parameters, but I still can't get the javascript to execute. Is it possible there needs to be something initially set in the MMF file or in the HTML to make the swf communicate witht he javascript?

    I'm attaching both the HTML and the mfa. If anyone could take a look and help me decipher this problem, I would be forever in your debt.

    Mobichan
    Attached files Attached files

  10. #10
    Clickteam Clickteam
    Olivier's Avatar
    Join Date
    Jun 2006
    Posts
    3,000
    Mentioned
    9 Post(s)
    Tagged
    1 Thread(s)

    Re: General questions about sending data to the web

    Your file contains only html + swf, not mfa.

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Sending POST data with the Get object...
    By RGBreality in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 22nd December 2010, 10:31 PM
  2. Data sending optimisation
    By Felik in forum Lacewing
    Replies: 11
    Last Post: 21st March 2010, 03:59 PM
  3. sending binary data
    By Looki in forum Lacewing
    Replies: 1
    Last Post: 3rd October 2008, 11:08 PM
  4. MooSock and sending data via PHP
    By Tuna in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 10th September 2008, 05:37 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •