Actionscript 3 :: Joining Sprites Together?
Nov 13, 2010
So created a Sprite to which I add other Sprites which are game tiles. Each tile is 60 x 60 px big. In result I've the Sprite with about 200 childs (those tiles).When I try to startDrag() the container sprite the lag when moving it is very noticeable..
Is there a way like to join the tile Sprites so the container would have only 1 child Sprite instead of 200? Because it lags so much probably cause it needs to move (change the x and y) all those 200 tiles.. Am I correct?In this case I can't use the cacheAsBitmap property, cause user can zoom in or zoom out the map..
View 3 Replies
Similar Posts:
Oct 6, 2009
So I'm making a flash slideshow of baby pictures for my wedding, and I made 3 separate files, however I would like them all to play one after the other without any interruptionsIs there a way to link them or should I just try to rebuild the 2nd and 3rd files into the 1st
View 1 Replies
Apr 27, 2011
how can I unite 15 swf files which placed in one folder to a one swf file? i tried all kindes of merging softwares like "Join (Merge, Combine) Multiple SWF Files Into One Software" and "WinMerge" without success and tried to convert swf to flv (cause i found other merging software for flv files) but again.I have CS5 so if i'll have to open Flash for this i will, though i'm trying to avoid that and even then i'm gonna need full instructions.
View 4 Replies
Jul 15, 2011
What i have on the stage are lots of balls each with there on name b1,b2,b3 etc. and i have something that is going to hit it with hitTest.
Insted of hardcoding all the balls into the hitTest i want to have a variable containing the first part of the objects name (_root.b) then add i on the the end and i would loop from 1 to how many balls are on the stage eg. 10.
so for my code at the moment I don't have a loop but using "i = 0"
Here is my code:
ActionScript Code:
onClipEvent (enterFrame) {
i = 1;
j = "_root.b"+i+".ball2";
[Code]......
When i trace "mcName" it shows "_root.b1.ball2" which is the correct object, but the hitTest doesn't seem to see it and fails.
If i put mcName as "_root.b1.ball2" (hardcoding it) it works.
Ive tried so many different tweaks and just can't seem to get it to do it.
View 1 Replies
Jan 28, 2009
i know i've seen this before, maybe on that flash experimental math site that was all black and white and had a picture of a kid swatting at some molecular looking flies? anyone remember the name of that/well anyway, what i'm trying to pull off here is like a circle of some sort, all of sudden growing a small little circle and then both of them dividing, or possibly, a two circles(modules, atoms, particles) join to be one.
View 2 Replies
Oct 20, 2004
I am trying to add two variables, but my AS is joining them
volume1=function(answer1){
aa=wtft*12;
aaa=wtin;[code]....
There is more to this script, but I cut it down to this in order to focus on the error, which results in a joining aa and aaa. i.e. aa=36 aaa=4 results in a=364, where what I want would be a=40
View 5 Replies
Apr 10, 2011
If I am to import an image and I wish to use it as a sprite or something like that; How do I remove the white areas? For example, if I was going to create a custom cursor or something like that, an I was to use this image: Image - how would I remove the white areas, so that they are transparent. I would also like to know if it is possible to set where the center of rotation in an image is?I do all my image work on Photoshop, if that is of any significance.
View 1 Replies
Oct 29, 2010
How do i add the same images to 2 sprites?The below code doesnt give an error but only adds the image to 1 sprite[code]...
View 2 Replies
Aug 12, 2010
I'm currently building a slideshow application using the MVC pattern, as it stands the application works by going to the next picture by clicking the photo or controlling the slides with a next/prev button.
i am trying to add additional navigation so that there are thumbnails of the images loaded with XML so the user can click the image and go straight to the image clicked on.
thats easy enough i could add buttons manually with thumbnails in them but it would tedious to update the photography or artwork when it comes to increasing or reducing the number of photos.
so what i plan is that ,when the application loads it reads and counts the images Thumnails in the XML file,then the AS3 generates thumbnail icons according to the amount of images counted in the XML File, then places them on the stage in a sequence next to each on the stage. as a sequence of thumnails with can then be used to navigate around the library with more control and is easy to update simply by changing the XML file.[code]...
View 0 Replies
Feb 12, 2009
How can insert sprites from the IDE? When I press f8 the only options are MovieClip, Buttons and Shapes. If I export to ActionScript I can change the class to Sprite, but I want to insert a Sprite directly from the IDE.
View 2 Replies
Feb 17, 2009
I am trying to do some scripting in flash. I have some sprites and need them to playing one by one in the main, one in each frame. Then when they are complete let the movie move on to the next frame. how can I do this?
View 1 Replies
Apr 27, 2009
I'm making a picture gallery. I have a thumbnail container, which contains a mask and a dynamically generated mc called "thumbnail_mc". Thumbnail_mc contains all the sprites of the thumbnails.When I click on a thumbnail, the thumbnail get's a glow filter added to it. Now, I want to remove all filters on all the other sprites before I apply that filter to the Sprite.
This is what I'm trying to do:
Code:
thumbnail_mc.children.filters = [];
How do I do that?
View 3 Replies
Sep 30, 2009
i um want to make a sprite flash movie but i cant afford flash cs4 or 8 so i only have mx heh.. >_> i guess im good at animation but im not as good as alvin earth worm or rpg fan but i want to be good as them is there any way to blur like they do in flash mx? it can be easy or hard i'll work as hard as i can to get it right
View 3 Replies
Aug 19, 2010
I'm creating visual effects using TweenLite, which currently only manages the tweens for me, can I also attach a sprite at a specific time? (using "delay")
Basically I want to use TweenLite to attach/remove sprites apart from just tweening existing objects.
View 1 Replies
Sep 28, 2010
I have a function that adds a player to a sprite containerwhen that player is clicked a hit test is done on the tiles surrounding that player that it can move to and put into an array.all that works fine.my problem is after I add more than one player to the stage I can only move the latest addition when I use MapInfo.player.x = (hexagon_width * .25) + hexagon_x_position-90;I thought if I used getChildByName I might get around making a custom event.but I get an Error #1009: Cannot access a property or method of a null object reference. when I use the code below
trace(MapInfo.getPlayer);// =MapInfo.player.name
var targetisplayObject = MapInfo.player.getChildByName(MapInfo.getPlayer);
target.x = (hexagon_width * .25) + hexagon_x_position-90;
[code].....
View 1 Replies
Jun 2, 2011
I just started learning AS3 I was just trying out something.To read values from xml and make a drop down menu. I reached only this far
Actionscript Code:
import flash.display.Sprite;import flash.text.TextField;import flash.events.MouseEvent;var i:Number = 0;var sp:Sprite = new Sprite();var sptxt:TextField = new
[code].....
View 7 Replies
Jun 3, 2011
What I am basically trying to do is Like,the yellow boxes are dynamically made,with Actionscript Code: new Sprite(); inside that red and blue are also made with new sprite(); with instance names yellow1(red1,blue10),yellow2(red2,blue2) etc... How can I refer to yellow1.red1?Like,these are dynamically made,and i dont know the limit,like say it adds on with each click,It will make Actionscript Code: 'yellow'+i and red+i etc... How can I refer to the ith sprite when the user clicks?Suppose the user clicks yellow5,I want a reusable code that will refer to yellow5.red5
View 1 Replies
Dec 25, 2008
I am having a problem. I created a UILoader and that UILoader loads an image. but when you click on a part of the image it will have to trigger another event.I tried to put a sprite or button in front but it won't work.
View 2 Replies
Apr 30, 2010
I'm having two problems. First off I'm trying to remove container0 on roll out, but I can't remove it from the outView function because it doesn't recognize it.
Second these functions load another image on top of the thumb0 and it disappears right away. I don't know why and I'm trying to stop it from loading 2 instances
var container0:Sprite;
var loader0:Loader;
var boolean0:Boolean = false;
[code].....
View 2 Replies
Jul 13, 2010
In the code:
[Code]...
I get the error: Scene 1, Layer 'Layer 1', Frame 1, Line 11 1119: Access of possibly undefined property spriteTwo through a reference with static type flash.display:Sprite. I can control child movieclips on the stage this way, so why can't I control sprites made in AS3 this way?
View 10 Replies
Nov 21, 2011
I'm designing a calculator-like application in Flash for a school IT project. I made the layout in photoshop, and want to lay out the buttons with sprites (was just on CSS so addicted to those things xD ). I've tried googling and have found something like you can use sprites like buttons (which is good), but I can't figure out how to apply bitmaps to sprite backgrounds vs. plain colors.
View 13 Replies
Dec 30, 2009
As of right now, I am trying to create a tiling effect for a game I am creating. I am using a tilesheet and I am loading the tiles to the sprite like so...
this.graphics.beginBitmapFill(tileImage);
this.graphics.drawRect(30, 0,tWidth ,tHeight );
var tileImage is the bitMapData. 30 is the Number of pixels to move retangle. then tWidth and tHeight is how big the rectangle is. which is 30x30 This is what I do to change the bitmap when I role over the tile
this.graphics.clear();
this.graphics.beginBitmapFill(tileImage);
this.graphics.drawRect(60, 0,tWidth ,tHeight );
I clear the sprite canvas. I then rewrite to another position on tileImage. My problem is.... It removes the old tile completely but the new tile positions farther to the right then where the old bitmap appeared. My tile sheet is only 90px wide by 30px height. On top of that, it appears my new tile is drawn behind the old tile. Is there any better way to perfect this. again, all i want is for the bitmap to change colors
View 1 Replies
Feb 1, 2010
Just curious, if I have a sprite on the stage with the alpha set to 0 does that take up just as much memory as a sprite that is visible? I imagine it does because it draws the sprite to the stage and then it has to set the alpha to zero.
View 1 Replies
Feb 8, 2010
Im having a hard time putting in my head on how would i go at making flash read a xml file (this part I have it going smooth) and then fromt hat elements put on the stage a sprite or a movieclip that is interactive.
To make it clear I want to load and display an image that when you press it it just creates another square beneath it with some text. I believe I have to interate the xml and then use each of the elements with a class and gettin that object onto the stage.
Im using flash builder and as3 and im looking just for pointing in the rigth direction,
View 1 Replies
Feb 11, 2010
How do I use the counter to trigger sprites? Need an example or idea to work from. I want the number values to load sprites. The value of the counter goes to a text field. I want each number value to have an "if" condition to play a sprite of a corresponding number.
[Code]...
View 2 Replies
Jun 15, 2010
I've been studying and using actionscript exclusively for too long, that I don't even know how to import a regular image into Flash and create a ready-made sprite that I can use in my APIs. What are the steps to create a sprite from an image asset in the library?
View 1 Replies
Sep 19, 2010
i created 5 pages, each of which contains several movie clips (text, graphics, forms, etc). There is one specific page however that contains autogenerated content via. sprites. If i happen to land on this page, the sprites will appear, but when i transition to another page, they are still there except for the non-sprite stuff (disappear). Im ripping my hair out on this one, i managed to get a few of the sprites to remove but some are still appearing. Below shows the layout of the one thats not being removed;
[Code]...
View 2 Replies
Nov 5, 2010
I'm trying to do something very simple: animate a bunch of sprites so that, no matter where they are on the stage, they all go toward a single point (in this case, the center of the stage).
It only works for some of them. Some of them just sit there. I can't figure out why. I think its got something to do with atan2 and the way I'm using it, but I'm not sure what.
[Code]...
View 1 Replies
Apr 30, 2011
First off I have this MXML:
<mx:Panel x="270" y="10" width="690" height="680" id="mainContainerPanel">
<mx:Canvas x="270" y="10" width="670" height="640" id="canvas" initialize="onInit()">
[Code]....
The circCentre Sprite never appears on screen and I don't understand how I can get it to appear.
View 1 Replies
Jan 21, 2009
im trying to use a mask on multiple sprites:[code]But the mask seems only to affect the last object, that i added to mask (righttxt). Is there a way to use the same mask for multiple sprites?
View 1 Replies