Displaying 20 results from an estimated 21 matches for "newswfact".
2007 Jul 12
0
Branch 'as' - 6 commits - libswfdec/swfdec_as_interpret.c libswfdec/swfdec_movie.c libswfdec/swfdec_sprite_movie_as.c test/trace
...FMovieWithVersion (version);
+ movie = newSWFMovie();
+ SWFMovie_setRate (movie, 1);
+ SWFMovie_setDimension (movie, 200, 150);
+
+ clip = newSWFMovieClip ();
+ item = SWFMovie_add (movie, (SWFBlock) clip);
+ SWFDisplayItem_setName (item, "movie");
+ SWFDisplayItem_addAction (item, newSWFAction ("trace (this + \": init\");"), SWFACTION_INIT);
+ SWFDisplayItem_addAction (item, newSWFAction ("trace (this + \": construct\");"), SWFACTION_CONSTRUCT);
+ SWFDisplayItem_addAction (item, newSWFAction ("trace (this + \": load\");"),...
2007 Oct 25
0
6 commits - libswfdec/swfdec_as_interpret.c libswfdec/swfdec_movie.c test/trace
...ayItem item;
+ char *real_name;
+
+ movie = newSWFMovieWithVersion (version);
+ movie = newSWFMovie();
+ SWFMovie_setRate (movie, 1);
+ SWFMovie_setDimension (movie, 200, 150);
+
+ clip = newSWFMovieClip ();
+ item = SWFMovie_add (movie, (SWFBlock) clip);
+ SWFMovieClip_addInitAction (clip, newSWFAction ("_root.x = 42;"));
+ SWFDisplayItem_addAction (item, newSWFAction ("trace (_root.x);"), SWFACTION_INIT);
+ SWFDisplayItem_addAction (item, newSWFAction ("trace (_root.x);"), SWFACTION_CONSTRUCT);
+ SWFDisplayItem_flush (item);
+ SWFMovie_nextFrame (movie);
+...
2007 Oct 29
0
2 commits - libswfdec/swfdec_audio_event.c test/sound
...SWF_SOUND_NOT_COMPRESSED | SWF_SOUND_44KHZ | SWF_SOUND_16BITS | SWF_SOUND_STEREO);
+ instance = SWFMovieClip_startSound(movie_clip, sound);
+ SWFMovieClip_nextFrame (movie_clip);
+
+ SWFMovie_add (movie, (SWFBlock) movie_clip);
+ SWFMovie_nextFrame (movie);
+
+ SWFMovie_add (movie, (SWFBlock) newSWFAction (""
+ "trace ('To crash or not to crash?');"
+ "function quit () {"
+ " loadMovie ('FSCommand:quit', '');"
+ "}"
+ "setTimeout (quit, 200);"
+ ""));
+ SWFMovie_nextFrame (movie);
+
+ SWFMovie_save (m...
2007 Oct 28
1
test/trace
...t;
+ SWFDisplayItem display;
+
+ movie = newSWFMovieWithVersion (version);
+ movie = newSWFMovie();
+ SWFMovie_setRate (movie, 1);
+ SWFMovie_setDimension (movie, 200, 150);
+
+ text = newSWFTextField ();
+ display = SWFMovie_add (movie, (SWFBlock) text);
+
+ SWFMovie_add (movie, (SWFBlock) newSWFAction (""
+ "trace ('Test whether native properties of TextField are initialized if the movie contains an EditText tag');"
+ "_global.TextField.prototype.hasOwnProperty = ASnative (101, 5);"
+ "trace (_global.TextField.prototype.hasOwnProperty ('text'...
2007 Oct 28
1
2 commits - libswfdec/swfdec_as_interpret.c test/trace
libswfdec/swfdec_as_interpret.c | 1 +
test/trace/Makefile.am | 3 +++
test/trace/crash-0.5.3-divide-by-zero.as | 5 +++++
test/trace/crash-0.5.3-divide-by-zero.swf |binary
test/trace/crash-0.5.3-divide-by-zero.swf.trace | 1 +
5 files changed, 10 insertions(+)
New commits:
commit c6d96d7d47704ca3d62c08d35874c64f7878bdf2
Author:
2007 Nov 14
0
5 commits - libswfdec/.gitignore libswfdec/swfdec_initialize.as test/image test/sound test/trace
...b/test/sound/crash-0.5.3-no-samples.c
index 4339f03..30c0e34 100644
--- a/test/sound/crash-0.5.3-no-samples.c
+++ b/test/sound/crash-0.5.3-no-samples.c
@@ -28,15 +28,6 @@ do_movie ()
SWFMovie_add (movie, (SWFBlock) movie_clip);
SWFMovie_nextFrame (movie);
- SWFMovie_add (movie, (SWFBlock) newSWFAction (""
- "trace ('To crash or not to crash?');"
- "function quit () {"
- " loadMovie ('FSCommand:quit', '');"
- "}"
- "setTimeout (quit, 200);"
- ""));
- SWFMovie_nextFrame (movie);
-
SWFMovie_save (m...
2007 Nov 20
0
7 commits - libswfdec/swfdec_movie.c libswfdec/swfdec_sprite_movie_as.c test/image
...yItem_setDepth (item, 1);
+ SWFDisplayItem_setName (item, "b");
+
+ item = SWFMovie_add (movie, get_rectangle (0, 0, 255));
+ SWFDisplayItem_moveTo (item, 50, 0);
+ SWFDisplayItem_setDepth (item, 3);
+ SWFDisplayItem_setName (item, "c");
+
+ SWFMovie_add (movie, (SWFBlock) newSWFAction (
+ reverse ? "a.setMask (c); a.setMask (null);" : "c.setMask (a); c.setMask (null);"
+ ));
+ SWFMovie_nextFrame (movie);
+
+ sprintf (name, "mask-terminates-clip-%s-%d.swf", reverse ? "mask" : "maskee", version);
+ SWFMovie_save (movie, name)...
2008 Jan 08
0
9 commits - configure.ac test/custom test/Makefile.am test/swfdec_test_initialize.as test/swfdec_test_initialize.h test/swfdec_test_test.c test/trace
...void
+add_button_events (SWFButton button)
+{
+ char script[100];
+ unsigned int i;
+
+ for (i = 0; i < sizeof (button_events) / sizeof (button_events[0]); i++) {
+ sprintf (script, "trace (\"button %s: \" + this);", button_events[i]);
+ SWFButton_addAction (button, newSWFAction (script), (1 << i));
+ }
+}
+
+static SWFCharacter
+get_clip_events_movie (const char *name)
+{
+ SWFMovieClip clip;
+ SWFDisplayItem item;
+
+ clip = newSWFMovieClip ();
+ item = SWFMovieClip_add (clip, (SWFBlock) newSWFMovieClip ());
+ SWFDisplayItem_addAction (item, newSWFAction (...
2007 Aug 02
0
10 commits - libswfdec/compiler.c libswfdec-gtk/swfdec_source.c libswfdec/Makefile.am libswfdec/swfdec_player.c NEWS test/trace
...*contents;
GError *error = NULL;
guint i;
+ size_t len;
+ byte *data;
if (argc < 2) {
g_print ("usage: %s FILE ...\n\n", argv[0]);
@@ -118,23 +79,14 @@ main (int argc, char **argv)
error = NULL;
return 1;
}
- movie = newSWFMovie ();
action = newSWFAction (contents);
- SWFMovie_add (movie, (SWFBlock) action);
- g_free (contents);
-
- array = g_byte_array_new ();
- SWFMovie_output (movie, output_array, array);
+ data = SWFAction_getByteCode (action, &len);
contents = get_name (argv[i]);
g_print ("/* compiled from...
2007 Jun 19
0
Branch 'as' - 4 commits - libswfdec/swfdec_codec_video.c libswfdec/swfdec_movie.c test/trace
...ame, "-name");
+ else
+ SWFDisplayItem_setName (item, "instanceX");
+ }
+ if (mod & MODIFY_CLIP_DEPTH) {
+ if (name)
+ g_string_append (name, "-clip");
+ else
+ SWFDisplayItem_setMaskLevel (item, 5);
+ }
+ SWFDisplayItem_addAction (item, newSWFAction ("trace (_root._currentframe + \": init \" + this);"), SWFACTION_INIT);
+ SWFDisplayItem_addAction (item, newSWFAction ("trace (_root._currentframe + \": load \" + this);"), SWFACTION_ONLOAD);
+ SWFDisplayItem_addAction (item, newSWFAction ("trace (...
2008 Jan 08
0
4 commits - configure.ac test/compiler.c test/.gitignore test/Makefile.am test/swfdec_test.c test/swfdec_test_function.c test/swfdec_test_function.h test/swfdec_test_global.c test/swfdec_test_initialize.as test/swfdec_test_initialize.h
..."usage: %s INFILE OUTFILE\n\n", argv[0]);
+ return 1;
+ }
+
+ Ming_init ();
+
+ if (!g_file_get_contents (argv[1], &contents, NULL, &error)) {
+ g_printerr ("%s\n", error->message);
+ g_error_free (error);
+ error = NULL;
+ return 1;
+ }
+ action = newSWFAction (contents);
+ if (SWFAction_compile (action, 8, &len) != 0) {
+ g_printerr ("compilation failed\n");
+ return 1;
+ }
+ data = SWFAction_getByteCode (action, NULL);
+ contents = g_malloc (len + sizeof (HEADER));
+ memcpy (contents, HEADER, sizeof (HEADER));
+ memcpy (con...
2007 Nov 28
0
59 commits - libswfdec-gtk/swfdec_gtk_widget.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_object.h libswfdec/swfdec_button.c libswfdec/swfdec_button.h libswfdec/swfdec_button_movie.c libswfdec/swfdec_button_movie.h libswfdec/swfdec_event.c
...void
+add_button_events (SWFButton button)
+{
+ char script[100];
+ unsigned int i;
+
+ for (i = 0; i < sizeof (button_events) / sizeof (button_events[0]); i++) {
+ sprintf (script, "trace (\"button %s: \" + this);", button_events[i]);
+ SWFButton_addAction (button, newSWFAction (script), (1 << i));
+ }
+}
+
+static SWFCharacter
+get_rectangle (int r, int g, int b)
+{
+ SWFShape shape;
+ SWFFillStyle fill;
+
+ shape = newSWFShape ();
+ fill = SWFShape_addSolidFillStyle (shape, r, g, b, 255);
+ SWFShape_setRightFillStyle (shape, fill);
+ SWFShape_drawLineTo...
2007 Jun 20
0
Branch 'as' - 5 commits - libswfdec/swfdec_graphic_movie.c libswfdec/swfdec_movie.c libswfdec/swfdec_sprite_movie.c test/image
...) {
+ for (t2 = 0; t2 < N_TYPES; t2++) {
+ movie = newSWFMovieWithVersion (version);
+ movie = newSWFMovie();
+ SWFMovie_setRate (movie, 1);
+ SWFMovie_setDimension (movie, 200, 150);
+
+ modify_placement (movie, t1, t2);
+
+ SWFMovie_add (movie, (SWFBlock) newSWFAction (""
+ "stop ();"
+ ));
+ SWFMovie_nextFrame (movie);
+
+ real_name = g_strdup_printf ("replace-%s-%s-%d.swf", types[t1], types[t2], version);
+ SWFMovie_save (movie, real_name);
+ g_free (real_name);
+ }
+ }
+}
+
+int
+main (int argc,...
2007 Aug 13
0
Branch 'vivi' - 24 commits - configure.ac libswfdec/swfdec_sprite_movie.c libswfdec/swfdec_tag.c libswfdec/swfdec_tag.h vivified/core vivified/dock vivified/ui
...+vivi_ming_clear_error (void)
+{
+ char *ret;
+
+ if (ming_errors != NULL) {
+ ret = vivi_ming_get_error ();
+ g_free (ret);
+ }
+}
+
+static void
vivi_ming_init (void)
{
static gboolean ming_inited = FALSE;
@@ -85,14 +96,16 @@ vivi_ming_compile (const char *code, cha
action = newSWFAction (code);
data = SWFAction_getByteCode (action, &len);
- if (data == NULL || len == 0) {
+ if (data == NULL || len <= 1) {
if (error)
*error = vivi_ming_get_error ();
- return NULL;
+ script = NULL;
+ } else {
+ buffer = swfdec_buffer_new_and_alloc (len);
+ mem...
2007 Jun 18
0
Branch 'as' - 8 commits - libswfdec/swfdec_movie.c libswfdec/swfdec_sprite.c libswfdec/swfdec_sprite.h libswfdec/swfdec_sprite_movie.c libswfdec/swfdec_sprite_movie.h libswfdec/swfdec_swf_decoder.c libswfdec/swfdec_swf_decoder.h
...WFMovie movie;
+ char *real_name;
+ guint i;
+
+ movie = newSWFMovieWithVersion (version);
+ movie = newSWFMovie();
+ SWFMovie_setRate (movie, 1);
+ SWFMovie_setDimension (movie, 200, 150);
+
+ modify_placement (movie, i);
+ SWFMovie_nextFrame (movie);
+
+ SWFMovie_add (movie, (SWFBlock) newSWFAction (""
+#if 0
+ "loadMovie (\"FSCommand:quit\", \"\");"
+#else
+ "stop ();"
+#endif
+ ));
+ SWFMovie_nextFrame (movie);
+
+ real_name = g_strdup_printf ("duplicate-depth-%d.swf", version);
+ SWFMovie_save (movie, real_name);
+ g_free (...
2007 Aug 09
0
Branch 'vivi' - 12 commits - libswfdec-gtk/swfdec_gtk_player.c libswfdec-gtk/swfdec_gtk_player.h libswfdec/Makefile.am libswfdec/swfdec_as_array.h libswfdec/swfdec_as_context.c libswfdec/swfdec_as_context.h libswfdec/swfdec_as_debugger.c
...Ming_setErrorFunction (vivi_ming_error);
+ Ming_setWarnFunction (vivi_ming_error);
+}
+
+SwfdecScript *
+vivi_ming_compile (const char *code, char **error)
+{
+ byte *data;
+ SWFAction action;
+ gsize len;
+ SwfdecBuffer *buffer;
+ SwfdecScript *script;
+
+ vivi_ming_init ();
+
+ action = newSWFAction (code);
+ data = SWFAction_getByteCode (action, &len);
+ if (data == NULL || len == 0) {
+ if (error)
+ *error = vivi_ming_get_error ();
+ return NULL;
+ }
+ buffer = swfdec_buffer_new_and_alloc (len);
+ memcpy (buffer->data, data, len);
+ script = swfdec_script_new (buff...
2007 Jul 26
0
17 commits - doc/swfdec-sections.txt libswfdec/compiler.c libswfdec/.gitignore libswfdec/Makefile.am libswfdec/swfdec_asbroadcaster.c libswfdec/swfdec_as_context.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_object.h libswfdec/swfdec_as_strings.c
...*/\n\n");
+ for (i = 1; i < argc; i++) {
+ if (!g_file_get_contents (argv[1], &contents, NULL, &error)) {
+ g_printerr ("%s\n", error->message);
+ g_error_free (error);
+ error = NULL;
+ return 1;
+ }
+ movie = newSWFMovie ();
+ action = newSWFAction (contents);
+ SWFMovie_add (movie, (SWFBlock) action);
+ g_free (contents);
+
+ array = g_byte_array_new ();
+ SWFMovie_output (movie, output_array, array);
+ contents = get_name (argv[i]);
+ g_print ("/* compiled from %s */\n", argv[i]);
+ g_print ("const uns...
2008 Jan 07
0
12 commits - configure.ac doc/swfdec.types Makefile.am test/crashfinder.c test/dump.c test/Makefile.am test/swfdec-extract.c test/swfdec_out.c test/swfdec_out.h test/swfedit.c test/swfedit_file.c test/swfedit_file.h test/swfedit_list.c test/swfedit_list.h
...t/test/compiler.c
+++ b/test/test/compiler.c
@@ -21,7 +21,7 @@ main (int argc, char **argv)
SWFAction action;
char *contents;
GError *error = NULL;
- gsize len;
+ int len;
byte *data;
if (argc != 3) {
@@ -38,7 +38,11 @@ main (int argc, char **argv)
return 1;
}
action = newSWFAction (contents);
- data = SWFAction_getByteCode (action, &len);
+ if (SWFAction_compile (action, 8, &len) != 0) {
+ g_printerr ("compilation failed\n");
+ return 1;
+ }
+ data = SWFAction_getByteCode (action, NULL);
contents = g_malloc (len + sizeof (HEADER));
memcpy...
2007 Nov 20
0
19 commits - libswfdec/swfdec_audio_event.c libswfdec/swfdec_bits.c libswfdec/swfdec_color.c libswfdec/swfdec_color.h libswfdec/swfdec_flv_decoder.c libswfdec/swfdec_image.c libswfdec/swfdec_initialize.as libswfdec/swfdec_initialize.h
...evel (item, 2);
+ }
+
+ item = SWFMovie_add (movie, get_rectangle (0, 0, 255));
+ SWFDisplayItem_moveTo (item, 25, 50);
+ SWFDisplayItem_setDepth (item, 3);
+ SWFDisplayItem_setName (item, "c");
+
+ if (FLAG_SET (flags, THIRD_MOVIE_SWAP_DEPTH)) {
+ SWFMovie_add (movie, (SWFBlock) newSWFAction ("c.swapDepths (100);"));
+ }
+ if (FLAG_SET (flags, THIRD_MOVIE_MASK)) {
+ SWFDisplayItem mask = SWFMovie_add (movie, get_rectangle (128, 128, 128));
+ SWFDisplayItem_moveTo (mask, 50, 50);
+ SWFDisplayItem_setDepth (mask, 50);
+ SWFDisplayItem_setName (mask, "mask&...
2007 Aug 22
0
163 commits - autogen.sh configure.ac doc/swfdec-sections.txt libswfdec-gtk/swfdec_gtk_player.c libswfdec-gtk/swfdec_gtk_player.h libswfdec-gtk/swfdec_gtk_widget.c libswfdec-gtk/swfdec_source.c libswfdec/Makefile.am libswfdec/swfdec_as_array.c
...+vivi_ming_clear_error (void)
+{
+ char *ret;
+
+ if (ming_errors != NULL) {
+ ret = vivi_ming_get_error ();
+ g_free (ret);
+ }
+}
+
+static void
vivi_ming_init (void)
{
static gboolean ming_inited = FALSE;
@@ -85,14 +96,16 @@ vivi_ming_compile (const char *code, cha
action = newSWFAction (code);
data = SWFAction_getByteCode (action, &len);
- if (data == NULL || len == 0) {
+ if (data == NULL || len <= 1) {
if (error)
*error = vivi_ming_get_error ();
- return NULL;
+ script = NULL;
+ } else {
+ buffer = swfdec_buffer_new_and_alloc (len);
+ mem...