[Xerte] Re: event failing on second call

Julian Tenney Julian.Tenney at nottingham.ac.uk
Thu Mar 29 14:54:57 BST 2012


If you load a swf into a movieclip, you lose any custom methods / properties of that clip after the load.

So you can do

mc.someFunction = function(){ //blah  }
mc.loadMovie('some.swf', blah)

and then in some.swf's timeline call this.somefunction. It doesn't exist. Maybe I was thinking of that.

Not sure what's going with loadVars, I've never used them, but either debug things in the engine, or send me a simple example and I'll see what's happening.

From: xerte-bounces at lists.nottingham.ac.uk [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Dave Burnett
Sent: 29 March 2012 14:52
To: Xerte list
Subject: [Xerte] Re: event failing on second call

The load wipes stuff out?
Is it true for all the methods of sending/loading external data?


________________________________
From: Julian.Tenney at nottingham.ac.uk
To: xerte at lists.nottingham.ac.uk
Date: Thu, 29 Mar 2012 12:50:42 +0100
Subject: [Xerte] Re: event failing on second call
I think its like loading XML where the load wipes out methods / properties on the object.

Can you build a new icon for each load vars call?

i.e.

INT
  BUT
    TXT // a dummy loadVars
   SCR //kick off the loadvars

    INT
      EVT
        //handle the loadvars

From: xerte-bounces at lists.nottingham.ac.uk [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Dave Burnett
Sent: 29 March 2012 12:37
To: Xerte list
Subject: [Xerte] Re: event failing on second call


OK, here's the trace of 2 consecutive calls with
debug(rootIcon.loadVars);

//first call
top debug //directly under button
[type Function]
load //directly under loadVars call
[type Function]
loaded //success

//second call

top debug
onLoad=%5Btype%20Function%5D&onData=%5Btype%20Function%5D&icon=%5Flevel0%2Eengine%2EIFC
load
onLoad=%5Btype%20Function%5D&onData=%5Btype%20Function%5D&icon=%5Flevel0%2Eengine%2EIFC

What is happening to the loadVars  function?

________________________________
From: d_b_burnett at hotmail.com
To: xerte at lists.nottingham.ac.uk
Subject: event failing on second call
Date: Thu, 29 Mar 2012 06:43:54 -0400

I click a button to pop up a scrolling text window which is populated with a loadVars call to a text file.

rootIcon.loadVars('http://www.myserver.com/common/revisions.txt?nt=' + (new Date()).getTime());

followed by an Event interaction

onLoadVars
rootIcon


It works the first time, but if I click the button again, the event will not fire again.
I ran into this once before but can't remember what the issue was.


This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham.
This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation.

_______________________________________________ Xerte mailing list Xerte at lists.nottingham.ac.uk http://lists.nottingham.ac.uk/mailman/listinfo/xerte This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nottingham.ac.uk/pipermail/xerte/attachments/20120329/921290dd/attachment-0001.html>


More information about the Xerte mailing list