Solved

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

Posted on 2009-05-06
8
484 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
  • 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
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

 
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

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…
I have found that much of my time doing support ends up being a constant repetition of the same steps to different people.  Early on I stated using web pages with Frequently Asked Questions (FAQs) to alleviate most of the burden.  Sometimes this jus…
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.

813 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now