We are making a simple Flash game intended for mobile phones via Flash 5.5 using ActionScript 3.0.We are animating an array of objects vertically until they hit another object at the top of the stage.We instantiate each element of the array with one of 10 MovieClip animations.Each object has two event listeners; one to animate vertically and another to listen for a mouse click(which removes the object from the stage).We run into an issue when more than 10 objects are on the stage at one time.The issue is that the objects disappear sporadically and without explanation. We assume the problem is due to some type of memory/ garbage collection issue.Below is a snippit of our code that dispatches the MovieClip instances onto the stage.[code]What can we do in order for the MovieClips to not disappear?
lets say I have animated a car entering the stage area from outside the stage. When I render the SWF at first only the content on the onstage area is visible but if I resize/enlarge the window I can also see the car(content) lying outside the stage just like in the flash file. How can I make sure that no off stage content is visible at all in the final SWF?
I am a newb to Flash CS5 Pro, so I can't tell what is wrong. I have multiple objects on my stage that I copied to create afull effect. Most of the objects perform perfectly, but the ones on the edge of the stagedisappear when I export to video. When I zoom in to look at them, they are there,but when i zoom out to fit to page, they are gone
Im currently try to construct a flash presentation that will have several different buttons on the same stage, and each button when clicked will make particular objects appear on the stage. Then once each button is clicked again it will make the particular objects connected to it disappear from the stage. Each button and the objects it makes appear / disappear is seperate from all the other buttons actions.
construct the actionscript for this presentation as im finding it quite complicated to have several things going off on the same stage at the same time. Im currently working in Flash CS4 actionscript3.
The closest example i have seen to the program i would like to create can be found using the following link...[URL] However my program would be simpler, e.g. clicking the bun in the program just simply adds the bun to the screen, it doesnt scroll through different types of bun.
I have a 'room' movieclip with 4 frames each representing a different view (N,S,W,E). I have a different shape object in each frame. The shape objects all subclass a generic shape class and consequently disappear onClick. The problem is that they reappear when the frame is revisited. I've used event.target.visible = false in the generic shape class. I'm wondering if there is a way to 'permanently' remove them through the generic shape/parent class? I'm trying to avoid a rank of if functions and use a catch-all if possible.
I've created a jQuery plug-in that allows a selected panel of a web page to be pinned to the top of the browser view-port when the user scrolls a long page after passing a particular horizontal point on the page.When the panel is pinned or unpinned, a strange thing occurs: if a Flash SWF object is present as a descendant element of the container, the Flash object either restarts its animation or disappears completely.The pin or unpin change occurs when the CSS property "position" switches between fixed, absolute and static. This forces Firefox to redraw its elements and it causes the <object> to reload and reanimate the Flash movie. I read this post with interest:URL...
Does anyone know of a workaround that prevents the <object> tag from reloading? I admit the Flash is an ad, but this problem only occurs in Firefox. Although there are suggestions that this may be a bug, I have searched without success and I'm scratching my pate with a deadline fast approaching.
I am creating a miner game (where there are pieces of gold and you have to catch them with hook).I modified the Main class to take all children of MovieClip(root) that has name "Gold" and them put them in an Array(boulders[]) where later check collision (I design and put on stage several "Gold" MovieClips for every level). When the player collects all gold (when the boulders array.length <= 0) then goToAndStop(nextLevel), where again it takes the gold MovieClips from the stage and if it's name is == "Gold" then put's it in the boulder[].
What happened: On the first level(frame 2 cause frame 1 is the preloader) everything is good - I have 2 gold MovieClips on the stage(in design mode) and all 2 gold are put in the array and displayed.
On the second level I have 4 gold and only 2 of them are put in the array and displayed.
On the third level I have 7 golds designed on stage, but only 3 are displayed and put in the boulder array.
It's almost the previous count of the gold(on the previous frame) are subtracted from the count of the next frame gold movieclips.I am placing the Main.as code:
public function createLevel(){ nextLevel = this.currentFrame + 1; for (var i:uint = 0; i < MovieClip(root).numChildren; i++){[code]....
I'm attempting to learn flash using Adobe CS4. I've found some really good tutorials, but I can't use them because every time I draw something on the stage, the resultant drawing disappears immediately after I release the mouse. Since I can't see it, I can't select and manipulate it. I captured the behavior and stuck it on youtube. I don't have a mike on this system so there's no sound. [URL]. If I create the file with ActionScript 2.0 instead of 3.0, I get outlines of the objects, but not the objects themselves. That's not on the vid, but I'd rather use 3.0 anyway.
I'm trying to send small gradient circles across the stage and they somehow disappear around x 515. If I increase the size the problem goes away ( though increasing the size to 2px only make them go another 100 px x before disappearing). The problem does not exist with non gradient circles.Here is the code:
I have drawn colored rods which I have placed in the library and have put one of each on the stage with instance names likeblueRod_mc, etc.I place them around with time-line code like blueRod_mc.x = 300.0;I have now created an Actionscript class called Problem.I build a new object from Problem which I have called Riddle.But when I put blueRod_mc.x = 300.0 in a method (of Problem),I get the message that blueRod is not accessible.So I triedstage.blueRod_mc.x = 300.0;That did not work either.
I'm writing a web based flash app that's written entirely in AS3. I have objects on the screen as part of a GUI. I would like the user to be able to resize the window, or make it full screen. I would like everything to auto-scale with the resize, but also remain in the same relative position on the stage.
I am creating a program and have some objects that animate from off the stage to on the stage. When I run the program in the flash player the objects that are off stage are visible. Is there anyway to stop this from happening. I suppose I could create a layer with a frame in it that could cover the off stage objects, but I am just wondering if there is a better way.
have a bunch off mc's that are controllable through buttons and using the key controls, but i need to make it so they stay within a 600*600 area within the stage
Almost finished constructing a web site (my first) now suddenly, in all the files, none of the objects are appearing on the stage only their registration points(the white circles right?). If I isolate the object it appears.
how would I go about creating a flash application that has the ability of extending beyond its object width and height on a page? I've seen those crazy flash ads which beg you to hover over them only to have it take over 3/4 of the page you are viewing. How are they doing that? Is it a combination of Javascript and Flash? Or, is it actually a really big stage that is somehow hidden in the HTML? Or (better yet) is there a magic way of pushing flash objects beyond the stage and out into the HTML?
I'm studying the code for a vertical shooter game that is given in the book "ActionScript Design Patterns 3.0." The author is explaining the factory pattern and so covers just that aspect of the code -- doesn't cover hit testing. I would like to figure out how to do hit testing for this example because it's similar to something I am planning.
The code for the game consists of 12 classes, abstract and concrete creator classes, abstract and concrete product classes and a Main class. These classes instantiate the ship and weapon objects at various points in their execution. I made a separate Collision class and I'm trying to find all the objects on the stage using this Collision class so I can hit test them with each other. Here's my code:
Is there a way to fix this code so I can access objects on the stage? Am I missing a cast somewhere? Or do I need a different approach to find objects on the stage in a multiclass game?
I have a problem with this code:[code]There are two overlapping objects on my stage: character_mc and vanish_mc. As soon as i start the scene [Ctrl+Enter] vanish_mc is VISUALLY removed. But the code still sees a collision somehow. How can i Entirely remove the object vanish_mc?
I'd like to be able to access some objects which are on the stage before compile time (e.g. in my .fla file). I can do this fine from the document class using the names I've assigned to them, but I need to be able to do this from other classes (instantiated at runtime) too.
What is the best way to go about this? Can I use the stage variable (this isn't looking likely from what I've read so far) somehow? Or do I need to pass in references to these objects from my document class when I create the instances of the class that needs to access them?
I'm having an issue accessing items on the stage from some imported code. I found this topic that discusses the same issue... [URL]
I'm not sure I totally understand how to go about this. I don't understand how to make the object global so I can access it from any class. (I have the same problem with an array I'm working with).
I have exported a page from InDesign to FLA that contains an InDesign multi-state object (MSO) and when I bring it into Flash and export as a SWF, the MSP just cycles through all the contained images. There's an Adobe KB that states that this is a known issue and that ActionScript can be used to stop the MSO from cycling. Does anyone know the ActionScript used to stop this?
I increased the size of my stage to 1280 x 1024 and now objects on the periphery have disappeared. When I zoom in they appear, but when I zoom out or export the movie the objects in the center are there but the objects around the edge do not appear. If I add an object and drag it to the edge I can watch it disappear as I am dragging it, but when I zoom in it is there. I have no masks and I need to create the video at the higher resolution, so I cannot resize the stage smaller.
I would like to start drag objects which is located in stage.There is movie clips in the stage which also encloses so many objects.when i click on any of the object it should be startdraged..Do u have any solution?
addEventListener(MouseEvent.MOUSE_UP, targetMC); function targetMC(MouseEvent:Event):void {
I am using math.random to randomly drop objects from the top of the stage. I had it working with one object. But as I wanted to increase the number to 6 objects, I added the following code: But I am "stuck" and so are the 6 objects at the top of the stage.[code]...
Ok. So there are serveral methods to implement Collision detection like R-trees, Quadtrees, BSP trees Recursive Dimensional Clustering (RDC). Or maybe more.My problem is that I have about 6-8 enemies on stage, some of them moving some of them static and also I have the Hero who is shooting with three types of missiles at same time. So I get about 70-100 objects on stage at a time.My question is, which algorithm to use for this type of problem, and which is the common practice? Also which is the most efficient?I was thinking of implementing Quad trees but I read that thy can be slow, or I am wrong?
I have an object created visually. How should I refer to it from classes of other objects? MovieClip(this.root).someObj or stage.someObj or MovieClip(this.root).stage.someObj? And moreover, if I want to see which frame is current on the main timeline, why I cannot just check stage.currentFrame? Why there is no such property of the stage, currentFrame? It has timeline, right?
How would I go about looping through each object on the stage (that has been added through addChild()) and getting its properties (x, y, scaleX, scaleY) and adding it into an array?