1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.1 Using flashvars

Discussion in 'XenForo Questions and Support' started by Micheal, Feb 28, 2012.

  1. Micheal

    Micheal Well-Known Member

    I need some help here as im making a flash file up that uses flashvars but using this {$info} within a flashvar does not work as it does not like the {}

    HTML:
    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="200" height="80" id="loaderInfoExample" align="middle">
        <param name="allowScriptAccess" value="sameDomain" />
        <param name="allowFullScreen" value="false" />
        <PARAM NAME=FlashVars VALUE="myy={$comingsoon.year}&mym={$comingsoon.month}&myd={$comingsoon.day}">
        <param name="movie" value="microcart/comingsoontimer.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#000000" />    
        <embed src="microcart/comingsoontimer.swf" FlashVars="myy={$comingsoon.year}&mym={$comingsoon.month}&myd={$comingsoon.day}" quality="high" bgcolor="#000000" width="200" height="80" name="loaderInfoExample" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
    
        </object>
    i know the code is passing the info needed but with the {} it will not work within flash.

    Any help would be great.

    Many thanks
     
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Where is that code being used? Are you working inside of the XF templates?
     
  3. Micheal

    Micheal Well-Known Member

    yes its within a template iv made within the xenfono system
     
  4. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Which template?

    I can only assume {$info} has not been made available for use in your template. The available template params are defined in the associated controller.
     
  5. Micheal

    Micheal Well-Known Member

    i have tested {$info} that the info is being passed and its being passed to the template but when flash loads it from the flashvars it loads the {} that i dont want.
     
  6. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    I must be missing something. The variable should be rendered by the template compiler, replacing the variable (and curly braces) with the value of the variable. Maybe the value is a set of empty curlies? :p

    I can look at your code if you give me FTP and admin access.
     
  7. Micheal

    Micheal Well-Known Member

    i will upload 2 examples for you here.
    one a html template with one swf and the other with the code for the XF template code that should work but does not.
     

    Attached Files:

    Felizoide likes this.
  8. Micheal

    Micheal Well-Known Member

    As you will see in the flash object you have flashvars this is where the info is being out putted and yes its working as to there.
    If i enter in a year month and day like so

    myy=2012&mym=3 and so on it will work in the flash file

    But when i try to load the info from an XF template the flashvars look like this
    myy={$comingsoon.year}&mym={$comingsoon.month} and so on

    as you see there are the {} and flash does not like these,
    so what im asking is there away to output my data without using the {} for the flashvars
     
  9. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Ok that's different. I thought the variables were being evaluated as empty curlies. But based on this description it sounds like they aren't being evaluated at all. That now sounds like the flash HTML isn't in the template system.

    What template are you working with? Does the template contain the flash HTML? Or is it being included outside of the template system somehow?
     
  10. Micheal

    Micheal Well-Known Member

    the XF Demo.zip i uploaded is the template that im using within the XF system so the flash code is within the template.
     
  11. Micheal

    Micheal Well-Known Member

    also when i view the page source from the browser its output is this

    HTML:
    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="200" height="80" id="loaderInfoExample" align="middle">
        <param name="allowScriptAccess" value="sameDomain" />
        <param name="allowFullScreen" value="false" />
        <PARAM NAME=FlashVars VALUE="myy=2012&mym=2&myd=17">
        <param name="movie" value="microcart/comingsoontimer.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#000000" />   
        <embed src="microcart/comingsoontimer.swf" FlashVars="myy=2012&mym=2&myd=17" quality="high" bgcolor="#000000" width="200" height="80" name="loaderInfoExample" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
     
        </object>
    
    as you see the {} are gone but i still think they are being outputted to the flash file
     
  12. Micheal

    Micheal Well-Known Member

    would having the flash fla file help you
     
  13. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    If that is the source code then the variables are being rendered. That part is working correctly.

    What makes you think the curlies are messing it up? Is there a different problem you are trying to explain?
     
  14. Micheal

    Micheal Well-Known Member

    heres the fla file so that you can see what i mean
     

    Attached Files:

  15. Micheal

    Micheal Well-Known Member

    if i put the flashvars as this in the XF template

    <PARAM NAME=FlashVars VALUE="myy=2012&mym=2&myd=17">

    it works

    when i put the flashvars like this

    FlashVars="myy={$comingsoon.year}&mym={$comingsoon.month}&myd={$comingsoon.day}"

    it does not work

    but both are outputting the years right.
     
  16. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    I have no experience authoring flash objects.

    What is the problem exactly? Is the flash object not loading? The problem is still poorly defined.
     
  17. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Sorry I don't know what the problem is. I can take a look if you give me a URL to the page.
     
  18. Micheal

    Micheal Well-Known Member

    ill have to make a small plugin for you as i have to goto work now and im using someone else site to make my scripts.
    So i cannot give out there details for there FTP and that.
    Ill make the plugin later and post it here for you as i need to know this as i will be making a video system for this software as well like the one i have made for vbulletin here http://www.totally-scripts.com/videoshare.php
     
  19. Micheal

    Micheal Well-Known Member

    thank you for your help but i have had to do this another way.
     

Share This Page