ActionScript 3.0 :: Creating Flaming Mouse Trail And Getting Errors
Nov 5, 2011
I've been busy with a small tutorial on creating a flaming mouse trail. I'm getting two errors though in the same line which I do not understand in the following part of my code:
function startTheFire( e:Event ):void{
TweenLite.to( e.target,0, {alpha: ( e.target.alpha -= 0.05 )} );
if ( e.target.alpha < = 0 )
e.target.removeEventListener( Event.ENTER_FRAME, startTheFire );
removeChild( e.target as Sprite );
}
ERRORS:
1084: Syntax error: expecting rightparen before semicolon.
1084: Syntax error: expecting identifier before assign.
Both refer to the following line: if ( e.target.alpha < = 0 )
I tried to put in the code for mouse trail on my website but it doesnt work? is it a flash thing? can someone please show me the html code to add text mouse trail effect like the one on this site?
[URL] from here i understand the action script. i want to change the text color so i did this:
Text = "welcome to darkside"; letters = Text.split(""); letterformat = new TextFormat();
[code]....
here i added this action so i can change the color do i need to include the code for white color? or just teh name iv tried both ways the text color stays teh same! and then all of this after it:
so how should i modify the script, when i want to use three small, different images instead of just one (imagine three stickmen chasing the cursor as if connected there with an elastic band) ? i tried, but this bypasses my beginner's skills by far
i am trying to create a trail behind an object - like a mouse trailer. i have found many mouse trailer scripts but do not know what to adjust so that it will follow an object/symbol...
I'm trying to duplicate this type of mouse trail. I can't tell if it's deforming a movie clip or drawing separate objects on the stage. I can duplicate it at slow speeds, but at a fast speeds I have no idea how they're doing it.
The MouseEvent.MOUSE_MOVE is way to slow on the update to draw exactly where the mouse is going so I tried using curveTo to create a curve but unfortunately you still hit a point where you get a sharp angle.
I was wondering how you change the text colour with action script. The Kirupa mouse trail tutorial I was looking at has the following script for the text:
letterformat = new TextFormat(); letterformat.font = "Verdana"; letterformat.align = "center";
I'm looking for a tutorial, or for the scripting to create a mouse trail that has random movement, but that follows the mouse - also i have seen one, ca't remeber where, that casts 'shadows'?
I am a complete newbie n was checkin out a number of sites n came across this kool effect. out with the actionscript used...the site is [URL] how to add the time n date as a mouse trail.
Everything works fine, but I am trying to play with the different options.The one thing I am trying to do is have fewer repeats, as the object I am using is larger than the one in the tutorial and it looks too crowded. So, I am trying to figure out where to change the code, so that fewer repeats occur. I assume its the math random part, but not sure.Does anyone know where in this code below I would change that option?
/* Mouse Trailer *//* Developed by Carlos Yanez */[code]....
I was wondering how you change the text colour with action script. The Kirupa mouse trail tutorial I was looking at has the following script for the text:
letterformat = new TextFormat(); letterformat.font = "Verdana"; letterformat.align = "center";
I created a 300x250 Web banner for Google with a mouse trail effect. The banner will not upload because, according to the Google tech people, the banner contains animation that goes "out of bounds." Common sense tells me that if a mouse effect is applied to a Flash banner, then it should only be occurring when a user mouses over that banner. However, I was told that the mouse effect does indeed take place outside the 300x250 banner boundaries, which is preventing the banner from being fully uploaded live.
Does anyone know how to define the stage area so that the mouse effect only occurs in this 300x250 space? Perhaps the only way to get around this is to create a 300x250 hidden button and somehow make the mouse effect occur on rollover. If that is the case, then does anyone know how to do that?
I've been trying to create a scrollpane dynamically but I keep getting a bunch of errors when I publish the swf. At first I thought maybe there was a problem with my code so then I looked in the file and copied and pasted one of there examples into a blank fla and I still get the same errors when I publish. If I look at what is the source of the errors it looks like the error originates at this section of the ScrollPane.as file:
Code: override protected function drawBackground():void { var bg:DisplayObject = background;
Trying to create a 2D vector. I'm getting type coercion errors when trying to store the 2nd vector inside the first.
Code: var vector1:Vector.<Vector> = new Vector.<Vector> var vector2:Vector.<CustomClass> = new Vector.<CustomClass> for(var i:int=0;i<5;i++){ vector2[i] = new CustomClass() } vector1[0] = vector2; 1067: Implicit coercion of a value of type __AS3__.vec:Vector.<CustomClass> to an unrelated type __AS3__.vec:Vector.
I'm a begginer flash game developer-ish individual working on my first project - An economic game with RPG elements, I'm mixing AS 3.0 with Flash CS5 (for the graphics, buttons, tweens and the simple stuff in general since it's easier for me atm than scripting it). The trouble started when I had to script in variables. I've sorted out a couple of issues but a few still remain:
1. I need to limit three of my main skills to 0-100. Only managed to stumble across tutorials for AS2,
2. Each character will have 3 main skills, and then the 18 secondary skills will be calculated from those 3 values. This works fine, when I modify existing variables directly in the code. The thing is that I created those buttons that add or subtract from a certain skill value, but when I press them the var changes but all of the 18 skills remain unchanged (as if they do not refresh themselves - i was thinking about an eventListener waiting for a change in skill value but if I would have to do one for every one of the 18 skills in conjunction with the 6 buttons to change levels - so 144 functions - im thinking maybe an array...but I'm such an actionscript newb that I can hardly translate the tutorials into my ideas.
3. Also wondering how to create a pool of unused skill points so when I add points I can't max it out right off the bat but rather take it from that value instead and once it's 0 you can't add points anymore.
4. Last but not least, I'm having trouble creating global values. My main menu is in scene1 and when I press Newgame it goes to scene2, the problem starts when i go back to main menu errors keep showing up (since scene 1 has no information about statistics but a function probably keeps asking )which means that the program can't get access to an attribute or a method of reference for the null object at MainMenu_fla (don't be fooled by the file name, I have everything in 1 fla file)Of course an error pops up for every skill, main or secondary.
I would like to develop a program where a user(children in this case) could draw a selection and the program to detect the selected objects in that selection.I have also attached an image of the idea.redirects to threads, anything is of great use. I remember playing a game where you had this functionality, but I can't remember the game name
I'm trying to create an area that causes a menu to fade in, similar to the toolbar in Mac OSX. So when the mouse nears that area the menu pops up, I've been trying it with some code, not sure if I'm heading in the right direction.
I'm trying to create an area that causes a menu to fade in, similar to the toolbar in Mac OSX. So when the mouse nears that area the menu pops up, I've been trying it with some code, not sure if I'm heading in the right direction.
I have created a bouncing logo (similar to a screensaver). The MC loops and I have added some motion trail using dupe mc's, however when the main MC loops back to the start, the motion trail seems to go out of synch and fall behind in its positioning. I have attached the FLA to show you what I mean and you can see the AS that I have used.
How to make trail behind movie clip. I suppose it should be some kind of duplicate mc function but dont know how to write it. For example there is rectangle (mc) on screen when I click on it should move to the left but it should leave copies of itself behind it with different opacity, closer copies should be more visible and they all should fade out (I mean trail not main rectangle), it should look like circular animation which are often used in some flash video players where rectangles are rotating around center point but they aren't all same opacity.
I've been experimenting with the following tutorial (scroll down to "Eye Candy 1: Trails"):[url]...........I can get it to work like his example, but I would like to apply it to my game which works a bit differently. Rather than having a player-controlled mc move around on the stage, I place the player's character in the center of the stage and have their actions control the level around them (tl;dr the player doesn't move, but the level does).My approach was to determine the location inside of "level" that matched up with center stage where the "hero" is located. Then, rather than place the trail effect on _root, I would place it at this location inside of the level.See below for my code:
I�m working on an asteroid game and don�t get it to create a nice trail for my spaceship(s).It doesn�t need to look spectacular, just "nice".I tried a comic look alike version with angled mc�s, whose scale are tweened down and up. But it�s not the right look.And I tried some flame effects by as3, but it not seems to be a smart solution. Nice look, but needs a lot of memory space.