Strange behaviour of .swf movies - AS2/AS3

Hello from Italy,
     this is my first post and I think I need some help from the experts...
     I am putting together an interactive Flash movie which is made of several different small movies. For the sake of clarity, I'll call them A.swf, B.swf, ..., Z.swf. The movies are launched from each other depending on certain buttons I've implemented.
     The first one, A.swf, is actually a sort of "main menu": it grants access to all the other movies and it is also the point of return from them when a certain button is pressed.
     Important: All the movies are scripted in AS3, except for the last one which, for a number of reasons, is scripted in AS2.
     The return from any (but the last) movie to the first, say B.swf to A.swf, is implemented like this:
function eventResponseSole(event:MouseEvent):void {
var myLoader:Loader = new Loader();
addChild(myLoader);
var url:URLRequest = new URLRequest("A.swf");
myLoader.load(url);
sole_btn.addEventListener(MouseEvent.CLICK, eventResponseSole);
     This is, of course, AS3.
     The last movie, which is scripted in AS2, returns to A.swf like this:
luna_btn.onRelease = function() {
loadMovie("A.swf", _root);
     The strange behaviour is this: if I launch Z.swf and navigate with the proper button up to A.swf, everything works. But if I launch A.swf, navigate to Z.swf and attempt to return, this doesn't work. There are no problems, instead, moving up and down between movies scripted in AS3, that is with the first bit of code I've pasted. My guess is that the syntax in AS2 is correct, but something stops A.swf from "launching itself" when the control is transferred to Z.swf, but the movie is launched in the original window. Is this diagnosis reasonable? And if so, would someone kindly provide a way out of this? Re-doing Z.swf in AS3 is not an option, I'm afraid, it will have to stay as it is. I also have to add I've tried some solutions by setting _lockroot, but this doesn't seem to work.
     Many thanks in advance!
     Marco Olivotto

Mixing AS2 into AS3 is not without stipulations... and I am no expert on translating those stipulations, but here is what the Flash documentation says regarding the matter... the third paragraph may be significant to your case:
- ActionScript 3.0 code can load a SWF file written in ActionScript 1.0 or 2.0, but it cannot access the SWF file's variables and functions.
- SWF files written in ActionScript 1.0 or 2.0 cannot load SWF files written in ActionScript 3.0. This means that SWF files authored in Flash 8 or Flex Builder 1.5 or earlier versions cannot load ActionScript 3.0 SWF files.
The only exception to this rule is that an ActionScript 2.0 SWF file can replace itself with an ActionScript 3.0 SWF file, as long as the ActionScript 2.0 SWF file hasn't previously loaded anything into any of its levels. An ActionScript 2.0 SWF file can do this through a call to loadMovieNum(), passing a value of 0 to the level parameter.

Similar Messages

  • Strange behaviour loading swf

    hello, i'm trying to load external swf in my main swf.
    when I click first time in first frame on object(movieClip)
    which has event handler gotoJob, the jobfair.swf will load and it
    works. But I have on the stage in first frame also another objects
    - movieClips. If I click on some movieclip, than it means to go to
    nextFrame. But when I return to first frame, where is also object
    with click handler gotoJob and I click on it, it does not load the
    swf. It looks like a bug, i need immediately help please.

    I tried some solutions (look at attach code..) and it seems
    to work, but not properly,
    it loads swf everytime, but after clicking on another
    movieClip and returning to 1 frame it seems that :
    loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,
    process);
    loader.contentLoaderInfo.addEventListener(Event.INIT,
    finished);
    are not working, actions which are in functions process and
    finished are not executed...
    i find some similar problem on web:
    "I have investigated that when another MC is loaded, it
    causes reset on root clip, issuing ENTER_FRAME event, and just
    after it code in the first frame executed again. There is more
    strange behavior, code written in the loaded MC (directly in
    frames) IS NOT EXECUTED."
    Is there someone who meet with this? could someone please
    explain that?

  • Loading external swf movie to website - AS3

    Hi, once again I am stuck because of AS3, it was sooo easy to load external swf in as2.
    I have a very simple website where HOME does not want the external swf to show but all other pages should have the swf running as a main banner on left hand side.
    My site is built with labels - if you click on any other page except "HOME" the swf should load and stay loaded while navigating on the "following pages",  and when you navigate back to "HOME"the banner should unload.
    Should be easy right? I browse the Internet for 2 days and find millions of code, but nothing that works.
    Do I need a Loader placed on the following pages or an empty movie clip (with an instance name?)
    I tried the below, but it only loads if you click on button "l'ambition" first, since this is the frame where the code is placed, and it is of course not unloading on "HOME. I have a keyframe on label "ambition" where I have a Loader box and the code (both running all over the following pages.
    var request:URLRequest = new URLRequest("main_movie_241x700.swf");
    var loader:Loader = new Loader()
    loader.load(request);
    addChild(loader);
    Do I need an EventListener?
    Anyone...? Please hand me complete code since that will help me a lot. You can see the test site here: http://www.gattadesign.fr/CSD/index.html
    Thanks in avance!
    Anna Gatta

    Thanks for taking your time! Much appreciated.
    I like not complicated :-)  So it is now loading from the start - stretching over the whole timeline. How do I controll the visibility during the "HOME" = that is invisible?
    This is the code I use to load the external swf:
    var Xpos:Number=0;
    var Ypos:Number=0;
    var swf:MovieClip;
    var loader:Loader=new Loader();
    var defaultSWF:URLRequest=new URLRequest("main_movie_241x700.swf");
    loader.load(defaultSWF);
    loader.x=Xpos;
    loader.x=Ypos;
    addChild(loader);

  • Play Pause  as2 swf Movie from As3swf Movie

    Ihave create one as3 flash file.That file loads as2 swf movies. Ineed Control like (play,pause,gotoAndstop)from as3 flashMovie. Is it posssible?

    Virtual Machines (VM)s run SWFs files. AS3 and AS2 have completely separate VMs. Thus they cannot directly talk to each other because they're running as if they're 2 completely separate applications.
    As mentioned you can use the localconnection class to communicate to any process listening. You'll need to have your AS2 documents listening for commands from your AS3 document to do what you want to do.

  • Tweens don't work in multiple external AS2 SWFs loaded by AS3 SWF

    When I try to load a single external AS2 SWF in an AS3 parent
    SWF, scripted tweens using the mx.tween class work fine. However,
    when I load two or more external AS2 SWFs, the first will work, but
    in subsequent SWFs the tweens do not animate. Does anyone have a
    solution?
    Related post:
    http://www.actionscript.org/forums/showthread.php3?t=147637

    SymTsb,
    So what is the code to do that? To delete the TWEEN variable?
    easeTime = .5;
    var day_handlerX:Tween = new
    mx.transitions.Tween(daynightlabel_mc, "_x",
    mx.transitions.easing.Regular.easeOut, daynightlabel_mc._x,
    (left_point+daynightlabel_mc_leftDifference), easeTime, true);
    day_handlerX.onMotionFinished = function() {
    trace("day_handlerX="+day_handlerX);
    trace("day_handlerX onMotionFinished triggered");
    delete day_handlerX;
    trace("deleted day_handlerX="+day_handlerX);
    does not work. the TWEEN object is still there.
    Can ADOBE say something??
    AS3 is ...

  • Loading an AS2 swf into a AS3 project?

    I have an AS2 swf that is merely an image gallery made with a few components. I tried loading this swf into an AS3 project I am working on and it seems to load in and play properly in my AS3 file. I'm not looking to communicate with the AS2 swf with AS3 code, I just want to display it and be able to use the component buttons in the AS2 file that play or stop the images from being played.  I was wondering if using this will cause any potential issues in my AS3 project. It seems to render and work fine on my machine. Thanks

    as2 swfs will play without problem when loaded into an as3 swf.

  • Unloading SWF movie

    Hi,
    I've been working on a CD-Rom presentation with Flash and so
    far I was mostly using AS1 and AS2 to built it. I started to learn
    some AS3 for a part of the presentation but now I'm running into
    issue, here's the main one:
    I'm loading different SWF movie one on top of the other, and
    unloading them as needed, now this is very easy with AS1 (loadmovie
    and unloadmovie function are simple to use), but when I'm loading
    my file built with AS3 I can't figure out how to unload it. The AS3
    movie is loaded on the Level 5, I just want to make sure that when
    I'm unloading the file it's not unloading everything else.
    Can anyone help me.
    Yann Poirier

    Disregard, I found my answer

  • Keep image size unchanged when fullscreen the swf movie

    Hi,
    i am including a image on SWF file (using Flash CS4) i want images to keep its original dimension whether user fullscreen the SWF movie or play it on windows.
    currently i do not have any action script or coding on my .fla file. when i publish the movie and fullscreen it, the image i put in fla file get all stretched out and blur. Please help me to figure out how to keep the dimension unchanged.
    Thank you

    All you have to do is to set the scalemode of the stage to "noscale"
    In AS3 add the following code:
    import flash.display.StageDisplayState;
    stop();
    stage.displayState = StageDisplayState.FULL_SCREEN;
    stage.scaleMode = StageScaleMode.NO_SCALE;
    There is a similar code for AS2, i think infact its the same this
    Stage.scaleMode = "noScale";
    Thanks
    Karthik
    P.s. if this post is helpful, please change the thread to answered.

  • Strange behaviour in Mail

    I have ongoing strange behaviour with Mail in Mountain Lion on a MacBook Pro.
    As well as randomly and intermitttently dropping connections to my various mail servers, I also, randomly and intermittently, fail to get to Print, or to create a new Mailbox, or to Quit. I just get a beep.
    Have to quit Mail - sometimes forcibly, and restart it.
    Mail will not automatically reconnect to servers after a Sleep , or moving to a differnt location.
    None of this was happenning on an older MacBook, but I was running 10.7 on that machine.
    Had to upgrade machine to allow upgrade to Mountain Lion.  Not sure which is responsible - new MB PRo , or 10.8?!
    Do I really have to re-install OSX  just to reinstall Mail?
    Any other pointers/hints very welcome.
    Thanks

    Please follow these directions to delete the Mail "sandbox" folder.
    Back up all data.
    Triple-click the line below on this page to select it:
    ~/Library/Containers/com.apple.mail
    Right-click or control-click the highlighted line and select
    Services ▹ Reveal
    from the contextual menu.* A Finder window should open with a folder named "com.apple.mail" selected. If it does, move the selected folder — not just its contents — to the Desktop. Leave the Finder window open for now.
    Log out and log back in. Launch Mail and test. If the problem is resolved, you may have to recreate some of your Mail settings. You can then delete the folder you moved and close the Finder window. If you still have the problem, quit Mail again and put the folder back where it was, overwriting the one that may have been created in its place. Post your results.
    Caution: If you change any of the contents of the sandbox, but leave the folder itself in place, Mail may crash or not launch at all. Deleting the whole sandbox will cause it to be rebuilt automatically.
    *If you don't see the contextual menu item, copy the selected text to the Clipboard (command-C). In the Finder, select
    Go ▹ Go to Folder...
    from the menu bar, paste into the box that opens (command-V). You won't see what you pasted because a line break is included. Press return.

  • Strange behaviour when placing text frame on top of image

    Hi,
    Win XP, FM 8.04
    I have a front cover that consists of a TIF image that bleeds off the page. On top of that image I want to put a text frame with the book title.
    The strange thing is that when I create the text frame and use the toolbar buttons to nudge it down on the page, the text (but not the frame) suddenly jumps to a totally different place way down on the page, despite only nudging it, say, 10 mm.
    Any ideas why this is happening?
    /Mats

    Hi,
    Partly solved:
    After some tests, it seems FM does not like when you try to move a text frame over a transparent area in an image. The image in question was made by importing a PDF into Photoshop, then saving as TIF. Since the PDF contained an area that was had full transparency in InDesign (i.e. "Paper"), that area was also in the TIF image.
    The strange behaviour starts exactly at the border where the transparency starts. In non-transparent areas, there is no problem.
    Seems like a bug.
    /Mats

  • RE: Strange behaviour by OSX Mail in Yosemite

    Strange behaviour by OSX Mail in Yosemite
    I sent an email to a friend with pix and a pdf attachment from my gmail account
    I had to ffwd the same email to someone else. I press the ffwd button and type in my new friends address
    Strangely mail sends it to both of them (ie the first and the 2nd friend) despite me removing all Forward comments and email address of my first friend from the address bar and the content field
    This is new!
    Couldn't find help on this anywhere

    The SMPT server keeps changing for email accounts,
    Try Mail/Preferences/Accounts /Account Information. Select an account, then go to Outgoing Mail Server (SMTP). From the drop down menu select Edit SMPT server list. Then set up a server for each mail account so that is associated with the e-mail address. Then go to each account and set that server as the Outgoing Mail Server (SMPT). You can click Use only this server if desired.
    You can also try this.
    Do a backup.
    Quit Mail.
    Go to Finder and select your user/home folder. With that Finder window as the front window, either select Finder/View/Show View options or go command - J.  When the View options opens, check ’Show Library Folder’. That should make your user library folder visible in your user/home folder. Go to Library/Containers/com.apple.mail.  Move the folder com.apple.mail to your desktop. You must move the entire folder, not just the contents.
    Restart, re-launch Mail and test. If the problem is solved, recreate any required Mail settings and import any emails you want to save from the folder on the desktop. You can then put the folder in the Trash. If the problem remains, return the folder to where you got it replacing the one that is there. 
    Information learned from Linc Davis. Thanks to leonie for some information contained in this.

  • ¿How i make a Browser Detect swf movie?

    Hi, i use a simple embed swf movie in one of many pages i own, but recently I build a new page in html5. But i tested in Internet Explorer and doesnt work well. What i need its a script code in AS3 to use in my swf movie that detect the browser and if the browser its IE9 load an old page, but if its other browser is like mozilla or chrome, load  the new page in html5.
    It is possible to do that in AS3 right?
    Thanks to all
    Firefawx 

    You can simply say "I want an animation to play before it decides which page to load" and we'd get it. So you want to show your logo animation.
    Use the tutorial link I gave you and look at the code. It is a full example of browser detection using both actionscript and javascript. ActionScript needs JavaScript to get the information on what browser it is. All of the information and code examples are there to show you how to detect the browser.
    Spanish translation:
    Usted puede simplemente decir "yo quiero una animación para jugar antes de que decida lo que se cargue la página" y que sería para nosotros. Así que usted quieremostrar su animación de la insignia.
    Utilice el enlace tutorial que te di y mirar el código. Se trata de un ejemplo completo dela detección del navegador utilizando tanto ActionScript y JavaScript. ActionScriptnecesita JavaScript para obtener la información del navegador que es. Todos los ejemplos de la información y el código están ahí para mostrar la forma de detectar el navegador.

  • Strange behaviour when running parameterized test

    Hello,
    I am using Flex 4.5 and FlexUnit 4.1 inside of the Flashdevelop IDE and I am experiencing some very strange behaviour.
    If I have 5 parameters to my test the test runs fine. When I add a sixth parameter of the type Array, I get the following error:
    "TypeError: Error #1009: Cannot access a property or method of a null object reference."
    Please see below for my example code.
    The following parameterized test case runs without a problem:
    package {
        import org.flexunit.runners.Parameterized;
        [RunWith('org.flexunit.runners.Parameterized')]
        public class ParameterizedTest {
            [Parameters]
            public static var testData:Array = [
                [1,1,new Array(),1,1]
            public function ParameterizedTest(
                param1:uint,
                param2:uint,
                param3:Array,
                param4:uint,
                param5:uint
            ):void {
            [Test]
            public function testOne():void {
                // Test to go here.
    When I add an Array as the sixth parameter :
    package {
        import org.flexunit.runners.Parameterized;
        [RunWith('org.flexunit.runners.Parameterized')]
        public class ParameterizedTest {
            [Parameters]
            public static var testData:Array = [
                [1,1,new Array(),1,1,new Array()]
            public function ParameterizedTest(
                param1:uint,
                param2:uint,
                param3:Array,
                param4:uint,
                param5:uint,
                param6:Array
            ):void {
            [Test]
            public function testOne():void {
                // Test to go here.
    I get this error :
    com.berog.proj_drum_machine.tests.matrix_test_suite.test_cases::MatrixConstructorTest.test One (1,1,,1,1,) .
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
        at flex.lang.reflect::Constructor/newInstanceApply()[E:\hudson\jobs\FlexUnit4-Flex4.1\worksp ace\FlexUnit4\src\flex\lang\reflect\Constructor.as:253]
        at TestClassRunnerForParameters/createTest()[E:\hudson\jobs\FlexUnit4-Flex4.1\workspace\Flex Unit4\src\org\flexunit\runners\Parameterized.as:455]
        at org.flexunit.runners::BlockFlexUnit4ClassRunner/methodBlock()[E:\hudson\jobs\FlexUnit4-Fl ex4.1\workspace\FlexUnit4\src\org\flexunit\runners\BlockFlexUnit4ClassRunner.as:314]
        at org.flexunit.runners::BlockFlexUnit4ClassRunner/runChild()[E:\hudson\jobs\FlexUnit4-Flex4 .1\workspace\FlexUnit4\src\org\flexunit\runners\BlockFlexUnit4ClassRunner.as:152]
        at org.flexunit.internals.runners::ChildRunnerSequencer/executeStep()[E:\hudson\jobs\FlexUni t4-Flex4.1\workspace\FlexUnit4\src\org\flexunit\internals\runners\ChildRunnerSequencer.as: 82]
        at org.flexunit.internals.runners.statements::StatementSequencer/handleChildExecuteComplete( )[E:\hudson\jobs\FlexUnit4-Flex4.1\workspace\FlexUnit4\src\org\flexunit\internals\runners\ statements\StatementSequencer.as:141]
        at org.flexunit.internals.runners.statements::StatementSequencer/evaluate()[E:\hudson\jobs\F lexUnit4-Flex4.1\workspace\FlexUnit4\src\org\flexunit\internals\runners\statements\Stateme ntSequencer.as:109]
        at org.flexunit.runners::ParentRunner/run()[E:\hudson\jobs\FlexUnit4-Flex4.1\workspace\FlexU nit4\src\org\flexunit\runners\ParentRunner.as:483]
        at org.flexunit.runners::Parameterized/runChild()[E:\hudson\jobs\FlexUnit4-Flex4.1\workspace \FlexUnit4\src\org\flexunit\runners\Parameterized.as:273]
        at org.flexunit.internals.runners::ChildRunnerSequencer/executeStep()[E:\hudson\jobs\FlexUni t4-Flex4.1\workspace\FlexUnit4\src\org\flexunit\internals\runners\ChildRunnerSequencer.as: 82]
        at org.flexunit.internals.runners.statements::StatementSequencer/handleChildExecuteComplete( )[E:\hudson\jobs\FlexUnit4-Flex4.1\workspace\FlexUnit4\src\org\flexunit\internals\runners\ statements\StatementSequencer.as:141]
        at org.flexunit.internals.runners.statements::StatementSequencer/evaluate()[E:\hudson\jobs\F lexUnit4-Flex4.1\workspace\FlexUnit4\src\org\flexunit\internals\runners\statements\Stateme ntSequencer.as:109]
        at org.flexunit.runners::ParentRunner/run()[E:\hudson\jobs\FlexUnit4-Flex4.1\workspace\FlexU nit4\src\org\flexunit\runners\ParentRunner.as:483]
        at org.flexunit.runners::Suite/runChild()[E:\hudson\jobs\FlexUnit4-Flex4.1\workspace\FlexUni t4\src\org\flexunit\runners\Suite.as:151]
        at org.flexunit.internals.runners::ChildRunnerSequencer/executeStep()[E:\hudson\jobs\FlexUni t4-Flex4.1\workspace\FlexUnit4\src\org\flexunit\internals\runners\ChildRunnerSequencer.as: 82]
        at org.flexunit.internals.runners.statements::StatementSequencer/handleChildExecuteComplete( )[E:\hudson\jobs\FlexUnit4-Flex4.1\workspace\FlexUnit4\src\org\flexunit\internals\runners\ statements\StatementSequencer.as:141]
        at org.flexunit.internals.runners.statements::StatementSequencer/evaluate()[E:\hudson\jobs\F lexUnit4-Flex4.1\workspace\FlexUnit4\src\org\flexunit\internals\runners\statements\Stateme ntSequencer.as:109]
        at org.flexunit.runners::ParentRunner/run()[E:\hudson\jobs\FlexUnit4-Flex4.1\workspace\FlexU nit4\src\org\flexunit\runners\ParentRunner.as:483]
        at org.flexunit.runners::Suite/runChild()[E:\hudson\jobs\FlexUnit4-Flex4.1\workspace\FlexUni t4\src\org\flexunit\runners\Suite.as:151]
        at org.flexunit.internals.runners::ChildRunnerSequencer/executeStep()[E:\hudson\jobs\FlexUni t4-Flex4.1\workspace\FlexUnit4\src\org\flexunit\internals\runners\ChildRunnerSequencer.as: 82]
        at org.flexunit.internals.runners.statements::StatementSequencer/handleChildExecuteComplete( )[E:\hudson\jobs\FlexUnit4-Flex4.1\workspace\FlexUnit4\src\org\flexunit\internals\runners\ statements\StatementSequencer.as:141]
        at org.flexunit.internals.runners.statements::StatementSequencer/evaluate()[E:\hudson\jobs\F lexUnit4-Flex4.1\workspace\FlexUnit4\src\org\flexunit\internals\runners\statements\Stateme ntSequencer.as:109]
        at org.flexunit.runners::ParentRunner/run()[E:\hudson\jobs\FlexUnit4-Flex4.1\workspace\FlexU nit4\src\org\flexunit\runners\ParentRunner.as:483]
        at org.flexunit.runner::FlexUnitCore/beginRunnerExecution()[E:\hudson\jobs\FlexUnit4-Flex4.1 \workspace\FlexUnit4\src\org\flexunit\runner\FlexUnitCore.as:348]
        at org.flexunit.runner::FlexUnitCore/runRunner()[E:\hudson\jobs\FlexUnit4-Flex4.1\workspace\ FlexUnit4\src\org\flexunit\runner\FlexUnitCore.as:307]
        at org.flexunit.runner::FlexUnitCore/runRequest()[E:\hudson\jobs\FlexUnit4-Flex4.1\workspace \FlexUnit4\src\org\flexunit\runner\FlexUnitCore.as:283]
        at org.flexunit.runner::FlexUnitCore/runClasses()[E:\hudson\jobs\FlexUnit4-Flex4.1\workspace \FlexUnit4\src\org\flexunit\runner\FlexUnitCore.as:269]
        at Function/http://adobe.com/AS3/2006/builtin::apply()
        at org.flexunit.runner::FlexUnitCore/run()[E:\hudson\jobs\FlexUnit4-Flex4.1\workspace\FlexUn it4\src\org\flexunit\runner\FlexUnitCore.as:245]
        at com.berog.proj_drum_machine.tests::TestMain()[E:\Actionscript\projects\DrumMachine\src\co m\berog\proj_drum_machine\tests\TestMain.as:18]
    com.berog.proj_drum_machine.tests.matrix_test_suite.test_cases::MatrixConstructorTest.test One (1,1,,1,1,) E
    Time: 0.013
    There was 1 failure:
    1 com.berog.proj_drum_machine.tests.matrix_test_suite.test_cases::MatrixConstructorTest.tes tOne (1,1,,1,1,) TypeError: Error #1009: Cannot access a property or method of a null object reference.
        at flex.lang.reflect::Constructor/newInstanceApply()[E:\hudson\jobs\FlexUnit4-Flex4.1\worksp ace\FlexUnit4\src\flex\lang\reflect\Constructor.as:253]
        at TestClassRunnerForParameters/createTest()[E:\hudson\jobs\FlexUnit4-Flex4.1\workspace\Flex Unit4\src\org\flexunit\runners\Parameterized.as:455]
        at org.flexunit.runners::BlockFlexUnit4ClassRunner/methodBlock()[E:\hudson\jobs\FlexUnit4-Fl ex4.1\workspace\FlexUnit4\src\org\flexunit\runners\BlockFlexUnit4ClassRunner.as:314]
        at org.flexunit.runners::BlockFlexUnit4ClassRunner/runChild()[E:\hudson\jobs\FlexUnit4-Flex4 .1\workspace\FlexUnit4\src\org\flexunit\runners\BlockFlexUnit4ClassRunner.as:152]
        at org.flexunit.internals.runners::ChildRunnerSequencer/executeStep()[E:\hudson\jobs\FlexUni t4-Flex4.1\workspace\FlexUnit4\src\org\flexunit\internals\runners\ChildRunnerSequencer.as: 82]
        at org.flexunit.internals.runners.statements::StatementSequencer/handleChildExecuteComplete( )[E:\hudson\jobs\FlexUnit4-Flex4.1\workspace\FlexUnit4\src\org\flexunit\internals\runners\ statements\StatementSequencer.as:141]
        at org.flexunit.internals.runners.statements::StatementSequencer/evaluate()[E:\hudson\jobs\F lexUnit4-Flex4.1\workspace\FlexUnit4\src\org\flexunit\internals\runners\statements\Stateme ntSequencer.as:109]
        at org.flexunit.runners::ParentRunner/run()[E:\hudson\jobs\FlexUnit4-Flex4.1\workspace\FlexU nit4\src\org\flexunit\runners\ParentRunner.as:483]
        at org.flexunit.runners::Parameterized/runChild()[E:\hudson\jobs\FlexUnit4-Flex4.1\workspace \FlexUnit4\src\org\flexunit\runners\Parameterized.as:273]
        at org.flexunit.internals.runners::ChildRunnerSequencer/executeStep()[E:\hudson\jobs\FlexUni t4-Flex4.1\workspace\FlexUnit4\src\org\flexunit\internals\runners\ChildRunnerSequencer.as: 82]
        at org.flexunit.internals.runners.statements::StatementSequencer/handleChildExecuteComplete( )[E:\hudson\jobs\FlexUnit4-Flex4.1\workspace\FlexUnit4\src\org\flexunit\internals\runners\ statements\StatementSequencer.as:141]
        at org.flexunit.internals.runners.statements::StatementSequencer/evaluate()[E:\hudson\jobs\F lexUnit4-Flex4.1\workspace\FlexUnit4\src\org\flexunit\internals\runners\statements\Stateme ntSequencer.as:109]
        at org.flexunit.runners::ParentRunner/run()[E:\hudson\jobs\FlexUnit4-Flex4.1\workspace\FlexU nit4\src\org\flexunit\runners\ParentRunner.as:483]
        at org.flexunit.runners::Suite/runChild()[E:\hudson\jobs\FlexUnit4-Flex4.1\workspace\FlexUni t4\src\org\flexunit\runners\Suite.as:151]
        at org.flexunit.internals.runners::ChildRunnerSequencer/executeStep()[E:\hudson\jobs\FlexUni t4-Flex4.1\workspace\FlexUnit4\src\org\flexunit\internals\runners\ChildRunnerSequencer.as: 82]
        at org.flexunit.internals.runners.statements::StatementSequencer/handleChildExecuteComplete( )[E:\hudson\jobs\FlexUnit4-Flex4.1\workspace\FlexUnit4\src\org\flexunit\internals\runners\ statements\StatementSequencer.as:141]
        at org.flexunit.internals.runners.statements::StatementSequencer/evaluate()[E:\hudson\jobs\F lexUnit4-Flex4.1\workspace\FlexUnit4\src\org\flexunit\internals\runners\statements\Stateme ntSequencer.as:109]
        at org.flexunit.runners::ParentRunner/run()[E:\hudson\jobs\FlexUnit4-Flex4.1\workspace\FlexU nit4\src\org\flexunit\runners\ParentRunner.as:483]
        at org.flexunit.runners::Suite/runChild()[E:\hudson\jobs\FlexUnit4-Flex4.1\workspace\FlexUni t4\src\org\flexunit\runners\Suite.as:151]
        at org.flexunit.internals.runners::ChildRunnerSequencer/executeStep()[E:\hudson\jobs\FlexUni t4-Flex4.1\workspace\FlexUnit4\src\org\flexunit\internals\runners\ChildRunnerSequencer.as: 82]
        at org.flexunit.internals.runners.statements::StatementSequencer/handleChildExecuteComplete( )[E:\hudson\jobs\FlexUnit4-Flex4.1\workspace\FlexUnit4\src\org\flexunit\internals\runners\ statements\StatementSequencer.as:141]
        at org.flexunit.internals.runners.statements::StatementSequencer/evaluate()[E:\hudson\jobs\F lexUnit4-Flex4.1\workspace\FlexUnit4\src\org\flexunit\internals\runners\statements\Stateme ntSequencer.as:109]
        at org.flexunit.runners::ParentRunner/run()[E:\hudson\jobs\FlexUnit4-Flex4.1\workspace\FlexU nit4\src\org\flexunit\runners\ParentRunner.as:483]
        at org.flexunit.runner::FlexUnitCore/beginRunnerExecution()[E:\hudson\jobs\FlexUnit4-Flex4.1 \workspace\FlexUnit4\src\org\flexunit\runner\FlexUnitCore.as:348]
        at org.flexunit.runner::FlexUnitCore/runRunner()[E:\hudson\jobs\FlexUnit4-Flex4.1\workspace\ FlexUnit4\src\org\flexunit\runner\FlexUnitCore.as:307]
        at org.flexunit.runner::FlexUnitCore/runRequest()[E:\hudson\jobs\FlexUnit4-Flex4.1\workspace \FlexUnit4\src\org\flexunit\runner\FlexUnitCore.as:283]
        at org.flexunit.runner::FlexUnitCore/runClasses()[E:\hudson\jobs\FlexUnit4-Flex4.1\workspace \FlexUnit4\src\org\flexunit\runner\FlexUnitCore.as:269]
        at Function/http://adobe.com/AS3/2006/builtin::apply()
        at org.flexunit.runner::FlexUnitCore/run()[E:\hudson\jobs\FlexUnit4-Flex4.1\workspace\FlexUn it4\src\org\flexunit\runner\FlexUnitCore.as:245]
        at com.berog.proj_drum_machine.tests::TestMain()[E:\Actionscript\projects\DrumMachine\src\co m\berog\proj_drum_machine\tests\TestMain.as:18]
    FAILURES!!! Tests run: 1, 1 Failures:
    Can anyone help me?

    Actually, I do see what's wrong.
    When you call a method in the ActionScript universe, you can can usually do a function.apply() and pass it a variable number of args. Unfortunately, constructors are the one type of method where this doesn't work. You can't actually do an apply() so we have to fake it by having a map of static functions which each know how to apply a given number of arguments to the constructor. There is a check in the code that tests if the number of arguments you have exceeds what our static map knows how to apply.
    It looks like that check should have thrown the error:
    throw new ArgumentError("Sorry, we can't support constructors with more than " + argMap.length + " args out of the box... yes, its dumb, take a look at Constructor.as to modify on your own");
    It didn't and I am guessing its because there is a border condition here. So, what happening is that we only support up to 5 arguments right now. That number is arbitrary. When it was written it just seemed like a reasonable number, however, this class was written before Parameterized testing was introduced.
    Your three choices right now would be to use the TestNG style of Parameterized testing, which uses functions and not constructor args so it will not suffer this same fate, change the code and compile flexunit for yourself, or we could put a patched Constructor class in your project which fixes it. Longer term, I would like you to file a bug that we should increase the number to 10 or some other quasi-reasonable number. We will never be able to support an infinite number and we will always need to pick som arbitrary line in the sand. It just seems our line should be farther out.
    Mike

  • Strange behaviour of a JSlider in a menu

    Hi,
    I am currently developping an applet which draws a graph (with JUNG libraries) and allows modifications on this graph by actions on swing components. Among these components there was a JSlider which was working well and filtering the graph. As the actions panel took too much place in the window, I chose to create a menu that allows the same actions but via menu items. I have not encountered any problem until I have seeked a way to integrate the JSlider into the new menu. To do that I created a JSliderMenuItem class :
      public class JSliderMenuItem extends JSlider implements MenuElement {
        public JSliderMenuItem() {
                super(JSlider.HORIZONTAL, 1, 5, 1);
                setBorder(new CompoundBorder(new TitledBorder("Test"), new EmptyBorder(1, 1, 1, 1)));
                setMajorTickSpacing(1);
                setMinorTickSpacing(1);
                setPaintTicks(true);
                setPaintLabels(true);
            public void processMouseEvent(MouseEvent e, MenuElement path[ ], MenuSelectionManager manager) {}
            public void processKeyEvent(KeyEvent e, MenuElement path[ ], MenuSelectionManager manager) {}
            public void menuSelectionChanged(boolean isIncluded) {}
            public MenuElement[ ] getSubElements(  ) {
                return new MenuElement[0];
            public Component getComponent(  ) {
                return this;
        }In the code that builds the menu, I wrote :
    JSliderMenuItem slider = new JSliderMenuItem();
        filter_menu.add(slider);
        slider.addChangeListener(this);In the code that treats the actions, I wrote :
        public void stateChanged(ChangeEvent e){
            JSliderMenuItem source = (JSliderMenuItem)e.getSource();
            //if (!source.getValueIsAdjusting()){ // don't work since JSliderMenuItem
                if (source == slider){
                       // graph filtering according to the cutoff given by the JSliderMenuItem value
        }I have disabled the !source.getValueIsAdjusting() test because amazingly with JSliderMenuItem it considers that the knob is constantly being dragged... Moreover the knob is NOT draggable! In order to change the filter value I had to click on the label of my choice, then the knob moves until it reaches the right label, and at each encountered value during the process the graph is filtered.
    Even tough the graph is finally correctly filtered, it seems like the JSlider in the menu has lost its "slide/drag" abilities, and it's not very comfortable to use.
    Does anybody have an idea about this strange behaviour?
    Thanks!
    Edited by: cyblo on Jul 22, 2008 3:18 AM
    Edited by: cyblo on Jul 22, 2008 3:28 AM

    Change processMouseEvent and processKeyEvent in JSliderMenuItem like this:
    public void processMouseEvent(MouseEvent e, MenuElement path[],
            MenuSelectionManager manager) {
        super.processMouseMotionEvent(e);
        super.processMouseEvent(e);
    public void processKeyEvent(KeyEvent e, MenuElement path[],
            MenuSelectionManager manager) {
        super.processKeyEvent(e);
    }

  • Strange behaviour on a 3d layer

    Hi!
    I have been using AE for many years now but still seem to bump in to strange behaviour that I can't explain once in a while.
    This time it's about a composition that has several 3d-layers (shape layers) but no camera. When I try to scale the 3d-layers to make them larger by dragging a corner with selection tool, it actually shrinks the layer. It feels like everything is working in the opposite way it should. I also have spread the layers in z-space and for some reason layers with a bigger z-value seem to be _closer_ to the screen when usually positive values on z-axis will move the object further away and negative values closer to the camera. Is this simply happening because I don't have a camera in the scene or what could be causing this confusion?

    If you have offset the anchorpoint Z value to a negative number like -500, then you scale up the layer it will move away from the default camera. If the z offset is positive then the layer will move toward the camera as you scale the layer.
    I think that's what you've seeing. Make sure that your anchor point Z value is 0 and normal behavior should return.

Maybe you are looking for

  • Processo de atualização NFe Certificado

    Olá Experts, Nossos certificados NFE A1 vão expirar em breve. Eu tenho uma consulta sobre o processo de atualização. A nossa paisagem é: ECC -> NFE system -> SAP PI -> SEFAZ Temos duas entradas SSF no sistema de NFe (ZNFE01 & ZNFE02), tanto para os d

  • How can i assign view page name at run time in task flow

    Hi, jdev 11.1.2.3.0 I have a requirement to get view page (jsff page) dynamically. Ex: I have TF in that i have two views i.e view1 and view2. in view1  there is one inputtext and button in inputtext i will give the name of the page, In view2 that pa

  • Line size in Spool output

    Hi in spool, wen i get the out put only upto line 255 is getting printed.Rest are getting truncated.How can I change the line size.Can it be done through the programmimg.In report if we define line size then it is valid only for the foreground job an

  • Transport Controls (Playback) Not Working Premiere Pro CC 2014

    I've tried everything for the past couple of days and I can not seem to get my playback controls to work for Premiere Pro CC 2014. Help! Please!

  • Need Adobe reader for Mac OS 10.3 Panther

    Graffiti: I downloaded from the link you provided. Thanks for your attention, but my computer gives me the message that the "movie could not be opened". Either the Quicktime Player I have is insufficient, or they are not compatible. From the "win" in