search for: __swf_version__

Displaying 13 results from an estimated 13 matches for "__swf_version__".

2007 Jul 02
0
[PATCH] Implement CharToAscii + simple testcase
I overhauled it a bit before committing. Some notes: 1) makeswf uses the C preprocessor and defines some useful macros, one of them being __SWF_VERSION__. So if you have code that only compiles in version 5+, you can use someting like: #if __SWF_VERSION__ >= 5 to comment it out for version 4. 2) All strings in Swfdec are valid UTF-8. So if there's some unchecked string, you must verify it before pasing it on to Swfdec. All the swfdec_bits fun...
2007 Aug 22
0
3 commits - libswfdec/swfdec_as_array.c libswfdec/swfdec_as_function.c test/trace
...flash 6. Make the script output less useless information. diff --git a/test/trace/trace_properties.as b/test/trace/trace_properties.as index e547478..bfa256c 100644 --- a/test/trace/trace_properties.as +++ b/test/trace/trace_properties.as @@ -1,4 +1,71 @@ -// doesn't work for Flash 5 +#if __SWF_VERSION__ == 5 +// create a _global object, since it doesn't have one, these are ver 6 values +_global = new_empty_object (); +_global.ASSetNative = ASSetNative; +_global.ASSetNativeAccessor = ASSetNativeAccessor; +_global.ASSetPropFlags = ASSetPropFlags; +_global.ASconstructor = ASconstructor; +_global....
2007 Aug 21
0
2 commits - test/trace
...256a42..92294a9 100644 --- a/test/trace/trace_properties.as +++ b/test/trace/trace_properties.as @@ -2,81 +2,108 @@ function new_empty_object () { var hash = new Object (); + ASSetPropFlags (hash, null, 0, 7); for (var prop in hash) { delete hash[prop]; } return hash; } +#if __SWF_VERSION__ >= 6 function hasOwnProperty (o, prop) { - if (o.__proto__ == undefined || o.__proto__ == "assdofjkaofjojsafjpojsafa") + if (o.hasOwnProperty != undefined) + return o.hasOwnProperty (prop); + + o.hasOwnProperty = Object.prototype.hasOwnProperty; + result = o.hasOwnProperty (pr...
2007 Oct 13
0
5 commits - libswfdec/swfdec_html_parser.c libswfdec/swfdec_text_field.c libswfdec/swfdec_text_field_movie_as.c libswfdec/swfdec_text_field_movie.c libswfdec/swfdec_xml.c test/trace
...t/trace/xml-escape.as +++ b/test/trace/xml-escape.as @@ -8,5 +8,9 @@ trace (xmlEscape ("te<st")); trace (xmlEscape ()); trace (xmlEscape ("ma'ny", "param&eters")); trace (xmlEscape ("hmm&hrr")); +// FIXME: Make it work in v5 too +#if __SWF_VERSION__ > 5 +trace (xmlEscape ("non breaking space: ??")); +#endif loadMovie ("FSCommand:quit", ""); diff --git a/test/trace/xml-parse-2.xml b/test/trace/xml-parse-2.xml index 70fa949..f3c2d88 100644 --- a/test/trace/xml-parse-2.xml +++ b/test/trace/xml-parse-2.xml @@ -1...
2007 Nov 27
0
12 commits - libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_strings.c libswfdec/swfdec_loader.c libswfdec/swfdec_loader_internal.h libswfdec/swfdec_load_object_as.c libswfdec/swfdec_load_object.c libswfdec/swfdec_load_object.h
...ace_properties_names_8.as \ transform.swf \ transform.swf.trace \ transform-properties.as \ diff --git a/test/trace/trace_properties.as b/test/trace/trace_properties.as index 2af2bea..2482e12 100644 --- a/test/trace/trace_properties.as +++ b/test/trace/trace_properties.as @@ -1,4 +1,4 @@ -#if __SWF_VERSION__ == 5 +#if __SWF_VERSION__ <= 5 // create a _global object, since it doesn't have one, these are ver 6 values _global = new_empty_object (); _global.ASSetNative = ASSetNative; @@ -325,7 +325,7 @@ function trace_properties_recurse (o, prefix, identifier, level) } } -function generate_...
2008 Jan 19
0
11 commits - libswfdec/swfdec_as_strings.c libswfdec/swfdec_sprite_movie_as.c libswfdec/swfdec_xml.c libswfdec/swfdec_xml.h libswfdec/swfdec_xml_node.c libswfdec/swfdec_xml_node.h test/image test/swfdec_test.c test/swfdec_test_image.c test/trace
...t/trace/xml-escape.as +++ b/test/trace/xml-escape.as @@ -8,9 +8,6 @@ trace (xmlEscape ("te&lt;st")); trace (xmlEscape ()); trace (xmlEscape ("ma'ny", "param&eters")); trace (xmlEscape ("hmm&amp;hrr")); -// FIXME: Make it work in v5 too -#if __SWF_VERSION__ > 5 trace (xmlEscape ("non breaking space: ??")); -#endif loadMovie ("FSCommand:quit", "");
2007 Oct 25
0
12 commits - libswfdec/swfdec_as_internal.h libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_object.c libswfdec/swfdec_text_field_movie_as.c libswfdec/swfdec_text_field_movie.c test/trace
...d, n: "new Array (), __proto__ changed and restored" }); +objects.push ({ o: XML, n: "XML" }); +objects.push ({ o: MovieClip, n: "MovieClip" }); +objects.push ({ o: this, n: "this" }); +objects.push ({ o: TextField, n: "TextField" }); +// FIXME +#if __SWF_VERSION__ > 5 +objects.push ({ o: t, n: "createTextField (...)" }); +#endif + +for (var i = 0; i < objects.length; i++) { + trace (i + ": " + objects[i].n); +} +trace (""); + +var str = " "; +for (var i = 0; i < objects.length; i++) { + if (i < 10) +...
2007 Jul 02
0
Branch 'as' - 4 commits - libswfdec/swfdec_as_interpret.c test/trace
...ii.as new file mode 100644 index 0000000..28a3c28 --- /dev/null +++ b/test/trace/chartoascii.as @@ -0,0 +1,20 @@ +// makeswf -v 7 -s 200x150 -r 1 -o asciitochar.swf asciitochar.as + +trace("CharToAscii testcase"); + +#if __SWF_VERSION__ > 4 +for (i=0; i<1000; i++) { + x = chr (i); + trace (i + " - " + x + " - " + ord (x)); +} +#endif + +trace(ord("??")); +trace(ord("??")); +trace(ord("??")); +trace(ord("??")); +trace(ord("??")); +trace(ord("??&quot...
2007 Oct 18
0
11 commits - libswfdec/swfdec_as_strings.c libswfdec/swfdec_text_field.c libswfdec/swfdec_text_field.h libswfdec/swfdec_text_field_movie_as.c libswfdec/swfdec_text_field_movie.c libswfdec/swfdec_text_field_movie.h test/trace
...operties (); + +trace ("# WITHOUT WORD WRAP"); + +t.wordWrap = false; + +trace_scroll_properties (); + +trace ("# WITH WORD WRAP - SCROLL RESET"); + +t.wordWrap = true; +t.scroll = 3; + +trace_scroll_properties (); + +// FIXME: version 6 gives crazy value for maxscroll here +#if __SWF_VERSION__ != 6 +trace ("# WITH WORD WRAP - FORMAT RESET"); + +var fmt = new TextFormat (); +t.setTextFormat (fmt); + +trace_scroll_properties (); +#endif + +trace ("# WITH WORD WRAP - TEXT RESET"); + +t.text = t.text; + +trace_scroll_properties (); + +t.scroll = 30; + +trace ("# WITH...
2007 Nov 10
0
10 commits - libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_types.c libswfdec/swfdec_initialize.as libswfdec/swfdec_initialize.h libswfdec/swfdec_movie.c libswfdec/swfdec_movie_clip_loader.c libswfdec/swfdec_movie.h libswfdec/swfdec_resource.c
..."d", 4); +createEmptyMovieClip ("b", 5); + +array = [ undefined, aa, ab, ba, bb, ca, cb, d, b, e, ea, eb ]; + +for (i = 0; i < array.length; i++) { + for (j = 0; j < array.length; j++) { + trace (i + " == " + j + ": " + (array[i] == array[j])); +#if __SWF_VERSION__ > 5 + trace (i + " === " + j + ": " + (array[i] === array[j])); +#endif + } +} + +loadMovie ("fscommand:quit", ""); diff --git a/test/trace/dangling-print-5.swf b/test/trace/dangling-print-5.swf new file mode 100644 index 0000000..4cac47f Binary files...
2007 Oct 25
0
18 commits - libswfdec/swfdec_player_internal.h libswfdec/swfdec_text_field_movie_as.c libswfdec/swfdec_text_format.c libswfdec/swfdec_text_format.h libswfdec/swfdec_xml.c libswfdec/swfdec_xml_node.c libswfdec/swfdec_xml_node.h test/trace
...rototype's native properties are created - -var properties = [ - "__constructor__", - "contentType", - "docTypeDecl", - "ignoreWhite", - "loaded", - "status", - "xmlDecl" -]; - -var XMLReal = XML; -XML = String; - -#if __SWF_VERSION__ == 5 -XML.prototype.hasOwnProperty = ASnative (101, 5); -XMLReal.prototype.hasOwnProperty = ASnative (101, 5); -#endif - -trace ("Before anything:"); - -for (var i = 0; i < properties.length; i++) { - trace ("XML: " + properties[i] + ": " + - XML.prototype.has...
2007 Dec 20
0
13 commits - libswfdec/swfdec_as_array.c libswfdec/swfdec_xml.c libswfdec/swfdec_xml_node.c test/trace
...ray ([1,2,3], [1,2,3,4], [], [1,2], [1]); sortall (a, compare_array_length, 0, 0); +// indexed array with undefined values +a = new Array (); +a[0] = "a"; +a[2] = "b"; +a[3] = undefined; +a[4] = "c"; +a.length = 10; +var ret = c.sort (Array.RETURNINDEXEDARRAY); +#if __SWF_VERSION__ <= 6 +mytrace (ret.slice (-3)); +#else +mytrace (ret.slice (0, 3)); +#endif + +// array with undefined values +a = new Array (); +a[0] = "a"; +a[2] = "b"; +a[3] = undefined; +a[4] = "c"; +a.length = 10; +mytrace (a.sort ()); + +// unique sort with one undefined valu...
2007 Nov 30
0
36 commits - libswfdec/Makefile.am libswfdec/swfdec_as_context.c libswfdec/swfdec_as_date.c libswfdec/swfdec_as_initialize.as libswfdec/swfdec_as_initialize.h libswfdec/swfdec_as_strings.c libswfdec/swfdec_flash_security.c
...menu-properties.as +++ b/test/trace/context-menu-properties.as @@ -6,10 +6,7 @@ var a = new ContextMenu (); var b = a.copy (); trace_properties (_global.ContextMenu, "_global", "ContextMenu"); -// FIXME: disabled for version 5 and 6 because of init script version issues -#if __SWF_VERSION__ >= 7 trace_properties (a, "local", "a"); -#endif trace_properties (b, "local", "b"); loadMovie ("FSCommand:quit", ""); diff --git a/test/trace/file-reference-constructor-7.swf b/test/trace/file-reference-constructor-7.swf index 8d3...