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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

object.load refresh problems

Status
Not open for further replies.

ThomasJSmart

Programmer
Sep 16, 2002
634
Im having problems with flash refreshing.

i have an object called editdata

im loading vars in from an external file called vars.txt
with the vars: var1=foo&var2=bar etc.

editdata = new loadvars();
editdata.Load("vars.txt");
editdata.onload = function() {
gotoAndPlay(2);
};

on frame 2 a movieclip is duplicated with a the loaded var inside as text and a delete button.

[foo][d]
[bar][d]
etc.

if the delete button is pressed the following happens:

the duplicated new movie clips are all removed
the editdata object is deleted
vars.txt is changed, the variable is removed
the movie is sent back to frame 1

Then it goes wrong

somehow i end up on frame 2 with all the vars still ther!!! even tho they are not in vars.txt and the editobject was created anew on frame 1

any idea's whats going wrong?



I learned a bit yesterday, today i learned a lot, imagine what i'll learn tomorrow!
 
and im having the same problem with adding a var, everything goes well up untill the point where it should display the new vars list.

I learned a bit yesterday, today i learned a lot, imagine what i'll learn tomorrow!
 
just a check

to delete a duplicated clip you must use

removeMovieClip

to delete the loadvars object you must use

delete editdata

this is what you are doing ?

_______________________________________
You know you're old if you can remember when bacon, eggs and sunshine were good for you
 
yup,
that part is all working fine.

I learned a bit yesterday, today i learned a lot, imagine what i'll learn tomorrow!
 
ok...its one of those days and i am clearly missing something.

all gets deleted but the data is still there.

could try this change to frame 1

var editdata = new loadvars();

ought to force a new object each time




_______________________________________
You know you're old if you can remember when bacon, eggs and sunshine were good for you
 
its already ther, frame one has

editdata = new loadvars();
editdata.Load("vars.txt");
editdata.onload = function() {
gotoAndPlay(2);
};

on it, as frame 1 loads all the needed vars the first time the movie is opened.

its a very illogical problem, what it seems to be is that the flash swf, has memorized the vars.html after the first time it got opened and now when i want it to open the updated version it doesnt check the new version it just gets the old version out of memory or somthn.

very strange.

maybe i should program in a mari_HI//u-ana loop to mess up its memory ;-)

I learned a bit yesterday, today i learned a lot, imagine what i'll learn tomorrow!
 
i am getting closer to the problem now, bout time.

so the contents of vars.txt has changed and the new file aint being loaded

that It?

_______________________________________
You know you're old if you can remember when bacon, eggs and sunshine were good for you
 
xactly :)

I learned a bit yesterday, today i learned a lot, imagine what i'll learn tomorrow!
 
this still for the exe as i can fix with ease server side if on line ?

assuming its exe have you gone through lpflash stuff.

_______________________________________
You know you're old if you can remember when bacon, eggs and sunshine were good for you
 
i know, i had similer problem a while ago that was online and i got that working fine in the end.

this is offline and working from within the flash player.
iv bought lpflash, its a wicked piece of software :) thats what im using to write the vars to the config.ini :)

i cant find anything about refreshing a file tho.

I learned a bit yesterday, today i learned a lot, imagine what i'll learn tomorrow!
 
you bought it !!!

i took the free download once when i had a use for it. aint used it since so im not too up to date with all it can do.

however as you bought it surely they will tell you how.

when i had just the free download they always answered my emails.

their email is under support on their site



_______________________________________
You know you're old if you can remember when bacon, eggs and sunshine were good for you
 
hmm. i guess i'll try that then :)

I learned a bit yesterday, today i learned a lot, imagine what i'll learn tomorrow!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top