Solved

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

Posted on 2009-05-06
8
494 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
SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

 
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

Enroll in July's Course of the Month

July's Course of the Month is now available! Enroll to learn HTML5 and prepare for certification. It's free for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

This is intended to introduce all collision detection principles in flash, their strengths, weaknesses and workarounds. The main method for Collision Detection in flash is using hitTestObject. But unless you'll be pushing rectangular shapes without …
Sometimes you know that one object has a specific child in it, but you can't find the child. This happened to me when I was trying to code some actionScript to make a toolbar work with its embedded buttons.  My partner had created the toolbar usi…
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.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

636 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