Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2009-05-06
8
Medium Priority
?
499 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
Industry Leaders: 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 2000 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

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…
The last time I worked with Flash and Socket connections was in AS1. A recent project required flash connecting to a Socket, and sending receiving information - we figured it would be easy enough - we all know about the socket policy documents and c…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
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.

715 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