Search:
Type: Posts; User: nicolanicola
Search:
Search took 0.02 seconds.
-
ok I think I get it. So if I store say level.brick inside an array in parent_mc.level, then what does it store? Because I thought if I was saying in my parent_mc removeChild(brick) that I am...
-
-
Think I'm missing a fundamental here with AS3. Another poster suggested all the bricks I am adding to my program should be added to an array for ease for looping rather than looping through all the...
-
-
I was just trying to call a function that had set up bonus_mc and added t the stage. The bonuses needed certain parameters such as the x value etc in order to add them. I wasn't trying to get a...
-
in fact ignore that, I missed a bracket off
-
I'm trying and it doesn't seem to like it. I'm guessing it's not possible?
:
bonus.addEventListener(Event.ADDED_TO_STAGE,addBonus(hitArray["xPos"],hitArray["yPos"])
-
Thank you. That makes life a whole lot easier :D
-
Thats great. I'm sure I tried it before and it didn't work though. Can I manually add them to the array eg myArray:Array = new Array(function1(),function2()...)
or do it do it by way of...
-
is it possible? I want to generate a random number and use that number to run whatever function appears at that index in the array. Is it possible?
-
Is there an event that tells you once the video has finished playing? have a look and if so, add a listener for that event then remove flv via the listener function.
-
..test one of about 100 bricks for a hit test from any object? I know the object it will be, but I don't want to be so specific as to say to the brick, this.parent.ball.
Hmm, what I could do I...
-
Thank you. That's a valuable bit of knowledge I have gained through the last 4 hours of nothing to show for work! That's great, it will no doubt help me structure things better and avoid future...
-
Ahhhhh I seeeeeee. So if there's a function in the constructor function that says addEvent() and it goes off to do that, it hasn't completed constructing yet, so the parent and stage are null until...
-
What I don't understand still though is, whilst my code works by only adding the keyEvent handlers once this has been added to the display list, if I call that same listener function (taking out the...
-
thank you times a million though for your help
-
You know what? I just seen in the paddle's parent function in the constructor function before I even created a new paddle, the words paddle.addEvent(). Oops, sorry for wasting your time! I cannot...
-
Yes, I just added it directly from the document class (previously I was adding it from one displayobject down from doc class) and it traced the stage no problem. I guess it's something to do with...
-
Just done that, no avail. Maybe it's a bug, although its a pretty massive big if so.
-
Yes I get null. I know, it doesn't make sense.
-
Yes, here is the whole thing. I only added addEvent in this one class
package {
import flash.display.*;
import flash.events.*;
public class Paddle extends MovieClip {
var left:Boolean;...
-
When I put comments around the code in addEvent the code all runs and the trace statement works. When its uncommented I just get TypeError: Error #1009: Cannot access a property or method of a null...
-
Can you see if there is something wrong with this snippet of code, because I am doing as you say, only adding keylisteners when item added to stage but I am still getting that null error:
...
-
Thanks for your help. I'll use that ADDED to stage listener to check whats going on.
-
No it should be on the display list. I traced this.parent and it displays it's parent. Also, the object is added to the stage when I export the swf, its just functionally it doesn't work.
|
Click Here to Expand Forum to Full Width
|