Am I missing something or it is just flash? Well I have a PlayerVideo which extends Sprite and have 3 children:1. flash.media.Video2. flash.display.Sprite as PlayPause button3. flash.display.Sprite as MuteUnmute buttonThe thing is that when I have video attached to PlayerVideo, button mouse events are not working, when not Sprite buttons are working okHave anybody ever had something similar ? Mybee some workaround?I have tried wrap with MovieClips and Sprites, but it is the same effect,
I am trying to get an image object from one sprite container and adding it to another sprite container. But when I use GetChildAt for this, it will remove the object from the parent sprite and place it inside the other.
I know this might seem like such an easy issue and I can't understand why I cant figure it out but none the less I can't and I've just about given up. Here's the issue:
I have a sprite container which is supposed to hold a bunch of thumbnails to videos. I am able to populate the container with all the videos and the whole works but obviously if I add a bunch of videos its going to exceed the size of the flash document so I need to add a UIScrollBar (which I did) now the scrollbars target is set to the container but isnt allowing me to scroll and if im correct this is because the container doesnt have a set height. So Im trying to set the height of this container but the second I try setting the height or even width all my thumbnails I used to be able to see are gone! It's as if the size is being set to 0 when its not I've even tried to set it to a specified size just to test and nothing.
I have stuck a bitmap into a display object container (Sprite). On a given mouse event (i.e. mouse click), I would like to display the x and y coordinates of the bitmap. However, I've realized upon clicking on the bitmap, the event is only recognizing the higher level Sprite container. I suspect this could be attributed to the simple fact that bitmaps are not InteractiveObjects.If it's I have attached the code. I am loading a master image and cloning it to produce a thumbnail image (bitmap). Mouse events with the container holding the master image recognize the image itself while the container holding the thumbnail only recognizes the Sprite container.
Code: var ldr1:Loader=new Loader(); var url1:URLRequest=new URLRequest("PhotoGallery0/picture0.jpg");
At the moment when I click on the continer sprite, both mouse events are bringing triggered, from the stage and the container sprite. How can I make it so I only get the object I'm clicking on and not the stage as well??
I have a brick class where I have created a rectangle using flash.display.graphics.I am using this brick class to create a grid of 10 X 10 in another class called grid using new brick() in a for loop.I have another class called ball where I have created a circle with flash.display.graphics.The problem is that I want to remove / destroy individual bricks when the ball hits the bricks on Event.ENTER_FRAME which is not happening.the error I get is shown only for the last brick that is created in a for loop.ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
at flash.display:isplayObjectContainer/removeChild() at grid/ball_movement()// my function in enter frame event The code I wrote in ENTER_FRAME is
I have a brick class where I have created a rectangle using flash.display.graphics.I am using this brick class to create a grid of 10 X 10 in another class called grid using new brick() in a for loop.I have another class called ball where I have created a circle with flash.display.graphics.The problem is that I want to remove / destroy individual bricks when the ball hits the bricks on Event.ENTER_FRAME which is not happening.the error I get is shown only for the last brick that is created in a for loop.[code]
I am trying to get an image object from one sprite container and adding it to another sprite container. But when I use GetChildAt for this, it will remove the object from the parent sprite and place it inside the other.
I am loading thumbs from an xml file and placing them into one container (sprite), which i later use for scrolling based on mouse position with this formula:
Well I'm starting to really enjoy AS3, my next question then is this: In AS2 I'd often remove all movieclips with something like this: PHP Code: for(var i: String in container) { container[i].removeMovieClip(); } Is there something similar in AS3 that I can do without resorting to maintaining an array of references to each child of my container?
I once saw an effect on a flash add I wanted to try make myself also - the cursor makes a vake that blur out and disapear, much like the vake of a plane, just faster. The problem is I need to remove the vake when it has faded out, or else it just stay in the background and fill up forever! I know there must be an easy way for this. Can some of you tell me the best way here? I have attached the fla-file and scripts. You see a comment where I try to put the code...
I am trying to spawn a sprite (which works correctly). But i cant seem to remove the sprite on mouseclick. I have my object called Cactus. It runs fine but returns an error when clicking.
I'm extending a Panel to build a custom component. Without knowing what this will contain later, how can I add a method to temporarily hide all contents and displaying an internal object (which is normally invisible) instead?
How do I remove all children from a display object container? I want to make sure that when I re-enter a particular frame that there are no imageLoaders loaded into my photoGallery.
I'm using a Timer to load a different swf (into Sprite) every couple of seconds, it works great but I can't get the previous swf removed before the next one loads, heres the code (I know, its really basic)
I have a map with various regions as movieclips. When you mouse over a region, a sprite appears containing xml data. Among this data is a hyperlink. I want the sprite to stay on the stage until one of two things happens:
- you mouseout of the sprite - you go to a new region
That seems to be the problem. I've successfully coded the program to remove the child if you mouseout of the sprite. But if you go to a new region, it makes a new sprite and now you have two sprites with xml data on the stage! If I remove the child when you mouseout of the region, then the sprite won't stay on the stage for you to click the hyperlink. How can I make the sprite stay on the stage until:
- you mouseout of the sprite - you mouseout of the region IF you aren't on the sprite
I'm trying to have a bullet Sprite remove itself from the stage once it is off the stage, but Flash keeps throwing #1009 errors at me. I've looked over the code several times and don't understand what's wrong.
Bullet code: package { import flash.display.Sprite; import flash.display.MovieClip; import flash.events.*; public class Bullet extends Sprite { private var bullet_direction; [Code] .....
Error message: Code: TypeError: Error #1009: Cannot access a property or method of a null object reference. at Bullet/DestroyBullet() at Bullet/BulletMovement()
Will try and explain this best I can. Basically, I have a scroller which displays thumbnail images. The images show up when a button is pressed. This is the code I have
I'm having problem with regards to getting the name of the inserted images inside the movieclip container.
My movieclip container is named "container", it followed this snippet:
[Code]....
Is it possible to get the exact name of the images instead of "instance147" or "instance175"? So that if i have inserted image with the name of apple.png, it will show:
| 1. name:apple.png type:object [object Loader]
By the way, i use FileReference to insert image to the stage.
Yes, another one of those pour souls attempting to escape the confines of AS2 and venturing into the AS3 world! I'm simply trying to dynamically add an image frame (imgframe) to the stage, sticking an image holder (imgholder) into the image frame mc and then loading an image into the image holder mc. Here's the code I've been using as a test, but it spits out errors saying that a term is undefined on "mainmask_mc.imgframe.addChild(imgholder);" code. I've tried changing it to various things, but nothing works.