Closed (fixed)
Project:
Flash Node
Version:
6.x-1.1
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
10 Aug 2008 at 14:12 UTC
Updated:
21 Sep 2008 at 21:42 UTC
Jump to comment: Most recent file
Comments
Comment #1
vm commentedI believe its "autoPlay=true"
Comment #2
TimAlsop commentedI just tried using
autoPlay=truein the Flashvars field in Advanced flash node options and the movie does not play. The only way I can make it play is to change the option in SWF Tools, but then ALL movies on my site will autoplay, which is not what I want to do.Any other ideas ?
Comment #3
vm commenteddid you view the source to insure that the flashvar is being sent ?
Comment #4
TimAlsop commentedNo I didn't but I have just now and it shows:
As you can see the SWF Tools options are included, but flashvars are empty.
Comment #5
TimAlsop commentedI just disabled SWF Tools so that Flash Node will be able to control how the movie is played on its own. Now, the movie is played automatically because there is no way to specify that I want movies to normally be loaded and not played. I therefore tried to configure Flashvars to stop the autoPlay, e.g. using
autoPlay=false. This didn't work either because the movie still plays when loaded :-( I checked the HTML source and found:I think it might be useful to get this working without any SWF Tools involvement, and then I can find out of the same works when SWF Tools is re-enabled. Can somebody help me fix the flashvars ?
Comment #6
vm commented<param name=flashvars value="autoPlay=false" />I believe is the correct syntax.Comment #7
TimAlsop commentedAre you suggesting that I need to change the Flash Node code so that it does not put " around the flashvars, and therefore uses
name=flashvarsinstead ofname="flashvars"? If so, do you know where I can find the code which does this ?Comment #8
vm commentedmy resource = http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_16417
where there are no " " surrounding flashvars as a param
Comment #9
TimAlsop commentedI tried with a different swf movie that was created by somebody else, just in case this was not working because of something in the swf file. When I load the page the movie plays and I have specified autoplay=0 and I also tried autoplay=false and autoPlay=false. None of them stop the movie playing when it loads :-(
Here is the html:
Am I the only person getting this problem ? If so, what I am I doing differently to others ?
Comment #10
Stuart Greenfield commentedThere is a difference between flash vars and parameters. Flash vars are sent as a string to the movie when it plays, and these variables are used internally by the ActionScript code in the movie.
Parameters control how the movie should be rendered by the flash player. The parameter to control playback is
play(per http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_12701), and this can betrueorfalse.Using
autoPlay=trueas a flash var is specific to videos from things like YouTube, but that's because the player specifically supports that as a "internal" parameter. So when you pass the flash vars you are not telling the flash engine to autoplay, you are telling the internal code of the movie player.Looking at your file paths you are using your own swf file, so you need to use the parameter form, not the flash vars form, to control whether playback is automatic or not.
In terms of flash node note the current release (flash node 6.x-1.1) doesn't support SWF Tools 6 (yet!) because at the time of writing SWF Tools 6.x isn't available. There is a development version of SWF Tools - if you use this with flash node 6.x-1.1 then it will probably render the file ok, but things like flash vars won't get passed (as you've experienced). This is due to a change in the way the interal
swf()function works in SWF Tools.If you really want to use flash node with SWF Tools under Drupal 6 you can try the HEAD version of flash node as that is the current code that is (or should be !) compatible.
However, in any case flash node doesn't support customising the parameters associated with a flash node - it can generate a flash vars string, but that's it. There was a feature request a while ago as someone wanted to over-ride the
bgcolorparameter. I'll probably implement this at some point but at the moment I'm not sure when as my current focus is getting SWF Tools to Drupal 6, and making sure flash node works with it!SWF Tools allows you to set autoplay at a global level (either everything autoplays, or nothings does). You can over-ride this on a case by case basis if you use, for example, the SWF Tools filter. You could enable the filter, and then write
<swf file="bigtopr.swf" play="false">.Hope this helps!
Comment #11
TimAlsop commentedStuart,
Thankyou for the very helpful response. I will do some more tests using the feedback you have provided and let you know if I need any more help - probably tomorrow.
Thanks again,
Tim
Comment #12
TimAlsop commentedI am using the 6.x-1.x-dev version of SWF Tools, and it seems like it is working with Flash Node (as you suggested it would). I have also been able to use the
<swf file="bigtopr.swf" play="false">syntax that you suggested to embed movies which I don't want to start automatically, and when I do want them to start automatically I either useplay="true"or use Flash Node content which takes the default configured in SWF Tools.I look forward to the future versions of both modules with extra functionality - looks like I can continue with my testing with the current versions though.
Thankyou for your great support, and for some very useful modules.
Comment #13
Stuart Greenfield commentedOK - I decided to add the parameter capability to flash node tonight, and I just uploaded a new version of flash node 6 to HEAD. If you use HEAD (and run flash node update 6001 if you already installed an earlier version 6 either from HEAD or from the official release), and then run this in conjunction with the 6.x-1.x-dev version of SWF Tools, then you can pass an arbitrary string of parameters by putting something like
menu=true allowfullscreen=false play=falsein the Parameters field under Advanced flash node options.I tested it a bit tonight and it seems fine - I was able to switch menus etc on and off at will!
Comment #14
TimAlsop commentedStuart,
I couldn't find a zip/tar of the HEAD version so I downloaded each file one at a time from CVS, installed, ran the 6001 update and it works as you suggested. Thankyou again for the great support, and thankyou for making this change quicker than expected. It is very useful.
Regards,
Tim
Comment #15
Goldcap commentedJust fixed flashnode passing parameters to swftools, noting that swftools was expecting an array of "options" in the swf() function, whereas flashnode was passing a set of parameters. I wrapped the parameters into an appropriate array, and swftools now gets flashvars, options, etc...
Diff attatched, but the specific lines:
flashnode line 1017-1018:
// Get HTML from SWF Tools
$output .= swf($flashnode['filepath'], array("params"=>$params, "flashvars"=>$flashnode['flashvars'], "othervars"=>$options, "methods"=>SWFDEFAULT, "autoplay"=>0));
Comment #16
Stuart Greenfield commented@Goldcap
Thanks for the patch, but this actually duplicates code that has just been released from HEAD. SWF Tools does indeed change to an array rather than a string of parameters, but this functionality was already in flash node HEAD.
As SWF Tools 6 is now official I've made the new release of flash node official (6.x-2.0), and that does exactly what you outline above.
Thanks again in any case!
Stuart
I think this thread is now fixed? But open again if required!
Comment #17
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.