A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Small Script Question

  1. #1
    Junior Member
    Join Date
    Dec 2004

    Small Script Question

    I have no idea where to start on scripting so I'll ask this question.

    I would like to pass a variable to a SWF file through the URL as in www.something.com/hi.swf?var=1

    Ok, actually what I meant was to change the HTML embed code to point at a swf file and pass along a variable


    Then, based on the value of this variable perform an action.

    I am certain that this would be possible but again don't know where to start. Where would I go to understand the scripting that 3dfa uses.

    Last edited by dbeard; 01-12-2005 at 07:33 PM.

  2. #2
    KoolMoves Moderator blanius's Avatar
    Join Date
    Jul 2001
    Atlanta GA
    if you do that you will have a variable in 3dfa called var that is equal to 1

    in a looping script (i.e. place it as an element not event)

    if (var==1){
    do something;
    var=0//do this so it doesn't keep doing it.

  3. #3
    Junior Member
    Join Date
    Dec 2004
    For future information....

    If I am interesting in scripting in 3dfa then books on actionscript apply? Since actionscript is the language for swf it makes sense but I read in other responses that 3dfa uses some other type of scripting.

    OK, my HTml is:

    <object classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000"
    id="header" width=480 height=80>
    <param name=movie value="header.swf">
    <param name=quality value=autolow>
    <param name=bgcolor value=#F0EBCA>
    <param name=wmode value=window>
    <param name=menu value=false>
    <embed src="header.swf" quality=autolow bgcolor=#F0EBCA
    width=480 height=80 wmode=window menu=false type="application/x-shockwave-flash"

    *****************html *************************

    Looking at the script, I think that I can effect this by inserting the following:
    <param name=var value=1>



    <embed src="header.swf?var=1" quality=autolow etc.

    Would either of these work to assign the variable?

    I assume that you change the state of your variable since movies can loop and would presumably restart any scripted events.


  4. #4
    KoolMoves Moderator blanius's Avatar
    Join Date
    Jul 2001
    Atlanta GA
    You got it! Better to use the ?var= method , it's more reliable.

    Make sure you have <object> and <embed> tags and put it in both.

    3dfa Script is Nearly Actionscript. An Action script book is more likely to confuse than to help I'm afraid.

  5. #5
    Senior Member kusco's Avatar
    Join Date
    Nov 2001

    My two cents worth

    Hello dbeard and Blanius,

    You're probably using 'var' as an example to indicate a variable name but....avoid using a variable name of 'var' in your scripts as this is used to define a local variable within a function.

    That's my 5 cents worth (yes, inflation increased as I was typing this up)
    (3DFA Support Team)

Posting Permissions

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

Click Here to Expand Forum to Full Width

HTML5 Development Center