HitTestObject parameter must be null.

I create a game in which there are 4 buttons. The 4 buttons are baskets with labels of solids, liquids, gas and fire. When the button is clicked, the basket that keeps the catcher/character will change depending on what the button is clicked. The performance of the basket is now correct. I put the change in the animation of the basket inside the character/receiver movieClip and what I do, it's that when I clicked on the desired basket, I call the gotoAndPlay function. Now, my problem is on my hitTestObject. I want solid objects to be catch the solid objects only and so on. But whenever I clicked on the button, the shopping cart will change, but the receiver/character don't move because of this error. What should I do? >. <

Here is my code in hitTestObject:

public void moveObjects(e:Event) {}

for (var i: int = objects.length - 1; i > = 0; i--) {}

objects [i] there speed +=;

addChild (objects [i]);

If (items [i] .hitTestObject (catcher.mouth_mc_2)) {}

If (items [i] .typestr == 'solid') {}

score += 5;

soundfx_1.play ();

Catcher.mouth_mc_2.gotoAndPlay (9);

}

on the other

{

score = 5;

soundfx_2.play ();

Catcher.mouth_mc_2.gotoAndPlay (2);

}

If score (score < 0) = 0;

ScoreDisplay.text = String (score);

removeChild (objects [i]);

Objects.splice (i, 1);

}

ElseIf (objects [i] .hitTestObject (catcher.mouth_mc_3)) {}

If (items [i] .typestr == 'liquid') {}

score += 5;

soundfx_1.play ();

Catcher.mouth_mc_3.gotoAndPlay (9);

}

on the other

{

score = 5;

soundfx_2.play ();

Catcher.mouth_mc_3.gotoAndPlay (2);

}

If score (score < 0) = 0;

ScoreDisplay.text = String (score);

removeChild (objects [i]);

Objects.splice (i, 1);

}

ElseIf (objects [i] .hitTestObject (catcher.mouth_mc_4)) {}

If (items [i] .typestr == 'gas') {}

score += 5;

soundfx_1.play ();

Catcher.mouth_mc_4.gotoAndPlay (9);

}

on the other

{

score = 5;

soundfx_2.play ();

Catcher.mouth_mc_4.gotoAndPlay (2);

}

If score (score < 0) = 0;

ScoreDisplay.text = String (score);

removeChild (objects [i]);

Objects.splice (i, 1);

}

ElseIf (objects [i] .hitTestObject (catcher.mouth_mc_5)) {}

If (items [i] .typestr == 'fire') {}

score += 5;

soundfx_1.play ();

Catcher.mouth_mc_5.gotoAndPlay (9);

}

on the other

{

score = 5;

soundfx_2.play ();

Catcher.mouth_mc_5.gotoAndPlay (2);

}

If score (score < 0) = 0;

ScoreDisplay.text = String (score);

removeChild (objects [i]);

Objects.splice (i, 1);

}

ElseIf (objects [i] .hitTestObject (boundary)) {}

removeChild (objects [i]);

Objects.splice (i, 1);

}

Catcher.x = mouseX;

checkStageBorder();

}

}

check if objects exist before trying to use them in your hittest.  for example, you can use the following to search all your hittests except the limit.  How you manage the minting of the limit depends on more than one catcher.mouth_mc one exist at the same time:

public void moveObjects(e:Event) {}

for (var i: int = objects.length - 1; i > = 0; i--) {}

objects [i] there speed +=;

addChild (objects [i]);

for (var j: int = 2; j<>

{if (Catcher ["mouth_mc_" + j])}

If (items [i] .hitTestObject (catcher ["mouth_mc_" + j])) {}

If (items [i] .typestr == 'solid') {}

score += 5;

soundfx_1.play ();

Catcher ["mouth_mc_" + j] .gotoAndPlay (9);

}

on the other

{

score = 5;

soundfx_2.play ();

Catcher ["mouth_mc_" + j] .gotoAndPlay (2);

}

If (score< 0)="" score="">

ScoreDisplay.text = String (score);

removeChild (objects [i]);

Objects.splice (i, 1);

}

}

Tags: Adobe Animate

