I'm trying to make a movieclip move slower at a certent place in my movieclip. This means, that the speed needs to be lowered when e.g. showing af picture. Here is the situation. I have a movieclip running different pictures. E.g. the first runs for 115frames and fades out. Instead of runing 115 frames i want the movieclip to run 5 frames (picture fading in) and the stops or delays for 10sek and then goes to frame 6 from where the picture fades out. Where in the movieclip should i place this Action Script?
im trying to place a loader content (an swf which is an instance of the class "Nav") into a movieclip (so i can easily refer to its variables, for example, width) but when i trace the movieclip it throws null. why ?
Code: private function doneNav(e:Event):void { trace (navLoader.content);// [Object Nav]. fine! nav = navLoader.content as MovieClip;// null. why??
I have a main.swf in which i load a xml flash slideshow (.swf). I want to place a menu which will be shown in front of the slideshow gallery. I place the menu at an upper layer but the menu appears behind the slideshow. generally(i.e. in case i want to place something else on top or behind something else)
How do I move a movieclip that is in a place of x and y screen by dragging the mouse? Did not want to use the startDrag because he actually drag the movieclip to the pointer.And it finishes removing the movie clip to the place it should be.
if i make say a button in my timeline, convert it to a button. and then remove it from the stage (it is still in the library) in my exeternal .as file how can i then place that movieclip on the stage? i know how to do this within the timeline, but not when it is an external .as file.
I'm trying to place a movieClip on a grid. What I have is a rectangular movieClip called recMc and I would like to create columns and rows based on two numbers that are dynamically generated, for instance if those numbers are 5 and 6, (5 rows and 6 columns) I will end up with 30 movieClips on the stage forming a rectangular shape. Oh, I would like to have some space in between each movieClip.
I think I saw something like this posted on [URL] when I bought the book, but since this site is down most of the time I cannot view it.
Code: var rows:Number = dynamicNum1; var cols:Number = dynamicNum2; for(var i=0; i<rows; i++){ }
what I have are pieces of a truck and the user needs to be able to drag and drop the pieces to the correct locations. I can get the pieces to drag, but I need help locking them into place once they get within a certain area. So for example if they drag and drop the wheels of the truck towards the back, but not in the exact location, then the movieclip will move and lock into place and then the movieclip becomes disabled.
var dragMC = finalMC.graphicMC; /////////////////////////////////////// onMouseMove = function () { updateAfterEvent();
I am currently working on a platformer, and I have a bunch of different tiles I use to form my maps with. These tiles are very different in the looks, and placed besides eachother, they give a very sharp change, which is not very visually appealing. I've been trying to fix this in the following way:
I have four layers, two for each block I'm fading. The first layer is where the actual tile, the graphic, is located. The second layer is the mask. In the mask layer, I have a gradient, which is the exact opposite of the other tiles mask layer (Mask layer 1 goes down, mask layer 2 goes up). However, I need to be able to alter those dynamically, place new gradients in the appropriate mask layer, and new tiles in the appropriate graphics layer.
I've been googling around for the last hour or so, attempting to find a way to define which layer a new MovieClip is placed on, but all I've found is setChildIndex, which, since one layer acts as a mask, I can't use. Is there any such function in Actionscript, or am I to make all combinations of tiles by hand?
I've placed this code on the root time line and it works great, however i need to print multiple MovieClips and I can't do that unless I place all the MovieClips into one MovieClip and that's were this code stops working.
This code keeps two seperate MovieClips physically connected while dragging both while on different layers. [code]...
I have moviclip called "b1" which I am using as a button. This b1 is in the shape of switch and when I am clicking on it it turn right and when I'm clicking again the switch is turning left to the primary position. this action is explained by AS code:[code]And only thing which I do is that I have to modernize this AS code for my own requirement. My problem is that I don't have any idea to connect those two codes. My scene ( my menu bar which I was talking about) looks like that: URL...and please click one of the buttons to see what i am talking about.
I have a movieclip which is added to the stage every second at a random place.i want all instances of this movieclip to move to the postion x=100px and y=200px on the stage at a rate of 5px.im not sure how to code this, i would like the code to be in as3 if possile as i do not know as2.
I have around 20 buttons that together make a map of USA. I am using AS3 tool tip, which display name of region on mouse-over. I want to create a movieclip which will house all these 20 buttons and their actions(basically put everything under one movieclip).
But when I do that everything works fine but the tool tip gets dispalced. It appears almost at the edge of the stageAny way to make it appear near the mouse cursor?
Code I am using for tool tip is:
Button1.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler1); function mouseOverHandler1(e:MouseEvent):void { //creating a new tooltip instance
I wish make a zoom with tweenlite library on a movieclip.But I wish zoom on a focus where the user click.The user step are like this:step1: the user go on a place over the picturesstep2: clickstep3: zoom to the click placeHow I can do it in AS 3.0?
I'm trying to unload a movieclip when it's pressed and load another one in its place. For some reason the loaded movieclip is always being loaded at row 7 column 10.
Code: var columns:Number = 10; var rows:Number = 7; for (i=0; i<rows; i++) { for (j=0; j<columns; j++) {
I'm trying to make a movieclip move slower at a certent place in my movieclip. This means, that the speed needs to be lowered when e.g. showing af picture. Here is the situation. I have a movieclip running different pictures. E.g. the first runs for 115frames and fades out. Instead of runing 115 frames i want the movieclip to run 5 frames (picture fading in) and the stops or delays for 10sek and then goes to frame 6 from where the picture fades out. Where in the movieclip should i place this Action Script?
How to make this smoke effect work without mouse input. I am trying to have it spill from the end of a cannon, & my attempts to modify the position have resulted in all my bitmaps shifting. I changed this doTrail(_root, _xmouse, _ymouse, currentBitmap); To this doTrail(_root, _x=80, _y=100, currentBitmap); [Code] .....
It makes mcGrass1 disappear, but not the event listener. When I touch the area where it was, it still goes to the screen "math". [URL] That is the location of my .fla
Once I drag and drop the movie clip symbol it will not release the symbol in sum cases I am sending the code. See code below: f(subject2); function f(mc:MovieClip):Void{ mc.onPress =function(){ if(!this.index){ this.index=1; [Code] .....
Is there anyway to randomly place a MovieClip/Sprite on an irregularly shaped object?For a rectangle, it seems pretty straightforward (i.e. use Math.random with the range being the coordinates of an object)...but what if say, you would like to avoid placing objects in the center?
I have a 100 x 60 rectangle movieclip and I want to duplicate it n times (n is an arbitrary value taken from XML) and place the newly created movieclips in a grid.
The grid will have an arbitrary number of cols / rows, as these values are taken from XML too.
I'm using a for loop to place the movieclips horizontally, but I have no clue how to create a new row once the desired amount of movieclips have been placed horizontally, and so forth until the maximum (n) number of movieclips have been placed on the stage.
Here's my script so far:
ActionScript Code: var n:Number = 28;//Maximum number of movieclips - this value is actually taken from XML