• 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

Micheal

Well-known member
#1
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
 

Jake Bunce

XenForo moderator
Staff member
#4
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.
 

Micheal

Well-known member
#5
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.
 

Jake Bunce

XenForo moderator
Staff member
#6
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.
 

Micheal

Well-known member
#8
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
 

Jake Bunce

XenForo moderator
Staff member
#9
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
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?
 

Micheal

Well-known member
#11
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
 

Jake Bunce

XenForo moderator
Staff member
#13
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
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?
 

Micheal

Well-known member
#15
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.
 

Jake Bunce

XenForo moderator
Staff member
#16
I have no experience authoring flash objects.

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

Micheal

Well-known member
#18
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