Similar Questions

  • TypeError: Error #2007: hitTestObject parameter must be null

    I make a game with AS3 and have only been doing for a week but I still get this problem and there is always something different every time. could someone help me. Here is the source code (image 2 of 3, where the main problem is on line 192):

    full of the error:

    TypeError: Error #2007: hitTestObject parameter must be null.

    at flash.display::DisplayObject/_hitTest()

    at flash.display::DisplayObject/hitTestObject()

    at collisionwallgame_fla::MainTimeline/greenwinZone()

    source code:

    import flash.events.Event;

    import flash.events.KeyboardEvent;

    import flash.display.Sprite;

    import flash.events.MouseEvent;

    Stop();

    var hero: Sprite = new Sprite;

    var characterSpeed:int = 7;

    var prevX:Number = 0;

    var prevY:Number = 0;

    Hero.x = 133.35;

    Hero.y = 188;

    addChild (hero);

    Keyboard movement

    stage.addEventListener (KeyboardEvent.KEY_DOWN, keyboardCommands);

    function keyboardCommands(e:KeyboardEvent):void

    {

    If (e.keyCode is Keyboard.LEFT)

    {

    Hero.x-= 5;

    }

    If (e.keyCode is Keyboard.RIGHT)

    {

    Hero.x += 5;

    }

    If (e.keyCode is Keyboard.UP)

    {

    Hero.y-= 5;

    }

    If (e.keyCode is Keyboard.DOWN)

    {

    Hero.y += 5;

    }

    }

    Wall collision detection

    stage.addEventListener (Event.ENTER_FRAME, wallblock);

    / * function resetXY (): void

    {

    trace (hero.x + "" + prevX);

    Hero.x = prevX;

    Hero.y = prevY;

    }*/

    function wallblock(e:Event)

    {

    If (hero.hitTestObject (wall1))

    {

    hero.x = prevX;

    hero.y = prevY;

    Hero.x += 7.5;

    }

    /*{

    resetXY()

    }*/

    If (hero.hitTestObject (wall2))

    {

    Hero.y-= 7.5;

    }

    If (hero.hitTestObject (wall3))

    {

    Hero.x += 7.5;

    }

    If (hero.hitTestObject (wall4))

    {

    Hero.y-= 7.5;

    }

    If (hero.hitTestObject (wall5))

    {

    Hero.y-= 7.5;

    }

    If (hero.hitTestObject (wall6))

    {

    Hero.y-= 7.5;

    }

    If (hero.hitTestObject (wall7))

    {

    Hero.y-= 7.5;

    }

    If (hero.hitTestObject (wall8))

    {

    Hero.x-= 7.5;

    }

    If (hero.hitTestObject (wall9))

    {

    Hero.y-= 7.5;

    }

    If (hero.hitTestObject (wall10))

    {

    Hero.x-= 7.5;

    }

    If (hero.hitTestObject (wall11))

    {

    Hero.y += 7.5;

    }

    If (hero.hitTestObject (wall12))

    {

    Hero.x-= 7.5;

    }

    If (hero.hitTestObject (wall13))

    {

    Hero.x-= 7.5;

    }

    If (hero.hitTestObject (wall14))

    {

    Hero.y += 7.5;

    }

    If (hero.hitTestObject (wall15))

    {

    Hero.y += 7.5;

    }

    If (hero.hitTestObject (wall16))

    {

    Hero.y += 7.5;

    }

    If (hero.hitTestObject (wall17))

    {

    Hero.x += 7.5;

    }

    If (hero.hitTestObject (wall18))

    {

    Hero.y += 7.5;

    }

    }

    adding in enemy sprites

    var enemySpeed:int = 2;

    var Enemy1:Enemyclass1 = new Enemyclass1;

    var Enemy2:Enemyclass1 = new Enemyclass1;

    var Enemy3:Enemyclass1 = new Enemyclass1;

    var Enemy4:Enemyclass2 = new Enemyclass2;

    var Enemy5:Enemyclass2 = new Enemyclass2;

    Enemy1.x = 187;

    Enemy1.y = 116;

    Enemy2.x = 271;

    Enemy2.y = 116;

    Enemy3.x = 349;

    Enemy3.y = 116;

    Enemy4.x = 219;

    Enemy4.y = 260;

    Enemy5.x = 309;

    Enemy5.y = 260;

    addChild (Enemy1);

    addChild (Enemy2);

    addChild (Enemy3);

    addChild (Enemy4);

    addChild (Enemy5);

    function cancel (): void

    {

    gotoAndStop (3);

    trace ("hit");

    removeChild (Enemy1);

    removeChild (Enemy2);

    removeChild (Enemy3);

    removeChild (Enemy4);

    removeChild (Enemy5);

    removeChild (hero);

    stage.removeEventListener (KeyboardEvent.KEY_DOWN, keyboardCommands);

    stage.removeEventListener (Event.ENTER_FRAME, wallblock);

    hero.removeEventListener (Event.ENTER_FRAME, enemyhit);

    }

    the code that you advance to the next screen)

    stage.addEventListener (Event.ENTER_FRAME, greenwinZone)

    function greenwinZone(e:Event):void

    {

    If (hero.hitTestObject (greenwinzone)) < = LINE 192

    {

    gotoAndStop (4);

    trace ("hit");

    removeChild (Enemy1);

    removeChild (Enemy2);

    removeChild (Enemy3);

    removeChild (Enemy4);

    removeChild (Enemy5);

    removeChild (hero);

    stage.removeEventListener (KeyboardEvent.KEY_DOWN, keyboardCommands);

    stage.removeEventListener (Event.ENTER_FRAME, wallblock);

    hero.removeEventListener (Event.ENTER_FRAME, enemyhit);

    hero.removeEventListener (Event.ENTER_FRAME, greenwinZone);

    }

    }

    enemy collision

    hero.addEventListener (Event.ENTER_FRAME, enemyhit);

    function enemyhit(e:Event):void

    {

    If (hero.hitTestObject (Enemy1))

    {

    Terminate();

    }

    If (hero.hitTestObject (Enemy2))

    {

    Terminate();

    }

    If (hero.hitTestObject (Enemy3))

    {

    Terminate();

    }

    If (hero.hitTestObject (Enemy4))

    {

    Terminate();

    }

    If (hero.hitTestObject (Enemy5))

    {

    Terminate();

    }

    }

    It seems that the function does not stop execution while it should.  I think I can see why, now that I have take a closer look.  You assign the event listener that calls this function for the stage (~ line 189), but then you try to remove this the hero event listener (~ line 205).

  • Error #2007: HitTestObject parameter must be non-null error comes if I'm going to another frame without success

    Error #2007: HitTestObject parameter must be non-null

    at flash.display::DisplayObject/_hitTest()

    at flash.display::DisplayObject/hitTestObject()

    but my hitTestObject works well in the frame 4 displays error when I goto another frame without hitting the object

    If I touched the subject, then I goto frame 1 this error does not appear. This means that the code made mandatory hit error otherwise. How to get rid of this

    var live: myscrew = new myscrew();

    addEventListener (Event.ENTER_FRAME, checkCollision);

    function checkCollision(event:Event) {}

    star test against crescent

    If (keys.hitTestObject (chest)) {}

    Screw.x = 100;

    Screw.y = 100;

    addChild (screw);

    removeChild (chest);

    }

    }

    This code used to goto frame 1.

    arrowtwo.addEventListener (MouseEvent.CLICK, fl_MouseClickHandler_two222);

    function fl_MouseClickHandler_two222(event:MouseEvent):void

    {

    gotoAndStop (1);

    }

    Remove the event listener before you change settings.

    removeEventListener (Event.ENTER_FRAME, checkCollision);

  • BPM deployment error: java.lang.IllegalArgumentException: Argument 0 for the @NotNull of oracle/bpm/project/interfaces/ConversationHelper.getReferenceNameFrom parameter must not be null

    Hey guys,.

    I get this error when I tried to deploy the process. Din could not do anything on the net

    java.lang.IllegalArgumentException: Argument 0 for the @NotNull of oracle/bpm/project/interfaces/ConversationHelper.getReferenceNameFrom parameter must not be null

    My composite application contains a certain number of processes. I added a BPEL process and then removed, but since then, appears it problems and could not deploy the composite application more. Any hint is appreciated.

    the entire stack trace is:

    Error when bean calling "domain manager": error deployment suitcase BPMN.
    error when trying to deploy the component BPMN "D:\oracle\domains\BPMSOA_DOMAIN\servers\BPM_1\dc\soa_6b5472e6-f4dc-4cd1-a7b5-c7b81f5e24ab" file the reported exception is: java.lang.IllegalArgumentException: Argument 0 for the @NotNull of oracle/bpm/project/interfaces/ConversationHelper.getReferenceNameFrom parameter must not be null

    This error was an exception thrown by the underlying deployment module.
    Check the trace for the exception in the log (the connection value level debug mode).
    ORABPEL-05250

    Suitcase BPMN deployment by mistake.
    error when trying to deploy the component BPMN "D:\oracle\domains\BPMSOA_DOMAIN\servers\BPM_1\dc\soa_6b5472e6-f4dc-4cd1-a7b5-c7b81f5e24ab" file the reported exception is: java.lang.IllegalArgumentException: Argument 0 for the @NotNull of oracle/bpm/project/interfaces/ConversationHelper.getReferenceNameFrom parameter must not be null

    This error was an exception thrown by the underlying deployment module.
    Check the trace for the exception in the log (the connection value level debug mode).

    at com.collaxa.cube.engine.deployment.DeploymentManager.deployComponent(DeploymentManager.java:202)
    at com.collaxa.cube.ejb.impl.CubeServerManagerBean._deployOrLoadComponent(CubeServerManagerBean.java:949)
    at com.collaxa.cube.ejb.impl.CubeServerManagerBean.deployComponent(CubeServerManagerBean.java:128)
    at sun.reflect.GeneratedMethodAccessor1654.invoke (unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
    at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
    at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at com.oracle.pitchfork.spi.MethodInvocationVisitorImpl.visit(MethodInvocationVisitorImpl.java:34)
    at weblogic.ejb.container.injection.EnvironmentInterceptorCallbackImpl.callback(EnvironmentInterceptorCallbackImpl.java:54)
    at com.oracle.pitchfork.spi.EnvironmentInterceptor.invoke(EnvironmentInterceptor.java:42)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at com.bea.core.repackaged.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)


    at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
    at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at com.bea.core.repackaged.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
    to com.sun.proxy. $Proxy345.deployComponent (unknown Source)
    at oracle.bpm.bpmn.engine.ejb.impl.BPMNServerManagerBean_6gbx7k_IBPMNCubeServerManagerLocalBeanImpl.__WL_invoke (unknown Source)
    at weblogic.ejb.container.internal.SessionLocalMethodInvoker.invoke(SessionLocalMethodInvoker.java:39)
    at oracle.bpm.bpmn.engine.ejb.impl.BPMNServerManagerBean_6gbx7k_IBPMNCubeServerManagerLocalBeanImpl.deployComponent (unknown Source)
    at oracle.fabric.CubeServiceEngine.load(CubeServiceEngine.java:923)
    at oracle.bpm.bpmn.engine.service.BPMNServiceEngine.load(BPMNServiceEngine.java:703)
    at oracle.bpm.bpmn.engine.service.BPMNServiceEngine.load(BPMNServiceEngine.java:157)
    at oracle.integration.platform.blocks.deploy.CompositeDeploymentConnection.deployComponents(CompositeDeploymentConnection.java:243)
    at oracle.integration.platform.blocks.deploy.CompositeDeploymentConnection.deploy(CompositeDeploymentConnection.java:94)
    at oracle.integration.platform.blocks.deploy.CompositeDeploymentManagerImpl.initDeployment(CompositeDeploymentManagerImpl.java:185)
    at oracle.integration.platform.blocks.deploy.CompositeDeploymentManagerImpl.load(CompositeDeploymentManagerImpl.java:63)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
    at oracle.integration.platform.blocks.deploy.DeploymentEventPublisher.invoke(DeploymentEventPublisher.java:86)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
    to com.sun.proxy. $Proxy438.load (unknown Source)
    at oracle.integration.platform.blocks.deploy.StandaloneCompositeDeploymentCoordinatorImpl.coordinateCompositeDeployment(StandaloneCompositeDeploymentCoordinatorImpl.java:67)
    at oracle.integration.platform.blocks.deploy.servlet.BaseDeployProcessor.deployNewComposite(BaseDeployProcessor.java:467)
    at oracle.integration.platform.blocks.deploy.servlet.BaseDeployProcessor.deploySARs(BaseDeployProcessor.java:268)
    at oracle.integration.platform.blocks.deploy.servlet.DeployProcessor.doDeployWork(DeployProcessor.java:203)
    at oracle.integration.platform.blocks.deploy.servlet.DeployProcessor.doDeployWork(DeployProcessor.java:147)
    at oracle.integration.platform.blocks.deploy.servlet.DeployProcessor.doDeploy(DeployProcessor.java:134)
    at oracle.integration.platform.blocks.deploy.servlet.DeployProcessor.process(DeployProcessor.java:100)
    at oracle.integration.platform.blocks.deploy.servlet.CompositeDeployerServlet.doPostInsideLoggingSession(CompositeDeployerServlet.java:221)
    at oracle.integration.platform.blocks.deploy.servlet.CompositeDeployerServlet.doPost(CompositeDeployerServlet.java:130)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    to weblogic.servlet.internal.StubSecurityHelper$ ServletServiceAction.run (StubSecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:301)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    to oracle.security.jps.ee.http.JpsAbsFilter$ 1.run(JpsAbsFilter.java:119)
    at java.security.AccessController.doPrivileged (Native Method)
    at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:324)
    at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:460)
    at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
    at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
    at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    to oracle.security.jps.ee.http.JpsAbsFilter$ 1.run(JpsAbsFilter.java:119)
    at java.security.AccessController.doPrivileged (Native Method)
    at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:324)
    at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:460)
    at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
    at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
    at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:163)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    to weblogic.servlet.internal.WebAppServletContext$ ServletInvocationAction.wrapRun (WebAppServletContext.java:3730)
    to weblogic.servlet.internal.WebAppServletContext$ ServletInvocationAction.run (WebAppServletContext.java:3696)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2273)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1490)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)

    The answer late, sorry it was a bug in the product, was fixed after you apply the hotfix.

    Cheers, nasser

  • Error #2007: Text parameter must be non-null.

    I'm currently testing a ranking of best scores, everything seems to work but I seem to be getting an error

    TypeError: Error #2007: text parameter must be non-null.

    to flash. text::TextField / set text()

    at prac2_fla::MainTimeline/pulse() [prac2_fla. MainTimeline::frame1:87]

    Here is the pastebin .fla

    The error is on line 87 as shown,

    http://pastebin.com/rs64PckT

    I played but just can't understand it, it is the last film in my game.

    All you have 87 online tries to target something that does not exist.  It is the 87 line as you now with some tracks that you added.

  • Help! : TypeError: Error #2007: url parameter must be non-null. in CS 5.5

    Hello

    Im doing some google ads on Flash CC but noted that google does not a flash drive which is above FP 10.1 so I saved to my Flash 5.5 and the encountered error tis swf files

    TypeError: Error #2007: url parameter must be non-null.

    Global / flash.net::navigateToURL()

    to MethodInfo - 1)

    I work in AS 3 CS 5.5 Mac and export to swf files in FP 9. I'm new on this point and im wondering if anyone can help me?

    Here is my code:

    Screen Shot 2014-02-07 at 10.59.23.png

    Thanks in advance!

    You shouldn't nest a function inside an event listener, let it stand on its own.  In addition, you should try to leave the variable stand alone to assign so that there is a better chance, she is ready when it is called. (these imports are not necessary if coded in the timeline)

    var url: String = root.loaderInfo, parameters.clickTAG as String

    clicktag.addEventListener (MouseEvent.CLICK, processCT);

    function processCT(event:MouseEvent):void {}

    navigateToURL (new URLRequest (url), "_blank");

    }

  • TypeError: Error #2007: url parameter must be non-null - HELP!

    Hey everybody. I (as well as everyone who posts a question here) am quite new to AS3. If I'm going crazy trying to figure out what is the cause of this error. I have a "jukebox" player that loads songs accordingly when the button is clicked. BUT it's my mistake:

    TypeError: Error #2007: url parameter must be non-null.

    to flash.media::Sound/_load()

    to flash.media::Sound/load()

    at lesson09_V2_S5_fla::MainTimeline/frame1()

    And here is my code:

    Import fl.events.SliderEvent;

    create instances of the three sound related classes that will be used for this project

    var snd:Sound;

    var channel: SoundChannel;

    var trans:SoundTransform;

    create variables to store the values for the power of the song and its volume and pan settings.

    var currSong:String;

    var currVol:Number is. 5;

    var currPan:Number = 0;

    Table of all songs in the current playlist.

    var songList:Array = new Array ("nothing on You.mp3","Grenade.mp3","Ride.mp3","Pretty Girl Rock.mp3","Tick Tock.mp3", "Dynamite.mp3");

    don't need to see the volume and pan controls until a song

    panSlide.visible = false;

    volSlide.visible = false;

    Headphones for the buttons of the song on stage

    song1.addEventListener (MouseEvent.CLICK, chooseSong);

    Song2.addEventListener (MouseEvent.CLICK, chooseSong);

    song3.addEventListener (MouseEvent.CLICK, chooseSong);

    song4.addEventListener (MouseEvent.CLICK, chooseSong);

    song5.addEventListener (MouseEvent.CLICK, chooseSong);

    song6.addEventListener (MouseEvent.CLICK, chooseSong);

    headphones for the volume sliders and pan

    panSlide.addEventListener (SliderEvent.CHANGE, panChange);

    volSlide.addEventListener (SliderEvent.CHANGE, volumeChange);

    sets the text of all the buttons of the song field to display the names of the songs in the songList array

    for (var i = 0; i < songList.length; i ++) {}

    var str:String = [i] songList have thong;

    Str = str.replace(".mp3","");

    var clip = this ["song" + (i + 1)] .title;

    clip. Text = str;

    }

    statement to define a song based on the song button was clicked switch.

    function chooseSong(e:MouseEvent):void {}

    Switch (e.currentTarget.name) {}

    case "song1:

    currSong = '... /MP3s/ ' + songList [0] as String;

    break;

    case "song2":

    currSong = '... /MP3s/ ' + songList [1] as String;

    break;

    case "song3":

    currSong = '... /MP3s/ ' + songList [2] as String;

    break;

    case "song4":

    currSong = '... /MP3s/ ' + songList [3] as String;

    break;

    case "song5":

    currSong = '... /MP3s/ ' + songList [4] as String;

    break;

    case "song6":

    currSong = '... /MP3s/ ' + songList [5] as String;

    break;

    }

    }

    If (snd! = null) {}

    Channel.Stop ();

    }

    SND = new Sound();

    SND. Load (new URLRequest (currSong));

    snd.addEventListener (IOErrorEvent.IO_ERROR, onError);

    function onError(e:IOErrorEvent):void {}

    Do nothing

    }

    Channel = new SoundChannel;

    TRANS = new SoundTransform (currVol, currPan);

    Channel = snd.play ();

    channel.soundTransform = trans;

    panSlide.visible = true;

    volSlide.visible = true;

    currVolume and pan values are used here for display in the text beside the sliders fields

    volLabel.text = "Current Volume" + int(currVol * 100);

    panLabel.text = "Current Pan" + int(currPan * 100);

    listen to the arrival of ID3 tags

    snd.addEventListener (Event.ID3, id3Handler);

    triggered when the id3 tags are available

    sets the info text field to display the information of the current song from id3 tags.

    function id3Handler(event:Event):void {}

    var id3:ID3Info = snd.id3;

    If (id3.songName! = null) {}

    songTitle.text = id3.songName + "\n";

    info. Text = "" Artist: \n"+id3.artist+"\n \n ";"

    info.appendText ("Album: \n" + id3.album);

    info.appendText ("\n\n" + "available at: \n" + "passionrecords \n.com");

    }

    }

    var format: TextFormat = new TextFormat();

    format.font = "Arial Black";

    format. Color = 0xFFFF00;

    format. Size = 14;

    format.url = " " http://www.passionrecords.com/ ";

    info.defaultTextFormat = format;

    uses the value of volume slider to control the volume

    function volumeChange(e:SliderEvent):void {}

    currVol = e.target.value;

    volLabel.text = "current Volume:"+ int(currVol*100); "

    TRANS.volume = currVol;

    channel.soundTransform = trans;

    }

    uses pan value of the slider to control pan

    function panChange(e:SliderEvent):void {}

    currPan = e.target.value;

    panLabel.text = "Current Pan" + int(currPan*100);

    TRANS. Pan = e.target.value;

    channel.soundTransform = trans;

    }

    Any help would be greatly appreciated! Thank you!

    This looks to another case of code not be placed where it should be.

    If this code is not in a function, then it executes immediately when the program starts.  At this point, snd is not defined, no said.  You do not create the instance until the line... snd = new Sound();   that, I believe, you have now moved inside a function.

    You might have to go through all the code to see what parts you always floating around this need of houses inside functions.

  • ActionScript 3 + PHP: TypeError: Error #2007: text parameter must be non-null.

    HI - still new to flash as3 and php.

    This is a page of contact form - user highlights information - I'm to receive their information to an e-mail address

    so the get variables sent from php to the .swf file.

    I got these errors and not knowing how to fix them.

    any help would be appreciated. Thank you in advance, really.

    Here are the errors in flash - as3 - and configuration of php code code.

    errors:

    ActionScript 3 + PHP: TypeError: Error #2007: text parameter must be non-null:

    to flash. text::TextField / set text()

    at kwangjaekim_fla::wholeform_16/completeHandler()

    at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()

    at flash.events::EventDispatcher/dispatchEvent()

    at flash.net::URLLoader/flash.net:URLLoader::onComplete()

    My as3 code is the following:

    construct the name of the variable for the loader Variables URLS

    var variables: URLVariables = new URLVariables();

    Build the varSend variable

    var varSend:URLRequest = new URLRequest ("contact_parse.php");

    varSend.method = URLRequestMethod.POST;

    variable = varSend.data;

    Build the varLoader variable

    var varLoader:URLLoader = new URLLoader;

    varLoader.dataFormat = pouvez;

    varLoader.addEventListener (Event.COMPLETE, completeHandler);

    Manager for the realization of PHP script and the return of the status

    function completeHandler(event:Event):void {}

    value is cleared to «»

    name_txt. Text = "";

    contact_txt. Text = "";

    msg_txt. Text = "";

    Load the PHP here answer

    status_txt. Text = event.target.data.return_msg;

    }

    Add the submit button click event listener

    submit_btn.addEventListener (MouseEvent.CLICK, ValidateAndSend);

    function ValidateAndSend

    function ValidateAndSend(event:MouseEvent):void {}

    field validation

    {if(!name_txt.) Length)}

    status_txt. Text = "Please enter your name";

    } else {if(!contact_txt.length)

    status_txt. Text = "Please enter your Contact details";

    } else {if(!msg_txt.length)

    status_txt. Text = "Please enter your Message";

    } else {}

    loan form for sending variables

    variables.userName = name_txt.text;

    variables.userContact = contact_txt.text;

    variables.userMsg = msg_txt.text;

    Send data to PHP now

    varLoader.load (varSend);

    submit_btn.addEventListener (MouseEvent.CLICK, function() {MovieClip (parent) .gotoAndPlay (151)});

    } / / Close another condition to handle errors

    } / / Close accept and send service

    my php code is:

    <? PHP

    Create local variables of PHP from the info the user given in the form of Flash

    $senderName = $_POST ['userName'];

    $senderEmail = $_POST ['userContact'];

    $senderMessage = $_POST ['userMsg"];

    Strip slashes on local variables

    $senderName = stripslashes ($senderName);

    $senderContact = stripslashes ($senderContact);

    $senderMessage = stripslashes ($senderMessage);

    //!!!!!!!!!!!!!!!!!!!!!!!!!     change this to my email address!

    $to = "put iny me email address ';

    Put the Email address of the sender here

    $from = "$senderContact";

    $subject = "your site contact";

    Start the HTML e-mail Message

    $message = < < < EOF

    < html >

    < body bgcolor = "#FFFFFF" >

    < b > name < /b > = $senderName < br / > < br / >

    < b > Contact < /b > = < a href = "mailto:$senderContact" > $senderEmail < /a > < br / > < br / >

    < b > < /b > Message = $senderMessage < br / >

    < / body >

    < / html >

    EXPRESSIONS OF FOLKLORE;

    end of message

    $headers = "from: $from\r\n;

    $headers. = "content-type: text/html\r\n";

    $to = "$to";

    mail ($ $subject, $message, $headers);

    Exit();

    ? >

    Thank you once again

    Jay

    As I said, the PHP is not the value you are trying to assign to the text property of the textfield status_txt.  If you try to assign an undefined value.  Somewhere in your PHP, you do an echo of this value...

    echo "return_msg is whatever the message ';.

  • TypeError: Error #2007: child parameter must be non-null.

    Hello

    I'm new to actionscript 3.0, I have Adobe Flash Builder installed 4.7 and I create a project (file-> new-> ActionScript project) ActionScript named Test. As you know flash builder does not include default fl.controls package. I added this package to my project as a file path or CFC source so that I can use the default components (e.g. buttons, radio buttons, checkboxes) and I'm writing the following code.

    package

    {

    import flash.display.Sprite;

    Import fl.controls.Button;

    [SWF (width = "640" height = "480", frameRate = "60", backgroundColor = "#FFFFFF")]

    SerializableAttribute public class Test extends Sprite

    {

    private var btn:Button;

    public void Test()

    {

    BTN = new Button();

    BTN.label = "CLICK ME!";

    BTN.x = 100;

    BTN.y = 100;

    addChild (btn);

    }

    }

    }

    I'm creating an instance of fl.controls.Button in the Test class and try to add it on stage. When I run the project, it always gives me the following error from the red line "BOLD".

    TypeError: Error #2007: child parameter must be non-null.

    at flash.display::DisplayObjectContainer/addChildAt()

    to fl.controls::BaseButton/drawBackground() [C:\Program Files (x 86) \Adobe\Adobe Flash CS5.5\Common\Configuration\Component Source\ActionScript 3.0\User Interface\fl\controls\BaseButton.as:615]

    to fl.controls::LabelButton/draw() [C:\Program Files (x 86) \Adobe\Adobe Flash CS5.5\Common\Configuration\Component Source\ActionScript 3.0\User Interface\fl\controls\LabelButton.as:724]

    to fl.controls::Button/draw() [C:\Program Files (x 86) \Adobe\Adobe Flash CS5.5\Common\Configuration\Component Source\ActionScript 3.0\User Interface\fl\controls\Button.as:191]

    to fl.core::UIComponent/callLaterDispatcher() [C:\Program Files (x 86) \Adobe\Adobe Flash CS5.5\Common\Configuration\Component Source\ActionScript 3.0\User Interface\fl\core\UIComponent.as:1511]

    Please help me get rid of this problem. Thanks in advance.

    Thank you

    momersaleem

    If you think that the bold line is the cause of the error due to the error saying "addChildAt" is involved, this isn't the same command.

    The error looks more like she points to something in the Button class and there is a problem.

    Normally when you work in Flash, with the class of the component is not enough for a file to execute without werror.  You will also need to drag a button in the library so that the 'physical' entity is available in the file when you try to create a new instance... components are, after all, not created from code only.  They are objects that are made using pieces of graphics and textfields and buttons and all that was used to create them by hand.

    In short, I think that you are away from the Button object in the library and when the class file tries to run it does not find a piece of the puzzle that is coded.

  • All buttons in CS3 gives error #2007: child parameter must be non-null

    CS3 actionscript using all the buttons are used the following code. I tried it myself and used with CS3 and on livedocs examples.
    Here is the code of the button: *.

    Import fl.controls.Button;

    var myButton:Button = new Button();
    myButton.toggle = true;
    myButton.move (10, 10);
    myButton.addEventListener (Event.CHANGE, changeHandler);
    addChild (myButton);

    function changeHandler(event:Event):void {}
    trace ("button toggled (" selected: "+ event.currentTarget.selected +" ")" ");


    **************Error ***************************
    TypeError: Error #2007: child parameter must be non-null.
    at flash.display::DisplayObjectContainer/addChildAt()
    to fl.controls::BaseButton/fl.controls:BaseButton::drawBackground()
    to fl.controls::LabelButton/fl.controls:LabelButton::draw()
    to fl.controls::Button/fl.controls:Button::draw()
    to fl.core::UIComponent/::callLaterDispatcher()
    Button toggled (selected: true)

    Can someone help me fix this problem. I can't find Google, search livedocs, help, etc.

    Add the button component to your library.

  • CFHTTP: the trustAnchors parameter must be empty

    I'm a cfhttp call my main server to the report server. And it was working fine until a few days ago.

    But suddenly it started giving errors when I try to call http through cfhttp. This is the dump of the error:

    Charset [empty string]

    ErrorDetail I/O Exception: java.lang.RuntimeException: error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be empty

    FileContent connection failure

    Header [empty string]

    MimeType unable to determine the MIME type of the file.

    ResponseHeader

    struct [empty]

    StatusCode connection failure. Not available status code.

    Text YES

    Because this error only started to come all of a sudden. I feel it's because of the automatic update of java.

    I had seen a few keys to truststore related missing links, but nothing was not related to coldfusion.

    Anyone with the idea about it?

    Thanks in advance

    Java update to version the most recent servers solved my problem.

  • InvalidAlgorithmParameterException: the trustAnchors parameter must be empty

    Hello

    I am a newbie to vSphere Web Services SDK.

    I am trying to run the program SimpleClient.java programs examples provided with the SDK.

    I put all the required variables (JAVAHOME, AXISHOME, WBEMHOME, VMKEYSTORE). I had also executed the code Friday and it worked.

    After that, I turned off my computer.

    Today morning when I started working on the same code to try to run it, its gives me an exception like below:

    "An exception: Exception: org.apache.axis.AxisFault Message:;" nested exception is:

    "javax.net.ssl.SSLException: java.lang.RuntimeException: error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty.

    The way that I will carry out my code is as below:

    $. run.sh com.vmware.samples.general.SimpleClient - url https://& lt; IP & gt; : 8443/sdk - username & lt; user name & gt; -password & lt; password & gt;

    I'm absolutely blocked up in the present and am not able to understand the reason for the exception of tis.

    Please help me with this.

    Thank you very much in advance.

    Hello

    Please refer to the page of the guide of the installation developer No 16 & 17.

    Using - ignorecert, you can skip the server certificate verification.

    Run.bat com.vmware.samples.general.SimpleClient - url https://< IP >: 8443/sdk - username < username > - password <>password - ignorecert

    I hope this helps.

  • ORA-02069 global_names parameter must be set

    Gentlemen met,


    I am facing problem ora-02069 global_names parameter must be defined when I try to

    insert into t10@database1
    Select function_chk_date (to_date ('12-05-2011', ' dd-mm-yyyy')) of double;

    I saw a few global_names = true suggestion, but this affects on another link to db.

    If I'm on fire after the statement then the inserted rows.

    insert into t10@database1 values ('xuyz');

    so you can help me how to solve the error...

    I'll wait for your favorable reply...

    Salvation;

    Please see:

    ORA-02069 when you use a local function by updating a remote Table [ID 342320.1]
    ORA-02069 when you use a local function by updating a remote Table [ID 342320.1]

    Respect of
    HELIOS

  • ArgumentError: Error #2085: aliasName parameter must be non-empty string.

    HI -.

    I started having this error today for an application I am developing using FlashBuilder 4. Here is the stack trace full (the real appname replaced bold text):

    ArgumentError: Error #2085: aliasName parameter must be non-empty string.
    Global / flash.net::registerClassAlias()
    to _FlexInit$ /init ({appName}_)
    to mx.managers::SystemManager / http://www.Adobe.com/2006/Flex/MX/internal:kickOff ([E:\dev\4.0.0\frameworks\projects\fra mework\src\mx\managers\SystemManager.as:2620])
    to mx.managers::SystemManager / http://www.Adobe.com/2006/Flex/MX/internal:preloader_completeHandler ([E:\dev\4.0.0\frame works\projects\framework\src\mx\managers\SystemManager.as:2539])
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at mx.preloaders::Preloader/timerHandler() [E:\dev\4.0.0\frameworks\projects\framework\src\mx \preloaders\Preloader.as:515]
    at flash.utils::Timer/_timerDispatch()
    at flash.utils::Timer/tick()

    Looks like the the machine virtual flash tries to load and initialize my application, but fails. I can't understand why this is happening?  It worked last week.

    Few things that could change:

    (a) our company is updating the runtime flash to patch vulnerabilities that could have caused something? (I tried in FF, IE and Chrome... same err.)

    (b) my code updates... but I swear to you the necessary changes were made later in the screens... and this error occurs when the application is started.

    Enjoy all help/insight...thanks in advance.

    [s k]

    [RemoteClass(alias="com.abc.def.WorksGridRow")]

    If you use something like above in your application, then the path / of value is changed or the value of the alias is missing.

  • Child parameter must be non-null. Error #2007

    Hello world!

    I'm about to finish my game (A matching game cards) and I encountered a problem.

    The piece of code tha giving me the problem is:

    compare two cards
    If (firstCard.cardface == secondCard.cardface) {}
    var beginTime:int = getTimer();
    addEventListener (Event.ENTER_FRAME, removeMatch);
    function removeMatch(event:Event) {}
    milliseconds spent
    var timePassed:int = getTimer () - beginTime;
    calculate seconds
    var seconds: int = Math.floor (timePassed/1000);
    If (seconds == 1) {}
    remove a match
    removeChild (firstCard);
    removeChild (secondCard);
    Reset selection
    firstCard = null;
    secondCard = null;
    }
    }
    Add points
    gameScore += pointsForMatch;
    showGameScore();
    playSound (theMatchSound);
    cardsLeft-= 2; 2 cards less

    TypeError: Error #2007: Parameter child must be non-null.
        at flash.display::DisplayObjectContainer/removeChild()
        at Function/EasyDifficulty/clickCard/removeMatch()[C:\Users\Adi\Desktop\Playbook\Playbook Match Game\Project\EasyDifficulty.as:132]

    Above is the output error I get when clicking on two cards that are the same.

    What is the problem here... I can't fix perhaps because I worked for hours.

    Thanks in advance.

    The problem is probably due to you using an enterframe event continually calling this function.  You must remove this enterframe listener as soon as it has achieved its objectives, or else he will always try to remove objects that they have already been removed.

    You shouldn't bury this function inside the conditional.

    If the goal of all that is simply adds a slight delay before removing objects, you should consider using setTimeout or Timer class instead of using an enterframe scenario.

Maybe you are looking for