Hi Nick,
Thanks a lot. I was able to figure out this issue yesterday. I
did not update the jump offset of the branching instruction iffalse, which was
the root cause. Iam using the normal flash player. Can you please tell me where
i can download this debug player? Where the flash logs will be stored.. This
will be helpful for my future endeavours.
Once again, Thanks a lot.
Cheers,
Prabakaran Srinivasan.
----- Original Message ----
From: Nick Main <nickmain@...>
To: JavaSWF-Support@yahoogroups.com
Sent: Thursday, August 21, 2008 2:22:16 AM
Subject: [JavaSWF-Support] Re: Doubt regarding the instructions
Hey Prabakaran,
Are you using the debug player ? When the verifier chokes like this
it writes a dump of the bytecode into the flash log. That includes
all the instructions in the current method, along with stack and local
variable states. This info would be useful in figuring out the problem.
The verifier will check the bytecode before execution to make sure
that the stack and local var state is compatible with the instructions.
This error could mean that you've inserted instructions which will
leave the stack empty before an instruction which is expecting one
value to be on the stack.
It could also mean that there are several different execution paths
(e.g. from looping or conditional expressions) through the point where
verification failed, and that when following one path the stack has 1
item and when following the other it has zero.
Again - getting hold of the flash log will pinpoint the error.
The AVM2 Overview document gives some explanation of the two stacks.
Briefly - the scope stack is used to hold the list of objects/scopes
that will be searched when looking for a property by name. The
execution stack holds all the other instruction operands and results.
I don't know, but guess that the verifier won't check the scope
stack, other than to make sure it is not empty.
If you have trouble interpreting the flash log, post it here or send
it to me directly.
Good luck.
--Nick
--- In JavaSWF-Support@ yahoogroups. com, Prabakaran Srinivasan
<cute_karan2@ ...> wrote:
>
> Hi Nick/ Anybody,
> ��� ��� ��� ��� ��� ��� I have a
clarification regarding an error
message which the flash player displays. I tried injecting
some�instructions into existing methods available in the Actionscript
Version 3 classes. When i try to execute the file in which i injected
my code, the player displays an error message saying
> Verify Error : 1030 Stack depth is unbalanced 1 != 0.
> I checked with many of the forums and the solution i found was, the
SWF file has been corrupted. I can understand that i have done
something wrong with the code injection. But i just want to understand
the meaning of the error message given above.
> What does that 1 and 0 stand�for????
> The player gives an error saying the stack depth is unbalanced.
> Which stack does it refer to, the scope stack or the operand stack?
> Also please let me know the usage of these 2 stacks when dealing
with the instruction sets of the methods.
> I hardly understand anything from the error message.
> Please help me..
> Thanks in advance,
> Prabakaran Srinivasan.
>
>
>
>
> [Non-text portions of this message have been removed]
>
[Non-text portions of this message have been removed]
Hey Prabakaran,
Are you using the debug player ? When the verifier chokes like this
it writes a dump of the bytecode into the flash log. That includes
all the instructions in the current method, along with stack and local
variable states. This info would be useful in figuring out the problem.
The verifier will check the bytecode before execution to make sure
that the stack and local var state is compatible with the instructions.
This error could mean that you've inserted instructions which will
leave the stack empty before an instruction which is expecting one
value to be on the stack.
It could also mean that there are several different execution paths
(e.g. from looping or conditional expressions) through the point where
verification failed, and that when following one path the stack has 1
item and when following the other it has zero.
Again - getting hold of the flash log will pinpoint the error.
The AVM2 Overview document gives some explanation of the two stacks.
Briefly - the scope stack is used to hold the list of objects/scopes
that will be searched when looking for a property by name. The
execution stack holds all the other instruction operands and results.
I don't know, but guess that the verifier won't check the scope
stack, other than to make sure it is not empty.
If you have trouble interpreting the flash log, post it here or send
it to me directly.
Good luck.
--Nick
--- In JavaSWF-Support@yahoogroups.com, Prabakaran Srinivasan
<cute_karan2@...> wrote:
>
> Hi Nick/ Anybody,
> ��� ��� ��� ��� ��� ��� I have a
clarification regarding an error
message which the flash player displays. I tried injecting
some�instructions into existing methods available in the Actionscript
Version 3 classes. When i try to execute the file in which i injected
my code, the player displays an error message saying
> Verify Error : 1030 Stack depth is unbalanced 1 != 0.
> I checked with many of the forums and the solution i found was, the
SWF file has been corrupted. I can understand that i have done
something wrong with the code injection. But i just want to understand
the meaning of the error message given above.
> What does that 1 and 0 stand�for????
> The player gives an error saying the stack depth is unbalanced.
> Which stack does it refer to, the scope stack or the operand stack?
> Also please let me know the usage of these 2 stacks when dealing
with the instruction sets of the methods.
> I hardly understand anything from the error message.
> Please help me..
> Thanks in advance,
> Prabakaran Srinivasan.
>
>
>
>
> [Non-text portions of this message have been removed]
>
Hi Nick/ Anybody,
I have a clarification regarding an error message which
the flash player displays. I tried injecting some instructions into existing
methods available in the Actionscript Version 3 classes. When i try to execute
the file in which i injected my code, the player displays an error message
saying
Verify Error : 1030 Stack depth is unbalanced 1 != 0.
I checked with many of the forums and the solution i found was, the SWF file has
been corrupted. I can understand that i have done something wrong with the code
injection. But i just want to understand the meaning of the error message given
above.
What does that 1 and 0 stand for????
The player gives an error saying the stack depth is unbalanced.
Which stack does it refer to, the scope stack or the operand stack?
Also please let me know the usage of these 2 stacks when dealing with the
instruction sets of the methods.
I hardly understand anything from the error message.
Please help me..
Thanks in advance,
Prabakaran Srinivasan.
[Non-text portions of this message have been removed]
Hi Nick,
I found some problems, when using the baseline zip. I tried to add actions
to frames and to buttons using the movie/ frame classes and this produced
invalid swf files. I attached a patch that solved the problem for me.
Hope that helps,
Felix
[Non-text portions of this message have been removed]
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]
You should look at the recently open-sourced Flex SDK from Adobe.
That includes a pure Java ActionScript compiler.
JavaSWF does not deal with ActionScript source files.
--- In JavaSWF-Support@yahoogroups.com, "prabakaran" <cute_karan2@...>
wrote:
>
> Hi All,
> Can anyone help me in converting the .as code to binary format.
>
> Thanks in advance,
> Prabakaran Srinivasan.
>
Hello Guys,
I want to fit a flash movie loaded from an external resource into my
stage. I am not able to do it by manipulating width and height. The AR
gets distorted. So i am thinking of manipulating the width and height
of external flash movie by parsing it.
Is it possible in Java SWF??
Thanks.
Unfortunately not. JavaSWF is a parser/writer for the SWF file
format. It does not include any rendering capabilities for Flash
content (since that would violate Adobe licensing terms for the file
format specification).
--- In JavaSWF-Support@yahoogroups.com, "hleesukc" <hleesukc@...> wrote:
>
> I am quite new and haven't used JavaSWF. Before I try it out, would it
> be possible to create an image of a human body, in flash, and then
> embed it in a java GUI, enabling parts of the body to be clicked on so
> that the flash body interacts with the Java gui?
>
I am quite new and haven't used JavaSWF. Before I try it out, would it
be possible to create an image of a human body, in flash, and then
embed it in a java GUI, enabling parts of the body to be clicked on so
that the flash body interacts with the Java gui?
--- In JavaSWF-Support@yahoogroups.com, "Tiago de Andrade"
<freire.tiago@...> wrote:
>
> How to modify the getURL from a SWF??
>
I'm interested in too!!
--- In JavaSWF-Support@yahoogroups.com, "Tiago de Andrade"
<freire.tiago@...> wrote:
>
> How to modify the getURL from a SWF??
>
I really need how to do it. I've readed the API many times but i
cannot get on it.
I will be attending MAX in Chicago next week.
If anyone is interested in meeting up during the conference on Monday,
Tuesday or Wednesday (morning) please let me know at gmail -
david.nick.main
--Nick
> In case anyone is interested...
Very much interested :)
Kishore.
--- In JavaSWF-Support@yahoogroups.com, "Nick Main" <nickmain@...> wrote:
>
> In case anyone is interested...
>
> I just started a blog in which I will be posting about development of
> JavaSWF and related projects.
>
> http://epistemologicalengineering.blogspot.com/
>
> --Nick
>
On Fri, Jul 27, 2007 at 09:47:14PM -0000, Nick Main wrote:
> The plan for adding v9 support to JavaSWF includes code generation for
> the core parsing/emitting logic.
>
> There are two main components in any code generation scheme - a model
> that drives the generation logic and a templating engine that emits the
> source code.
>
> Freemarker is going to be the template engine, but the nature of the
> model is still in flux. The favorite options are:
>
> * Ad-hoc XML
> * HTML Microformat (the model will be self documenting)
If choosing between the above, I'd probably pick the former, since it
might be a bit more succinct, and the documentation would probably
benefit from its own 'generation' step too (e.g. automatic linking
between related parts of the spec, pagination etc.)
> * Annotated Java source (accessed via a Javadoc doclet or APT)
I reckon being a bit language-neutral increases the chances that others
will be able to use the spec in their projects (and possibly find and
correct bugs in it). So I'd vote against annotated Java.
> * XMI - exported from a UML tool
> * EMF - Eclipse Modeling Framework
> * Omnigraffle diagrams (the file format is XML based)
With any of the above, I have difficulty seeing how to use the notation
to model the domain (file format). On the other hand if that can be
made to work, maybe a visual notation for the model would make it
significantly easier to understand (relationships between things modelled
as lines-between-boxes etc)?
> * A domain-specific language, parsed via Antlr
Should produce a much nicer-for-humans result than XML. On the other
hand its a bit more costly to create and maintain than an XML format.
Maybe I just need more practise creating DSLs :)
Have you considered ASN.1 to specify the file format? I've never used
it myself, so I don't really know if it's applicable.
If it were me, I'd prototype with a model specified in XML, and then
switch to a DSL when experience shows exactly what's needed now, and
where room for future extension should fit.
There is also a middle path of using XML to define the broad structure
of the model, and then defining micro-languages for the bits which would
be too unwieldy to do in XML alone (e.g. a simple expression language
for defining the effect that an AVM operation has on the stack, or
something like that).
I hope you find some of that useful,
dave
--
http://david.holroyd.me.uk/
Yes - the word "reads" is troublesome - although it was also in the
license for the v8 spec.
The intention is clearly to prevent anything that competes with the
Flash Player, but the wording goes way beyond that.
Comparing the old to the new, it looks like they dropped this clause
from the new license:
> b. You may not use the Specification in any way to create a server,
> executable, or other program that will stream or deliver data from
> a client to a server, from a server to another server, or from a
> server to a client.
.. which is a good thing.
--- In JavaSWF-Support@yahoogroups.com, David Holroyd
<javaswf-yahoo-group@...> wrote:
>
> On Fri, Jul 27, 2007 at 04:54:37AM -0000, Nick Main wrote:
> > The V9 spec has just been published !
> >
> > http://www.adobe.com/licensing/developer/
>
> The restrictions seem rather... restrictive,
>
> "You may not use the Specification in any way to create or develop a
> runtime, client, player, executable or other program that reads or
> renders SWF files."
>
> !
>
> dave
>
> --
> http://david.holroyd.me.uk/
>
On Fri, Jul 27, 2007 at 04:54:37AM -0000, Nick Main wrote:
> The V9 spec has just been published !
>
> http://www.adobe.com/licensing/developer/
The restrictions seem rather... restrictive,
"You may not use the Specification in any way to create or develop a
runtime, client, player, executable or other program that reads or
renders SWF files."
!
dave
--
http://david.holroyd.me.uk/
The plan for adding v9 support to JavaSWF includes code generation for
the core parsing/emitting logic.
There are two main components in any code generation scheme - a model
that drives the generation logic and a templating engine that emits the
source code.
Freemarker is going to be the template engine, but the nature of the
model is still in flux. The favorite options are:
* Ad-hoc XML
* HTML Microformat (the model will be self documenting)
* Annotated Java source (accessed via a Javadoc doclet or APT)
* XMI - exported from a UML tool
* EMF - Eclipse Modeling Framework
* Omnigraffle diagrams (the file format is XML based)
* A domain-specific language, parsed via Antlr
The same model will be used to generate source for Java, Actionscript 3
and Haskell - and maybe Ruby, Objective C, C# and C++.
If anyone has done any serious code generation and can provide insight
or experiences, please reply to this post, or email me directly at
david.nick.main-at-gmail-dot-com
--Nick
[Non-text portions of this message have been removed]
--- In JavaSWF-Support@yahoogroups.com, "crissey_belle"
<crissey_belle@...> wrote:
>
> Hi there. I'm handling a site where it enables our students to create
> their own page and upload gif, jpg and swf files. However, the swf
> files uploaded have their own links that point to different websites.
> What my boss would want me to do is for me to substitute all those
> links with a link that points to our school website. Is that possible?
> Can I use JavaSWF for that? Thank you =)
>
Me too!!
I do not know of a good way to play Flash movies in Java - maybe
someone else can comment.
JavaSWF is a library for reading and writing the SWF file format and
(deliberately) not about rendering or playing movies.
--- In JavaSWF-Support@yahoogroups.com, "vijtuk" <vijtuk@...> wrote:
>
> Dear All,
>
> I want to know if a MIDlet can play Flash .swf files. If yes how?
>
> Regards,
> Vijay kamble
>
According to Adobe's John Dowdell the SWF File Format spec for v9 is
due any day now:
http://weblogs.macromedia.com/jd/archives/2007/05/swf9_docs_bi-di.cfm
"SWF9 file format specification has moved out of reviews & edit
integration, and past testing, and is now at the packaging/publishing
phase... might be available on the web next week or the week after,
depending on details and webteam schedules."
--Nick
Hi,
Is it possible to create SWFs that contain filters (the bitmap filters) and mask
(as in the MovieClip.setMask) in flash.
I went through the API, couldn't find it but still hopeful decided to ask the
experts. Any help is much appreciated.
Many thanks,
Nishant
www.itasveer.com
________________________________________________________________________________\
____Pinpoint customers who are looking for what you sell.
http://searchmarketing.yahoo.com/
[Non-text portions of this message have been removed]
What are people using to play Flash through Java? I'd like to have a native
Java program (ideally cross-platform, but I can live on Windows only for
now) that can play Flash content (doesn't have to be authored by a Java
program). I was hoping that JavaSWF night do it, but it seem to be made to
create the SWF content?
Thanks.
[Non-text portions of this message have been removed]