Solved

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

Posted on 2009-05-06
8
478 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
Comment Utility

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
Comment Utility
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
Comment Utility
I added this but still have the same effect
rn = Math.round(Math.random()*1000000);
loadVariables("/flash.aspx?reload="+rn,this);
0
 
LVL 22

Accepted Solution

by:
rascalpants earned 500 total points
Comment Utility

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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 22

Expert Comment

by:rascalpants
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility

^ bump ^
 

please come back and finish up this question...


thanks,

rp / Zone Advisor
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

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…
There are times in your Flash CS4 application when you want more than a simple pointer or a hand, and it's hard to find an ideal walk-through to tell you what to do.  I spent a few days recently learning my way around making custom cursors in Flash,…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…

772 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

10 Experts available now in Live!

Get 1:1 Help Now