<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,3 +1,5 @@
+* Change Effect.Base#render not to use eval(), so certain JavaScript runtime environments (like Adobe AIR) that do not support eval() work.  [King Maxemilian, John-David Dalton]
+
 * Fixed a calculation error in Effect.Transitions.pulse that could lead to flickering, add easing and change it to be a normal 0 to 1 transition that can be used with any effects; Effect.Pulsate now uses its own implementation.  [Thomas Fuchs]
 
 * Fixed Effect.ScrollTo. Changeset 8686 had a typo, document.viewport.getScrollOffsets[0] is always undefined. Removed the max check as it is not a cross-browser way to get scroll height and breaks the effect. Depending on scrollTo to do the right thing.  Closes #11306.  [Nick Stakenburg]</diff>
      <filename>CHANGELOG</filename>
    </modified>
    <modified>
      <diff>@@ -244,18 +244,30 @@ Effect.Base = Class.create({
     this.totalTime    = this.finishOn-this.startOn;
     this.totalFrames  = this.options.fps*this.options.duration;
     
-    eval('this.render = function(pos){ '+
-      'if (this.state==&quot;idle&quot;){this.state=&quot;running&quot;;'+
-      codeForEvent(this.options,'beforeSetup')+
-      (this.setup ? 'this.setup();':'')+ 
-      codeForEvent(this.options,'afterSetup')+
-      '};if (this.state==&quot;running&quot;){'+
-      'pos=this.options.transition(pos)*'+this.fromToDelta+'+'+this.options.from+';'+
-      'this.position=pos;'+
-      codeForEvent(this.options,'beforeUpdate')+
-      (this.update ? 'this.update(pos);':'')+
-      codeForEvent(this.options,'afterUpdate')+
-      '}}');
+    this.render = (function() {
+      function dispatch(effect, eventName) {
+        if (effect.options[eventName + 'Internal'])
+          effect.options[eventName + 'Internal'](effect);
+        if (effect.options[eventName])
+          effect.options[eventName](effect);
+      }
+
+      return function(pos) {
+        if (this.state === &quot;idle&quot;) {
+          this.state = &quot;running&quot;;
+          dispatch(this, 'beforeSetup');
+          if (this.setup) this.setup();
+          dispatch(this, 'afterSetup');
+        }
+        if (this.state === &quot;running&quot;) {
+          pos = (this.options.transition(pos) * this.fromToDelta) + this.options.from;
+          this.position = pos;
+          dispatch(this, 'beforeUpdate');
+          if (this.update) this.update(pos);
+          dispatch(this, 'afterUpdate');
+        }
+      }
+    })();
     
     this.event('beforeStart');
     if (!this.options.sync)</diff>
      <filename>src/effects.js</filename>
    </modified>
    <modified>
      <diff>@@ -37,7 +37,10 @@
 &lt;div id=&quot;d5&quot; style=&quot;width:100px;height:100px;background-color:#dde;&quot; onclick=&quot;Effect.Puff(this)&quot;&gt;
   click to test puff
 &lt;/div&gt;
-&lt;a href=&quot;#&quot; onclick=&quot;Element.show('d5'); return false;&quot;&gt;show puff div again&lt;/a&gt;
+&lt;p&gt;
+  update callbacks: &lt;span id=&quot;d5_after&quot;&gt;(waiting)&lt;/span&gt; -- &lt;span id=&quot;d5_before&quot;&gt;(waiting)&lt;/span&gt;
+&lt;/p&gt;
+&lt;a href=&quot;#&quot; onclick=&quot;$('d5').appear({beforeUpdate:before,afterUpdate:after}); return false;&quot;&gt;show puff div again&lt;/a&gt;
 
 &lt;a href=&quot;#&quot; onclick=&quot;Effect.Appear('d6')&quot;&gt;test appear&lt;/a&gt;
 &lt;div id=&quot;d6&quot; style=&quot;width:100px;height:100px;background-color:#dde;display:none&quot;&gt;
@@ -60,6 +63,10 @@
   new Effect.Highlight(&quot;d2&quot;,{startcolor:&quot;#000000&quot;});
   new Effect.Grow(&quot;d3&quot;,{duration:5.0,direction: 'bottom-right',opacityTransition:Effect.Transitions.linear});
   new Effect.BlindDown(&quot;d1&quot;);
+  
+  var afterUpdates = 0, beforeUpdates = 0;
+  function after(){ afterUpdates++; $('d5_after').update(afterUpdates); }
+  function before(){ beforeUpdates--; $('d5_before').update(beforeUpdates); }
 // ]]&gt;
 &lt;/script&gt;    
 </diff>
      <filename>test/functional/effects_test.html</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>b352e2b5c05a0a0642cc05cb896780cd5ca01f3e</id>
    </parent>
  </parents>
  <author>
    <name>Thomas Fuchs</name>
    <email>thomas@fesch.at</email>
  </author>
  <url>http://github.com/madrobby/scriptaculous/commit/efb38b665f9e5c48a5179f249f926e96c18ddee7</url>
  <id>efb38b665f9e5c48a5179f249f926e96c18ddee7</id>
  <committed-date>2008-07-24T15:16:55-07:00</committed-date>
  <authored-date>2008-07-24T15:16:55-07:00</authored-date>
  <message>Change Effect.Base#render not to use eval(), so certain JavaScript runtime environments (like Adobe AIR) that do not support eval() work. [King Maxemilian, John-David Dalton] [#20 state:resolved]</message>
  <tree>68fcdafb657db4e7760a8fa4eb7638fac992438d</tree>
  <committer>
    <name>Thomas Fuchs</name>
    <email>thomas@fesch.at</email>
  </committer>
</commit>
