homepage Welcome to WebmasterWorld Guest from 50.17.134.177
register, login, search, subscribe, help, library, PubCon, announcements, recent posts, open posts,
Subscribe to WebmasterWorld

Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / Flash and Shockwave
Forum Library : Charter : Moderators: eelixduppy

Flash and Shockwave Forum

    
Using Flashvars to pass in an image file
I can replace text, but now I'd like to replace/add an image
HelenDev




msg:4021744
 4:42 pm on Nov 9, 2009 (gmt 0)

I have a flash movie with a text field which has an instance name of

theText

and I have an actions layer thus

if(root.loaderInfo.parameters["dText"] != null)
theText.text = root.loaderInfo.parameters["dText"];

and then in the html code I have

<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript">
var flashvars = {};
flashvars.dText = "here is some text";
var params = {};
params.menu = "false";
params.scale = "noscale";
var attributes = {};
swfobject.embedSWF("multiple_vars.swf", "flashDiv", "550", "400", "8.0.0", "expressInstall.swf", flashvars, params, attributes);
</script>

This all works fine. But now I also want to pass in an image file and I'm not sure how to go about it. I can put

flashvars.picFile = "my_pic%2Ejpg";

into the html, but how do I do the bit in Flash? My image doesn't seem to have an instance name the same as the text does, and should it be a straight image, or a graphic, button or movie symbol?

Any guidance would be much appreciated :)

 

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Flash and Shockwave
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
WebmasterWorld ® and PubCon ® are a Registered Trademarks of Pubcon Inc.
© Pubcon Inc. 1996-2012 all rights reserved