User Tag List

Results 1 to 7 of 7

Thread: Help? Passing Variables to flash apps

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleUnicode Add-on
    Tim's Avatar
    Join Date
    Apr 2007
    Location
    NSW - Australia
    Posts
    390
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Help? Passing Variables to flash apps

    sorry if this question has already been answered but since the new forum style, I can't seem to find it :/

    My question is simple:
    How do I pass variables to my flash app
    for example:
    appId = 1234 /or/
    autoStart = true
    etc...
    Thanks in advance

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Popcorn's Avatar
    Join Date
    Jun 2006
    Location
    Norway, Bergen
    Posts
    2,366
    Mentioned
    13 Post(s)
    Tagged
    0 Thread(s)
    If I remember correctly:

    - Make a webpage.
    - Make a javascript function that returns the appId.
    - In the game, call the function, i.e: Call "GetAppID"
    - Embed the game into the webpage.
    - Put the webpage and the game on a server.
    - Run the game from the server. It will not work running from your local computer.

  3. #3
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module

    Join Date
    Jun 2006
    Posts
    6,773
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    You could also use FlashVars. They can be retrieved with the CommandItem$ expression.

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleUnicode Add-on
    Tim's Avatar
    Join Date
    Apr 2007
    Location
    NSW - Australia
    Posts
    390
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the advice Popcorn, this does seem a little complicated for a simple task :/
    (Although I could easily do it that way)

    What I'm trying to do is shown in a HTML code snippet below

    HTML Code:
    <object type="application/x-shockwave-flash" data="flash.swf" width="375" height="64">
      <param name="quality" value="high" />
      <param name="wmode" value="opaque" />
      <param name="swfversion" value="6.0.65.0" />
      <!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
      <div>
        <h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
        <p>
          <a href="http://www.adobe.com/go/getflashplayer">
            <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" width="112" height="33" />
          </a>
        </p>
      </div>
    </object>
    From the example above, if I wanted to be able to get the value of quality in my program, is it possible? Or do I still have to reply on using javascript?

    ie: from the line:
    <param name="quality" value="high" />

    EDIT: @Jamie, Is what I stated a FlashVar?

    Thanks and Regards
    Tim Ellis

  5. #5
    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)
    The FlashVars are passed to the SWF as parameters, yes - check the help (F1) in MMF to see exactly how to use them. It's under the "Features specific to Flash development" page, or some title like that.

    If you're passing them from the query string, you can use a bit of PHP to pass them in (or use Javascript, if you don't have PHP installed and/or enjoy doing things in an unnecessarily complex way )

  6. #6
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module

    Join Date
    Jun 2006
    Posts
    6,773
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Crazy_Ivan View Post
    EDIT: @Jamie, Is what I stated a FlashVar?
    No, but nearly :-) I included a link with my previous post.

    Code:
    <param name=FlashVars value="foo=bar" />
    Code:
    CommandItem$("foo")

  7. #7
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleUnicode Add-on
    Tim's Avatar
    Join Date
    Apr 2007
    Location
    NSW - Australia
    Posts
    390
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ah, right on. Thanks Jamie
    (and everyone else :P )

Similar Threads

  1. Password System for Flash with Lots of Variables
    By redpandagames in forum SWF/Flash Export Module Version 2.0
    Replies: 6
    Last Post: 7th November 2012, 02:31 PM
  2. License for distribution of MMF Flash apps?
    By 300happy in forum SWF/Flash Export Module Version 2.0
    Replies: 3
    Last Post: 8th September 2010, 06:57 PM
  3. Passing informations into the flash file?
    By Tiles in forum SWF/Flash Export Module Version 2.0
    Replies: 12
    Last Post: 13th March 2010, 07:33 AM
  4. Pause in Flash apps
    By TechVision in forum SWF/Flash Export Module Version 2.0
    Replies: 6
    Last Post: 8th March 2010, 12:31 PM
  5. Getting variables from Flash with ActiveX
    By RaiFox in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 13th March 2007, 12:49 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
  •