Closed GoogleCodeExporter closed 9 years ago
Also, here's an example of the suggested code logic change in place (with the
modified expressInstall.swf file).
http://www.flensed.com/code/dev-tests/test-swfobject-3.html
You can see that after about 5 seconds, the alternate content is re-displayed.
Original comment by get...@gmail.com
on 25 Aug 2008 at 1:56
Thanks Kyle, it's on the list for the next version :-)
Original comment by bobbyvandersluis
on 25 Aug 2008 at 3:22
Original comment by bobbyvandersluis
on 25 Aug 2008 at 3:26
FYI, I believe at the moment, this test now no longer shows the intended
behavior
(plugin update failing, timeout re-displaying alt content), because FP10 is out
now,
so the "bogus" version string I used now triggers an update from 9.0.124 to the
10.0.12.36. I'll update the test shortly to use a really bogus version like
"12" so
this test continues to show the behavior as intended (assuming you already have
the
latest FP10 plugin!), at least for a few more years til Adobe release FP12! :)
Original comment by get...@gmail.com
on 17 Oct 2008 at 7:32
Updates are checked into SVN. I did wonder why you used old_si though, because I
thought it wasn't really necessary?
Original comment by bobbyvandersluis
on 8 Jan 2009 at 2:11
saving the old/original "startInstall" into "old_si" is required because the
functionality that is in that function still needs to be executed, but also the
clearInterval needs to be executed. This is kind of "AOP style", where you take
a
function, and redefine it by wrapping it in another function that does the
original
stuff, but also more stuff before or after it.
If I hadn't saved the original function executable reference, then immediately
after
I did the reassign of the function, that functionality would be
lost/inaccessible to
be excuted.
And I needed to actually redefine the function because other code that we don't
control (namely the payload that comes from Adobe dynamically) is hardcoded to
call
that particular function name. So this was the only way to get our
"clearInterval"
call made automatically when the Adobe payload arrives and fires off it's
functionality.
Original comment by get...@gmail.com
on 8 Jan 2009 at 3:20
I thought that startInstall is executed automatically, so there would be no
reason to
do this manually???
Original comment by bobbyvandersluis
on 1 Apr 2009 at 2:59
startInstall *is* called automatically by Adobe's payload that is downloaded.
And we
exploit that fact so that we can insert our own logic into the calling chain.
If you are familiar with AOP, basically, this is a "before" definition. We need
to
wrap some of our own custom logic into startInstall, so that when it is called,
our
logic is called, *and* the original logic is also called.
We are essentially saying, "while you are doing XX, also do YY". So, we save a
reference to the old startInstall (in "old_si"), then we redefine startInstall
to be
a function that does what we want it to do, which THEN also calls the old_si
saved
reference function. This makes sure that *both* our new code, and the old
original
startInstall, get executed, when the Adobe payload calls the function
"startInstall".
Does that make sense?
Original comment by get...@gmail.com
on 1 Apr 2009 at 3:08
You're correct, I have uploaded the changes, new expressInstall.swf is also
available
in the 2.2 test suite
Original comment by bobbyvandersluis
on 6 Apr 2009 at 11:25
Included in the SWFObject 2.2 beta1 release
Original comment by bobbyvandersluis
on 16 Apr 2009 at 3:05
Original issue reported on code.google.com by
get...@gmail.com
on 25 Aug 2008 at 1:49