AS3 Error #1009, random line errors
This usually means something hasn’t been instantiated yet, and you’re trying to call on something that doesn’t exist or have it’s values yet. I kept getting related errors for line numbers that seemed obviously OK. My problem was that I had moved my super() call to below a couple other lines of code.
Use sin() to oscillate waves in After Effects
This expression will make something oscillate back and forth on the x axis, such as “puppet show” waves
amplitude = 10;
frequency = 3;
temp=amplitude*Math.sin(time*frequency)+amplitude;
// add the result to the current x pos
temp=temp+transform.position[0];
//plug the new x into slot 0. y is currently left unchanged
[temp, transform.position[1]]
Permutations of 1920×1080 for perfect scaling at 1.7(7)
Here’s a list of good sizes to use when scaling down a 16:9 image:
Also note that Adobe Media Encoder doesn’t allow odd numbers in it’s dimensions for mp4 files. It will round your dimensions and add black pixels to the edge of the movie. For mp4s in AME, only use dimensions where they’re both even numbers (e.g. INVALID dimension: 464 x 261)
1920 x 1080
1904 x 1071
1888 x 1062
1872 x 1053
1856 x 1044
1840 x 1035
1824 x 1026
1808 x 1017
1792 x 1008
1776 x 999
1760 x 990
1744 x 981
1728 x 972
1712 x 963
1696 x 954
1680 x 945
1664 x 936
1648 x 927
1632 x 918
1616 x 909
1600 x 900
1584 x 891
1568 x 882
1552 x 873
1536 x 864
1520 x 855
1504 x 846
1488 x 837
1472 x 828
1456 x 819
1440 x 810
1424 x 801
1408 x 792
1392 x 783
1376 x 774
1360 x 765
1344 x 756
1328 x 747
1312 x 738
1296 x 729
1280 x 720
1264 x 711
1248 x 702
1232 x 693
1216 x 684
1200 x 675
1184 x 666
1168 x 657
1152 x 648
1136 x 639
1120 x 630
1104 x 621
1088 x 612
1072 x 603
1056 x 594
1040 x 585
1024 x 576
1008 x 567
992 x 558
976 x 549
960 x 540
944 x 531
928 x 522
912 x 513
896 x 504
880 x 495
864 x 486
848 x 477
832 x 468
816 x 459
800 x 450
784 x 441
768 x 432
752 x 423
736 x 414
720 x 405
704 x 396
688 x 387
672 x 378
656 x 369
640 x 360
624 x 351
608 x 342
592 x 333
576 x 324
560 x 315
544 x 306
528 x 297
512 x 288
496 x 279
480 x 270
464 x 261
448 x 252
432 x 243
416 x 234
400 x 225
384 x 216
368 x 207
352 x 198
336 x 189
320 x 180
304 x 171
288 x 162
272 x 153
256 x 144
240 x 135
224 x 126
208 x 117
192 x 108
176 x 99
160 x 90
144 x 81
128 x 72
112 x 63
96 x 54
80 x 45
64 x 36
48 x 27
32 x 18
16 x 9
Embedded FLVPlayback inappropriately taking over screen when SWF goes to fullscreen
Because the FLV player was manually placed in a movie clip, I used:
myFLVPlaybackInstanceName.fullScreenTakeOver = false;
However, if the player is generated at runtime via code, use:
// In main class constructor:
primaryDisplayObject.stage.addEventListener(Event.ADDED,
displayObjectAdded, true);
// A little later in the main class:
// Listener when any display object is added to stage.
private static function displayObjectAdded(evt:Event):void {
if (evt.target is FLVPlayback) {
evt.target.fullScreenTakeOver = false;
}
}
credit:
http://www.kirupa.com/forum/showthread.php?t=338292
via:
http://readlist.com/lists/chattyfig.figleaf.com/flashcoders/5/25885.html
SWFObject hair-puller
I kept having unknown issues with my SWF Object html not working. Finally, I discovered that the permissions for the swfobject.js file were not allowing the .js to load.
Validate XML documents with Firefox
Open an XML file directly in Firefox to validate it’s structure. Sometimes it helps me catch a nasty invisible that is causing a parsing error before it mysteriously messes with the Flash trying to use it.
IE turns into a black screen when reloading or refreshing page with Flash
We had a stubborn bug in Internet Explorer where all of the Flash content would go black if you reloaded/refreshed the page. The issue turned out to be a dynamically adjusted mask that for some reason on reload (but not initial load) would cause the whole swf to crash. Specifically, I was using AS3 to resize the global screen mask to stage.stageWidth (& height). For some reason IE didn’t like it but all other browsers were unaffected. Once removed, it worked fine. This may have something to do with the stage being resized before it has been properly initialized, but I haven’t tested it.
Increase animation of rollout sheets in OS X
I hate how slow the Mac OS sometimes seems because of the “pretty” things it provides.
In Terminal, type:
defaults write NSGlobalDomain NSWindowResizeTime .001
This speeds up the “roll-out” animation of many dialog boxes and effects across various apps.