Search the web
Sign In
New User? Sign Up
JavaSWF-Support · Support and discussion about the JavaSWF pure Java wrapper package for the Macromedia Flash file format
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
How to make a userdefined method call in a flash file?   Message List  
Reply | Forward Message #1125 of 1162 |
Hi All,
I am doing a small project on parsing SWF files and injecting an
actionscript function into the existing SWF file. Iam able to inject the
actionscript byte code into the first frame by creating an action tag block.

The exact objective of the project is to find the different method calls which
inturn opens a url and redirect it to the method which i have injected and do
some modifications and call the same system method call. I tried by passing the
getUrl method call to mine, with the java code which looks as follows

push(target);
push(url);
push(2);
push("myOpenUrl"); - my method
writeCode(CALL_FUNCTION);
writeCode(POP);

(Iam not sure, whether the above given code is correct for a function
invocation, but i did this by analysing the byte code source.)

The actionscript code looks like this,

function myOpenUrl(url, target) {
var targetUrl = 'http://www.yahoo.com';
if (url.indexOf(targetUrl) == -1) {
url = targetUrl + url;
}
getUrl(url, target);
}
This gets successfully written in the output SWF file and when i decompile it,
it is decompiled correctly. But the method invocation is not taking place. Can
anyone tell me what s the mistake i have done in the java code which i had given
above.

Also let me know the correct one to achieve this, if Iam wrong.

Thanks,
Prabakaran Srinivasan.



________________________________________________________________________________\
____
You rock. That's why Blockbuster's offering you one month of Blockbuster Total
Access, No Cost.
http://tc.deals.yahoo.com/tc/blockbuster/text5.com

[Non-text portions of this message have been removed]




Thu Apr 3, 2008 6:18 am

cute_karan2
Offline Offline
Send Email Send Email

Forward
Message #1125 of 1162 |
Expand Messages Author Sort by Date

Hi All, I am doing a small project on parsing SWF files and injecting an actionscript function into the existing SWF file. Iam able to inject the actionscript...
Prabakaran Srinivasan
cute_karan2
Offline Send Email
Apr 3, 2008
1:14 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help