ActionScript 2.0 :: CS3 Editing A Code That Draws A Line Following An Object?
Jan 15, 2011
I'm trying to make an Etch-a-Sketch kind of game for fun. I think it's a simple problem, but I tend to type a lot of stuff for some reason. I found this code to build upon:
ACTIONSCRIPT Code:
createEmptyMovieClip("Line",1);Line.lineStyle(1,0x000000,100);onMouseDown = function (){ Line.moveTo(_xmouse, _ymouse); onMouseMove = function () {
I'm having an issue with Flash CS4. I'm not sure what I toggled, but when I draw a line or shape it automatically converts it into a symbol. How do I disable this? It's very annoying to have to break apart each line as I draw it.
I'm trying to simulate the coriolis effect and have managed to create a drawing application that lets the user draw on a rotating movie clip. However, I would like to now create an animation that automatically draws a line onto the movie clip which ends up being curved, but I can't figure out how to convert the x, y coordinates of the pixels on the stage to the corresponding x, y values of the movie clip. Here's what I have so far:
I have some movieclips with a graph (not generated, manually drawn). I want to change the thickness of the line inside the movie clip. How do I do that?
When I move the mouse over the line the graph must highligt (become thicker). I can do this with the line as a button, mouse-over graphics. But I also need to highligt the graph when the mouse is over some text (to link the graph with the text). If I have 2 - or several - buttons can I have them all show the mouse-over image at the same time, if the mouse is over just one of them?
Another ideer: I have made an actionscript the fades (using alpha 0 and 100) for 2 similar movieclips each with different thickness positioned over each other. But the initial value for both lines is a problem, only the thin line must be shown, the thick line must be alpha=0. If I set it at the start of the actionscript then it resets every time the flash starts over. Is there some way to set the inital value (alpha=0) just once? When the flash playes first time?
1. i am trying to drag and drop movie clips with a short video clips in it(inside movie cilp), on to another square target "tv" with buttons play stop etc.
2. on this square "tv" i want to be able to view the clip i just drag to the "tv" to (manipulate the clip with play stop on so on) and the same thing with the other clips
3. after that i want to drag the movie clips or another movie clip of the same to a time line with other movie clips and be able to play the time line with the editing movie clips as a new entire editable video clip
Got cs4 now and i cant find a preference for editing.My problem is that when i put my cursor at the start of a line I want it to stay there when I move my cursor up and down through code.Now it jumps forward and back with the code.. thats anoying.
I was just reading a post about the AS3 possible release with Flash 8. Within the replies, I've noticed that many of the members are stating that they edit code outside of flash insted of in flash. I've never heard of this before.Is it better?
I am trying to dispatch an event but not sure when I should do it to get the right results. The first event "submitClicked" is in the right spot and works great. However, the second event "dataReady" seems like it might be a problem. I need it to be dispatched after this.compiledFormData is set.Does AS3 wait for each line of code in a function to be executed before moving on to the next line?
// -------------------------------------------------------------------- public function submitForm() {
Got to the point where the hole in my AS3 knowledge is getting large!Realising I have confusion about the relationship of:Body of code on first frame of AS3 file.(Which I have so far used to create instances of library objects using addchild and make calls to class code).Is this code called the document code? What do people call it?Numerous classes linked together by extending each other etc.Library objects (usually graphical objects)Should it be done differently? have the following problems due to lack of understanding:Addchild complicated from a class but straight forward in main body code.Cant call functions on the main body code from classes, because class code does not know the main body code exists?
how can i change this as3 code with hex editing to make this game always show HEADs (or tail ) and be winner its game to bet and u should choose head or tail , and if u guess rite u get money ,if not u lost money i want to always answer be head( or tail) .as file attached.
I am looking for a way to edit .sol-files (LSO/Local Shared Object). I have tried searching quite a bit, but I have not been able to find any program that can edit AS3-files properly. Is there a solution for me out there?
ive publish a html file with flash detection enabled from flash.[code]now since the default codes places my flash movie on upper left corner, ive made my own tables with the flash on it, how or where do i place this code to the upper codes?[code]
As stupid as my question might sound, i have spent the last 2 weeks reading oop books; but could use some guidance. I have a flash project that is basically a supped up slide show. On the stage i have the following: main_mc (instance name = images_mc) = movieclip which holds "pictures" ui1 (instance name = ui1_mc) = user interface that allows user to draw on picture (when drawing is enabled) ui2 (instance name = ui2_mc) = activates invisible hit areas (buttons) on select pics, when hit area is clicked, we jump to another pic in the main_mc.
I accomplished all of this on the timeline, but am updating the code to OOP. I am having A HELL OF A TIME trying to figure out how to store references to the instances (images_mc etc..), so i can control them from varying class files. I have found it is easy to control the instances from the documentclass, but not from unrelated class files. Example: images_mc.stop(); works in document class; but ovieclip(Parent).images_mc.stop() doesn't seem to work from any class file.(ui2 class file for example);
if (_root.Limits.Border.hitTest(this._x + xspeed, this._y + yspeed, true))Beginning with (this._x), I do not understand what effect that has on the hit test itself. I understand that the_root.Limits.Border.hitTestcalls a hit test on Border, which resides within the movie clip Limits. What effect is had on the outcome of the hit test by adding in those specific variables, along with the "true" at the end? I'm making a game that of course uses extensive hit test collision detection, and this code is from a sample I've been working on to get my collision detection down pat.
I have the following problema: I have an audio file that makes a line move using the computeSpectrum method in as3 like this:
Code: Select allprivate function moverSound(e:Event):void { /// SoundMixer.computeSpectrum(arrayMixer, false, 0);
[code]....
The thing is that I have 16 objects at the same time doing this, and it gets too slow. So I came up with an idea to solve this, and my idea is to instead of calculating the spectrum every frame that I would have a defined movement that looped, like the movement of a flag repeting.
We all know that you can make a frame lable in a movie clip and call it on press,rollOver ect...
_root.some_mc.gotoAndPlay("scene1") - won't play on (press){ _root.some_mc.gotoAndPlay("scene1") - will play }
My question is how to get the line of code to run without and buttons. I have made a few sites and never had to do this. I have tried making a function. But to no avail. I just want it to load when the frame reads the code..
for (var i = 0 ; i < 10000000; i++) ;stop();I've placed this code in frame 1 of a flash app. As you can see it does nothing but count to 10,000,000. This takes about 20 seconds to execute.
In C#.NET, this one line runs over 400 times faster. It can count to one billion in less time. Why? I could see it being faster in C#, but what could possibly be going on under the hood that could make it 400 times slower in AS, given that the one line should reduce to just a few machine instructions?
(If you're wondering, I've been tasked with porting some C# code to ActionScript. The code has some scientific calculations in it. But in AS they run so slow that it is unusable. This is the most basic example of the problem.)
I'm trying to assist some members and make a small program that will add up all the numbers on the right of each line... I've been working with game code for years, but this is my first attempt at Strings!The following text below is what the text box will be filled with
05/02/2009 01:08:49 Ad Package Bonus in amount of 5. 05/02/2009 01:08:49 Ad Package acquired in amount of 20. 05/01/2009 02:14:59 Ad Package Bonus in amount of 4.
ok so I am trying to draw a curve and then make it into a mask, the problem is, flash only calculates the mask for a fill and thus using the line does not work. Does anyone know of a way to convert a line to a fill with as3 without using something like bitmap data as I would like to keep it as vector data if possible, below is my code:
ActionScript Code: line = new Sprite(); this.addChild(line);
I am trying to generate this line of code dynamically...
movieclip.somefunction = b2._x;
and below is what I'm using...
movieclip.somefunction = ("b" + thisnum + "._x");
and I am storing a variable called thisnum. My line of code seems to return the correct value when I 'trace' it, but will not call the function correctly.
I have a movieclip called myButton,inside of myButton i have a textfield called buttonLabel. I have 16 instances of myButton placed on the stage with instancenames myButton1,myButton2, etc.I want the textfield inside of each button to display the same number as the one in their instance name. ie myButton1.buttonLabel.text = "1".instead of repeating that line of code 16 times, is there a way i can use a loop? something like
for (var i:int = 1; i < 17; i++) { myButton(i).buttonLabel.text = i }
I opened up the NY Times homepage, and they have this giant Apple addvertisement that has animations over the entire top half of the page, outside the area occupied by the swf.
I want to give a good look and feel to the flex line charts. How to show it more attractive. I have done everything, now i want to show it more attractive/rich look and feel. can you guys provide me any samples.
all I want to do is add a variable to a getURL line of code.EG:getURL("/index.asp", "_self");I need to add a variable (_root.myvariable) to the end of the link so that it goes to:index.asp?myvar=thevalueofmyvariable
I've created an movieclip button that onRelease: moves to the highest depth and expands to the entire page and onRelease again: contracts to a thumbnail and moves to a lower depth.'ve got the animation working. However, I'd like the movieclip to finish playing the contracting to a thumbnail animation to the end before moving to a lower depth. Here's a concatenated version of the code://Variable that I set to know when the button was clicked first to expand.