Solved

loadVariables not loading on back or revisit (IE6 and Firefox)

Posted on 2009-05-06
8
489 Views
Last Modified: 2013-11-11
Hi,

When the flash loads for the first time, It loads ok.
When i click on a link, and then hit back or click on a link going back to that page the file doesnt load and the template text fromt he flash comes through.
This is evident on IE6 and Firefox. Not IE7.

I am using:
loadVariables("/flash.aspx",  this);

flash.aspx pulls content fromt he CMS into this format
&varH1=<a href="/games/megastar.aspx">Extra Chance Jackpots</a>&
&varH2=<a href="/myilnk.aspx">Wheel of Fortune</a>&
&varH2=<a href="/hello.aspx">Game 3</a>&

Is there a way to force reload on the Flash that it pulls the file each time?

Let me know if you need more info.

Thanks
loadVariables("/flash.aspx",  this);
 
flash.aspx
&varH1=<a href="/games/megastar.aspx">Extra Chance Jackpots</a>&
&varH2=<a href="/myilnk.aspx">Wheel of Fortune</a>&
&varH2=<a href="/hello.aspx">Game 3</a>&

Open in new window

0
Comment
Question by:mrduckers
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
8 Comments
 
LVL 22

Expert Comment

by:rascalpants
ID: 24326584

how is this being embedded?  what html code are you using for this...

it might be a caching issue...   try to navigate to the page and then away, and then clear yout temporary internet files, and go back to the page...

if it works, then you need to append a random variable to the SWF.

btw... what version of flash/actionscript are yo uusing?

rp / ZA
0
 

Author Comment

by:mrduckers
ID: 24330720
Hi,

When I navigate away and clear history and navigate back it always works.
Actionscript is 2

How do I append random variable?
0
 

Author Comment

by:mrduckers
ID: 24330808
I added this but still have the same effect
rn = Math.round(Math.random()*1000000);
loadVariables("/flash.aspx?reload="+rn,this);
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 22

Accepted Solution

by:
rascalpants earned 500 total points
ID: 24330816

this is how you do it with SWFObject...

<script type="text/javascript">
                        var flashvars = {};
                        var params = {};
                        var attributes = {};
                        swfobject.embedSWF("theSWF.swf?t=" + new Date().getTime(), "mySwfApp", "550", "400", "9.0.0", false, flashvars, params, attributes);
</script>



after the .swf, you put a query string and attach a random number...

in this case, it is   "theSWF.swf?t=" + new Date().getTime()


rp / ZA
0
 
LVL 22

Expert Comment

by:rascalpants
ID: 24330881
can you post all of your AS code that you use to view the values passed in...

maybe the problem is in there....

rp / ZA
0
 

Author Comment

by:mrduckers
ID: 24331382
Hi,
there is only one line of code on that frame.
If I send you alink for the file, could you have a look? What version of Flash do you use?
0
 
LVL 22

Expert Comment

by:rascalpants
ID: 24332414
you might have only one line of code on that frame, but where are you accessing the variables in the code?

I am currently using CS3, but I have all previous versions as well...  haven't gotten around to installing CS4 yet.

rp / ZA
0
 
LVL 22

Expert Comment

by:rascalpants
ID: 24436020

^ bump ^
 

please come back and finish up this question...


thanks,

rp / Zone Advisor
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This is a very simple example to help those of you who are still migrating from AS2 to AS3 understand the redesigned event model in AS3. In AS2.0, event functions (that is, the function to be performed when an event is fired) were stored as a pro…
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question