Hello Michael,

You have to get the FlashVars parameters from the root.loaderInfo object. I know, I know how it feels, and I wouldn't be able to certainly tell you why it is passed through the root.loaderInfo pointer, although it /can/ be quite logical. When you get used to it, it gets logical too :)

try the following:

var flashvars:Object = LoaderInfo(root.loaderInfo).parameters;
for (var e:Object in flashVars) {
        trace("e="+e+"  flashVars[e]="+flashVars[e]);
}

hth,
Cedric


Hi list...

I'm unable to pass flashvars to a swf via swfObject(2.2). An online search hasn't turned up a solution either.

The flashvars are passed via javascript like so:

<script type="text/javascript">
var v = {};
v.titleText = "XXX Financial and Operational Progress";
swfobject.embedSWF("thing.swf", "mything", "450", "750", "9.0.28", false, v, {}, { });
</script>

Within the swf, I've declared a corresponding public variable in the document class.

public class MyClass extends Sprite{
        public var titleText:String;
        public function MyClass(){
                if(Capabilities.playerType == "External"){
                        // set defaults for the flashvars for testing purposes:
                        titleText = "YYY Financial and Operational Progress";
                }       
        }
}

What am I missing? When testing in Flash, I get the "YYY..." message, but when testing in a browser, I get nothing.

Thanks,
- Michael M.

_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to