Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

newbie - movie refresh

Status
Not open for further replies.

joezapp

Programmer
Feb 26, 2001
63
GB
Sorry - I may well be being dense but... - I have Generator installed on solaris. I am generating a line chart offline with two text files holding the data for two lines. I have an html document with the 'updated' .swf movie being called (via LoadMovie) from within a parent movie.

The way I understand it - when I update the data files (change the line color and alter the data itself) and then regenerate the .swf (using "/generator/generate filename.swt -swf filename.swf" - via a cgi script) I would have thought that when viewing the html file through a browser, the embedded movie would be updated accordingly.

This doesn't seem to be happening - the html file and the movies remain unchanged on browser refresh no matter what alterations I make to the data files and how many times I regenerate the .swf file.

Am I missing something major / misunderstanding the nature of offline publishing ? If not does anyone have any ideas about what I could be doing wrong / is likely to be the cause (baring in mind that I've only been using Flash and Generator for a week - my background has been PL/SQL, javascript, dhtml, html, perl and cgi).

Many thanks,

Joe. :)
 
Never used Generator... Nor am I an expert with cgi!
But seems to me, logically, that if you're not regenerating the html, it wouldn't change! My guess, and I could be way off here, is that if you regenerate your swf with the same name held in the html, it should work, without having to change that html.

;-)
 
Another thing you can check:
Using Refresh only usually calls back the link in the cache. You should use Shift Refresh to really skip the cached file.
Also try calling the .swf on it's own (in the address bar) to see if your movie has really been regenerated.

;-)
 
I might be being dense here (it's been known!) but if you are holding the data for the movie in text files, then when you update the text files you shouldn't need to regenerate the movie, should you? That's the whole point of storing variables in a file... Just, as oldnewbie says, a refresh on the browser should be needed.

=)

PetitPal.
 
that was quick ! Having never even looked at flash or generator before last week its a steep learning curve - basically as far as i understand it when you generate a movie file offline it just looks at the data sources and republishes with the amended criteria. Basically the same as if you published after editing within Flash (or am I missing something?)

This seems to be working - if I cut the data files down the movie size changes accordingly. The problem seems to be that the html isn't refreshing / recognising this new .swf (I have put it into a parent movie to prevent the user having to refresh the browser as all it does is loop around playing the 'dynamic' movie; Frame 1 - loadMovie, Frame 120 - goto frame1 etc)

The name stays the same within the html file, I am publishing an altered version with the same name, in the same place. it just won't change and the embedded movie. aarghh.

I am rapidly climbing the walls - but don't know if it is some newbie error and I'm missing something obvious...


Joe :-(
 
also - the reason I'm using generator is that they have the chart templates which make my life a whole lot easier. The (4) data files hold the chart's 4 line's colors, _x values, _y values, labels et al.

It may be that I'm just being very lazy and I could use Flash only to create line graphs - if you've got any pointers or believe I'd be better or using just Flash then fire away,

Cheers and many thanks

Joe :)
 
So I get it, you're now saying the swf is actually updated!
Maybe the problem lies with the use of that parent movie thing. Can you test it without the parent movie to see if it would work? If it did, and it should if the name of the swf is not changed, this would then point to a problem with the use of a parent movie!

;-)
 
Thanks for the replys guys...

I've scrapped the parent movie for the time being.

(Deep breath) - I know the 'dynamic' movie is being updated. If I cut down the data files the size changes accordingly. If I open a completely new browser window the new changes are displayed. If I clear the internet history files (I'm testing using IE5) the new version displays.

However, if I just hit refresh on the browser window the movie doesn't change. If I go to another page and then return the old file still displays.

I understand this is due to the browser caching the movie.
What I'd like is to provide a refresh button or for the user to return later and see the new version. Obviously its not on to expect users to clear their history / set their cache to 0 every time they log on.

The html file looks something like (I've included all the tags and methods I've used):

<HTML>
<HEAD>
<TITLE>scattergraphonly</TITLE>
<META http-equiv=&quot;expires&quot; content=&quot;0&quot;>
<META http-equiv=&quot;cache-Control&quot; content=&quot;no-cache&quot;>
<META HTTP-EQUIV=&quot;Pragma&quot; CONTENT=&quot;no-cache&quot;>
</HEAD>
<BODY bgcolor=&quot;#FFFFFF&quot;>
<!-- URL's used in the movie-->
<!-- text used in the movie-->
<OBJECT classid=&quot;clsid:D27CDB6E-AE6D-11cf-96B8-444553540000&quot;
codebase=&quot; WIDTH=550 HEIGHT=400><PARAM NAME=movie VALUE=&quot;scattergraphonly.swf?1&quot;> <PARAM NAME=loop VALUE=false> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#FFFFFF> <EMBED src=&quot;scattergraphonly.swf?1&quot; loop=false quality=high bgcolor=#FFFFFF WIDTH=550 HEIGHT=400 TYPE=&quot;application/x-shockwave-flash&quot; PLUGINSPAGE=&quot;</OBJECT>
</BODY>
</HTML>

I've tried all possible permutations of <META> tags in an attempt to prevent browser caching but to no avail. The Macromedia site says to add the ?1 to the end of the movie name.

Am I being really dumb and missing something ? is there a way or forcing the browser to pull a new version from the server every time the page is visited / refreshed ? Is it going to be a browser cache problem (apache on solaris) ?
Is there any way to do this at all ?

As you might of guessed it is driving me even further up the wall.

Cheers,

Joe.
 
Well. One way I've just discovered to refresh the movie is to goto IE Tools/Internet options/Temporary File Settings and check the Look for New Versions of the page to 'Always' - I think the default is 'Automatically'.

However given that the intranet I'm currently developing for has 100+ users going round and changing their internet options isn't really very viable. I'd still have thought that you could manipulate the html or swf file to do this without changing a pc or sunstations settings.

But then again I don't know a great deal about Flash...

Cheers

A slightly less frustrated Joe :) :)
 
Thanks.

I've tried all the methods outlined by Macromedia previously - the META tags (&quot;pragma&quot;,&quot;expires&quot; etc) are pretty useless and the WW3 recommendation is that these shouldn't be used as the interbrowser support is pretty inconsistent. The third method - adding a &quot;?1&quot; (or other number) to the .html address and linking between pages - I'm giving some more investigation but it doesn't look too hopeful.

I think it'll have to be something changed in the web server (I think apache have some sort of expires module that sets the html header...)

Oh well. Back to the drawing board.

Thanks all for your suggestions.

Cheers,

Joe.


 
For what it's worth, I've always used:

Code:
<META HTTP-EQUIV=&quot;Expires&quot; CONTENT=&quot;Mon, 04 Dec 1999 21:29:02 GMT&quot;>

I'm in the pinkzeppelin website usually at least once a day, and considering all the files are on my PC too, it still loads in a freash copy every time.

dave dave@pinkzeppelin.com

^^^^^^^^^^^^^^^^^^^^^
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top