PHP User Warning: fetch_template() calls should be replaced by the vB_Template class. Template name: bbcode_highlight in ..../includes/functions.php on line 4197

PHP User Warning: fetch_template() calls should be replaced by the vB_Template class. Template name: bbcode_highlight in ..../includes/functions.php on line 4197

PHP User Warning: fetch_template() calls should be replaced by the vB_Template class. Template name: bbcode_highlight in ..../includes/functions.php on line 4197
Error #1009, PHP and I just need help - Page 2
A Flash Developer Resource Site

Page 2 of 2 FirstFirst 12
Results 21 to 38 of 38

Thread: Error #1009, PHP and I just need help

  1. #21
    Senior Member calmchess's Avatar
    Join Date
    Sep 2006
    Location
    Earth
    Posts
    2,588
    btw you want to put ?"+new Date().time on the end of your URL to keep it from caching without it you will get repeat data.
    PHP Code:
    var myRequest:URLRequest = new URLRequest("http://www.myurlhere.com/doflash.php?"+new Date().time
    ~calmchess~

  2. #22
    Member
    Join Date
    Jan 2003
    Location
    Ontario
    Posts
    59
    Thank you! I had been wondering why it kept doing that and it was driving me nuts

  3. #23
    Member
    Join Date
    Jan 2003
    Location
    Ontario
    Posts
    59
    I managed to get just about everything working but now I'm stuck with FlashVars. I need to send one variable to the SWF and then it will use the variable in the URL to communicate with PHP what it is that it needs. However, I can't for the life of me seem to get Flash to read my Flash Var. Here is the bit in my HTML code first:

    PHP Code:
    <param name="FlashVars" value="rID=75772" />
        <
    param name="movie" value="horsego8b.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" />    <embed src="horsego8b.swf" quality="high" bgcolor="#ffffff" width="550" height="400" name="horsego8" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" FlashVars="rID=75772" /> 
    I've tried several different AS3 codes that I've googled, but none have worked thus far. My latest attempt was with this:

    Actionscript Code:
    var myrid:String=LoaderInfo(this.root.loaderInfo).parameters.rID;

  4. #24
    Senior Member calmchess's Avatar
    Join Date
    Sep 2006
    Location
    Earth
    Posts
    2,588
    have you tried just plain??
    PHP Code:
     var flashVar0 root.loaderInfo.parameters.flashVarName
    ~calmchess~

  5. #25
    Senior Member calmchess's Avatar
    Join Date
    Sep 2006
    Location
    Earth
    Posts
    2,588
    also you should consider using swfObject 2.x to embed your objects.....it uses a small java script to sniff what version of flash player the user is using and if its not a version compatible with your application it prompts and allows the user to download the proper version the use of flashVars with it is also streamlined and easy to use......I can help you get setup with it if you like.
    ~calmchess~

  6. #26
    Member
    Join Date
    Jan 2003
    Location
    Ontario
    Posts
    59
    I believe I have and I just tried it again and it simply returns null. I've also triple checked to ensure everything is spelled correctly and in the proper case. I'm not sure what I'm doing wrong here.

    I'm also quite interested in that If you wouldn't mind I would really appreciate it!

  7. #27
    Senior Member calmchess's Avatar
    Join Date
    Sep 2006
    Location
    Earth
    Posts
    2,588
    this might seem a little difficult at first but believe me its well worth the effort.
    Attached Files Attached Files
    ~calmchess~

  8. #28
    Member
    Join Date
    Jan 2003
    Location
    Ontario
    Posts
    59
    Okay thanks I'll be sure to give it a try.

    Any idea as to what's going wrong with the FlashVars? This is highly frustrating lol

  9. #29
    Senior Member calmchess's Avatar
    Join Date
    Sep 2006
    Location
    Earth
    Posts
    2,588
    oh i thought you had it under control by now ......i'll set it up with a normal embed and get back to you i can't do it by memory been too long with normal embed.
    ~calmchess~

  10. #30
    Senior Member calmchess's Avatar
    Join Date
    Sep 2006
    Location
    Earth
    Posts
    2,588
    Here is the site http://www.permadi.com/tutorial/flashVars/index.html i used way back when i learned to embed flash vars and here is the quick embed code......you have to use two seperate embeds for diffrent browsers I think this is where your mistake is anyway let me know what happens


    Code:
    <OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
      codebase="http://macromedia.com/cabs/swflash.cab#version=6,0,0,0"   
      ID=flaMovie WIDTH=250 HEIGHT=250>
      <PARAM NAME=movie VALUE="flaMovie.swf">
      <PARAM NAME=FlashVars VALUE="userName=permadi&score=80">
      <PARAM NAME=quality VALUE=medium>
      <PARAM NAME=bgcolor VALUE=#99CC33>
      <EMBED src="flaMovie.swf" 
        FlashVars="userName=permadi&score=80" 
        bgcolor=#99CC33 WIDTH=250 HEIGHT=250 
        TYPE="application/x-shockwave-flash">
      </EMBED>
    </OBJECT>
    ~calmchess~

  11. #31
    Senior Member calmchess's Avatar
    Join Date
    Sep 2006
    Location
    Earth
    Posts
    2,588
    I just tested and the code i gave you is good.
    ~calmchess~

  12. #32
    Member
    Join Date
    Jan 2003
    Location
    Ontario
    Posts
    59
    Okay. I went to that URL and clicked on the section for AS3 examples. Here is the link to the HTML page:

    http://www.harnessnation.com/flash/horsego8c.html

    Here is my AS code:

    Actionscript Code:
    var myrid:int;
    var flashVars=this.loaderInfo.parameters;
    myrid=flashVars.rid;

    If I have myrid set to an int, it's 0. If I have it set to a string it's null. I don't understand what I'm doing wrong here. There's only one embed code as well from what I can see in the HTML.

  13. #33
    Member
    Join Date
    Jan 2003
    Location
    Ontario
    Posts
    59
    I've also tried copying/pasting most of the code that is available on that page, including this part, which is the first example on the AS3 page:

    Actionscript Code:
    function loaderComplete(myEvent:Event)
    {
      var flashVars=this.loaderInfo.parameters;
      userNameTextField.text=flashVars.userName;
    }

    this.loaderInfo.addEventListener(Event.COMPLETE, loaderComplete);

    And replaced the username text field section to set the myrid variable and it still returns null or 0.

  14. #34
    Senior Member calmchess's Avatar
    Join Date
    Sep 2006
    Location
    Earth
    Posts
    2,588
    here is the whole html page and the call for flashvar from flash just change the name of .swf and it will work.

    Code:
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>specURLoader</title> 
    </head>
    <body bgcolor="#ffffff">
    <!--url's used in the movie-->
    <!--text used in the movie-->
    <!-- saved from url=(0013)about:internet -->
    <OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
      codebase="http://macromedia.com/cabs/swflash.cab#version=6,0,0,0"   
      ID=flaMovie WIDTH=250 HEIGHT=250>
      <PARAM NAME=movie VALUE="specURLoader.swf">
      <PARAM NAME=FlashVars VALUE="rID=75772">
      <PARAM NAME=quality VALUE=medium>
      <PARAM NAME=bgcolor VALUE=#99CC33>
      <EMBED src="specURLoader.swf" 
        FlashVars="rID=75772" 
        bgcolor=#99CC33 WIDTH=250 HEIGHT=250 
        TYPE="application/x-shockwave-flash">
      </EMBED>
    </OBJECT>
    </body>
    </html>

    Code:
    msg1.text = root.loaderInfo.parameters.rID;
    ~calmchess~

  15. #35
    Senior Member calmchess's Avatar
    Join Date
    Sep 2006
    Location
    Earth
    Posts
    2,588
    you know put the flashVar flash code outside the oncomplete call because it might not be available when that fires.
    ~calmchess~

  16. #36
    Member
    Join Date
    Jan 2003
    Location
    Ontario
    Posts
    59
    You are absolutely amazing and a huge live saver! I can't thank you enough for all of your help! That seemed to do the trick perfectly and is working great now Thank you so much for all of your help!!!

  17. #37
    Senior Member calmchess's Avatar
    Join Date
    Sep 2006
    Location
    Earth
    Posts
    2,588
    here is something you might like to know to get around the security sandbox violation so you can test your movie that makes calls to external files such as php files do the following.


    1. browse to C:\Windows\System32\Macromed\Flash\FlashPlayerTrus t
    2. make a text file and rename it to Trust.cfg
    3. open Trust.cfg in text editor and type in the path to the folder that the .swf lives in
    C:\Users\calmchess\Desktop\flashfolder
    ~calmchess~

  18. #38
    Member
    Join Date
    Jan 2003
    Location
    Ontario
    Posts
    59
    Okay perfect, thank you

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