RE: Flash Q&A Thread 5 - Flash Has Shares In Your Soul (Full Version)

All Forums >> [Gaming Community] >> [Legends and Lore] >> Artists of Legend >> Art Academy



Message


tauguy -> RE: Flash Q&A Thread 5 - Flash Has Shares In Your Soul (9/1/2008 13:15:58)

ah! i just realised whats wrong, that code will only work if the mouse is being held lol
cant think of anything atm sorry




Taerzik -> RE: Flash Q&A Thread 5 - Flash Has Shares In Your Soul (9/1/2008 14:17:04)

endi - describe better please? I'll work on a solution when I get back.




tauguy -> RE: Flash Q&A Thread 5 - Flash Has Shares In Your Soul (9/1/2008 14:57:40)

he means he managed to get it so the character moves to where you clicked the mouse (like df or mq or aqw) but wants to make the character to play a running animation while its moving to that point.




iEnd -> RE: Flash Q&A Thread 5 - Flash Has Shares In Your Soul (9/1/2008 15:08:52)

yeah that's right tauguys, plus I haven't pasted the character into the scene, but I am using attachMovie() to load it into the scene.




EragonZZZZ -> RE: Flash Q&A Thread 5 - Flash Has Shares In Your Soul (9/2/2008 19:24:56)

*Sigh*

var targetX:Number = 0;
var targetY:Number = 0;

function moveTo(x:Number,y:Number):Void {
     targetX = x;
     targetY = y;
     player.gotoAndPlay("running");
}

function onEnterFrame() {
     if(Math.abs(player._x - targetX) < 5 && Math.abs(player._y - targetX) < 5) {
          player.gotoAndStop("standing");
          targetX = player.x;
          targetY = player.y;
     }else{
          //your movement code to move player towards targetX and targetY goes here
          //problems occur if the player moves faster than the numbers up above, in this case, 5.
     }

}




Mo -> RE: Flash Q&A Thread 5 - Flash Has Shares In Your Soul (9/2/2008 20:11:53)

How do you use an extension for flash? So far I downloaded the Extended Tween Engine and I don't know how to access it




dominic_r_monroe -> RE: Flash Q&A Thread 5 - Flash Has Shares In Your Soul (9/3/2008 14:05:12)

Can my .mp3 based tutorial be added to the list please Althorne.
http://forums2.battleon.com/f/tm.asp?m=14701943
:L Dont not add it out of jelousy now Lmao. Joke, Joke




biG frend -> RE: Flash Q&A Thread 5 - Flash Has Shares In Your Soul (9/5/2008 1:42:56)

Alright I've been messing about with API and I was wondering is it possible to add a glow effect to an mc you create? Or add any type of filter?




iEnd -> RE: Flash Q&A Thread 5 - Flash Has Shares In Your Soul (9/5/2008 16:47:41)

eragon:
**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 1: Statement must appear within on/onClipEvent handler
var targetX:Number = 0;

**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 2: Statement must appear within on/onClipEvent handler
var targetY:Number = 0;

**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 4: Statement must appear within on/onClipEvent handler
function moveTo(x:Number,y:Number):Void {

**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 10: Statement must appear within on/onClipEvent handler
function onEnterFrame() {

Total ActionScript Errors: 4 Reported Errors: 4




Davosaur -> RE: Flash Q&A Thread 5 - Flash Has Shares In Your Soul (9/5/2008 20:13:35)

oooh.. you might want to check th "{}'s"




flsg -> RE: Flash Q&A Thread 5 - Flash Has Shares In Your Soul (9/5/2008 22:43:03)

like, people didnt change a bit here on AQ forum lol

endisukaj: dont post that block of code on the MC, try timeline frame

also, don't trust eragon, it's a trap!!! lol
nah actually he wrote only to solve your question, but trust me it wont work later on unless you know what his code's talking about...

eragon: lolwut...player go to standing frame every enterframe? that just creates more questions like "how do I do another animation when it's standing OMG it wont work it stucks at the standing frame OMG", etc.
I'm rusty, need practice, maybe I'll post a code later




EragonZZZZ -> RE: Flash Q&A Thread 5 - Flash Has Shares In Your Soul (9/5/2008 23:35:37)

Yeah, sorry, I kinda just pulled code from my old old old grimy blah walkaround engine thing.

And there it is.

:P




flsg -> RE: Flash Q&A Thread 5 - Flash Has Shares In Your Soul (9/7/2008 11:07:15)

hey eragon, are you busy these days? pm me your msn plz XD




dominic_r_monroe -> RE: Flash Q&A Thread 5 - Flash Has Shares In Your Soul (9/8/2008 10:46:45)

@flsg to "this is the most popular in Q and A"
I remember those threads as well. Btw. I AM a Flash user althorne. And you know it :P
Im just gonna work on a webcam script. And Post it here later. Btw. Add our JukeBox to the tutorial pl0xers. :L Please ?




Mo -> RE: Flash Q&A Thread 5 - Flash Has Shares In Your Soul (9/9/2008 17:24:11)

For some reason my motion tween isn't working. Even when I use it, it does the same thing as not use it at all




biG frend -> RE: Flash Q&A Thread 5 - Flash Has Shares In Your Soul (9/9/2008 17:36:28)

Make sure theres nothing else on the layer.




Mo -> RE: Flash Q&A Thread 5 - Flash Has Shares In Your Soul (9/9/2008 17:52:54)

I did that, but it still doesn't work right :/




dominic_r_monroe -> RE: Flash Q&A Thread 5 - Flash Has Shares In Your Soul (9/10/2008 11:02:00)

yeah. I have that problems sometimes. Is it a long motion Tween ?
Cause if not try re-doing it again. And sometimes that can help. save first though.

Edit: It is it possible to make the menu's like in AQ for the Attacks Screens im working on a TBT Battle System, And im trying to have multiple spells. I have "A Guy" Doing the PhP :L Just a clue, he owns this thread. :P.

Im trying to work out the script. I would Like a animation tween to its viewing.

Edit: Realised straight after :L. Put it there. Use the script to make it visible again. Give the first frame the Actions: Stop();. Make the animation of a image of them or summat: Then on the frame put the buttons separate.
Then on the button that adds it have, _root.MC.Play(); And make it visible

< Message edited by dominic_r_monroe -- 9/10/2008 11:03:55 >




Taerzik -> RE: Flash Q&A Thread 5 - Flash Has Shares In Your Soul (9/11/2008 14:31:39)

Got a question that's playing with my mind-

I want to be able to alter the colors of the lines in a movieclip without changing the fill color.

I'd like to actually change the color, not just apply a filter.
I know I could make the lines and fill separate clips and do it that way with a filter BUT I'd have to do that to something like 196 clips...

Basically I want to immitate the effect of the color change 'hue' option but, again, w/out using a filter.

Using AS2.

Thanks.




EragonZZZZ -> RE: Flash Q&A Thread 5 - Flash Has Shares In Your Soul (9/11/2008 16:54:12)

I'm playing around with some tests for ya.

What color is the fill, btw? :P

Eh. No code solution yet. But here:

-Remove all lines from your MCs.
-Use a single filter on the container MC that holds all the "children" MCs (the pieces of your character)

Use filter to represent the line color. :P
Cel-shading for the win. Only issue might be lag but there are ways around that.





Taerzik -> RE: Flash Q&A Thread 5 - Flash Has Shares In Your Soul (9/11/2008 18:28:03)

Thanks EZ

The fill is black. Lines are 0x0000FF I'd actually like to imitate the entire color change filter (hue, contrast, saturation and brightness).

I've been playing with Transform and ColorTransform. I've almost got Contrast working but haven't been able to get the adjust values correctly yet.

Unfortunately I don't think I can just trade the lines for a 1 pixel glow imitation since the clips in question for hair. It's a good trick though and I'll give it a try.

...

Yeah, glow filter trick won't quite work. I've got too many detail lines that I loose in the process.
Ah well. I'll be up tonight on the matter. Already got the hair graphics update in place but no color options yet.

Figured out how to emulate brightness.




Taerzik -> RE: Flash Q&A Thread 5 - Flash Has Shares In Your Soul (9/15/2008 7:15:40)

Dublpost, I know, BUT I think it's warranted in this case.


I figured out how to alter line colors w/out changing the fill color!
This assumes that the lines are white and the fill is black. I'm not sure how it will affect other arrangements.
If you wanted the lines to start out as given color just preset the appropriate multipliers.
The variable Cpnt in this code example tracks the 'hue change', which is a Change Color filter setting I was trying to immitate.
Here goes:
	if (_root.Cpnt = -30) {
	} else {
		if (_root.Cpnt>20) {
			_root.myColorTransform.greenMultiplier -= .1;
		} else if (_root.Cpnt>10) {
			_root.myColorTransform.blueMultiplier += .1;
		} else if (_root.Cpnt>0) {
			_root.myColorTransform.redMultiplier -= .1;
		} else if (_root.Cpnt>-10) {
			_root.myColorTransform.greenMultiplier += .1;
		} else if (_root.Cpnt>-20) {
			_root.myColorTransform.blueMultiplier -= .1;
		} else if (_root.Cpnt>-30) {
			_root.myColorTransform.redMultiplier += .1;
		}
		_root.Cpnt--;
		_root.myTransform.colorTransform = myColorTransform;
	}


Depending on the specifics of your case you may need to change some things like the Cpnt path points, meaning, at what value which multipliers change directions and start and stop in/decrementing.
The other thing to be aware of is that you will need to set up a TRANSFORM object targeting the mc you want to alter.

Anyway, hope that helps someone.




Sephiroth12 -> RE: Flash Q&A Thread 5 - Flash Has Shares In Your Soul (9/15/2008 22:18:59)

Eh.. I need help with something I'm making :P :

How do you relocate a movie-clip :P Ie-

I'm making a game where if you walk around and hitTest with another character, that that other character would go to that other character's frame two, with all of it's talking sutff and what not lol :P There's a back button, but if you press it, it will go back to that other character's first frame, but since you're touching it, it will keep going to the frame with the talking stuff in it :P But if you walk somewhere else when the other character is on it's frame 2, then it won't bring that menu up anymore... So, how could I make it so that it relocates the player to like the middle of the map so that this never-ending pain will actually end :P? And if that wasn't clear or anything lol here's the basic situation:

Movie-clip # 2 goes to it's 2nd frame when Movie-clip # 1 hits it, and you can click a button that sends Movie-Clip # 2 back to it's first frame. But since Movie-clip # 1 is still touching it, it goes bakc to Movie-clip # 2's 2nd frame lol . So how can I relocate Movie-clip # 1 to another part of the map so that Movie-clip # 2 can STAY at Movie-clip # 2's 1st frame :P

And I'm not trying to sound like a jerk or anything right there if anybody infers that, but the first paragraph to me seemed a bit complicated for such a simple problem lol :P




biG frend -> RE: Flash Q&A Thread 5 - Flash Has Shares In Your Soul (9/16/2008 2:14:45)

_root.[mcnamehere]._x = cordinatehere;
_root.[mcnamehere]._y = cordinatehere;




Nicky -> RE: Flash Q&A Thread 5 - Flash Has Shares In Your Soul (9/16/2008 2:21:14)

Hey- me back again :P. Okay, simple question here. First of all a little background information just in case you're not sure what the code even IS XD. Well, first of all I got this code from a tutorial which conveniently didn't explain the code it used. Basically, it's a maze thingy, and I have an mc called walls with a drawing of my walls in it. The actual code below goes into my MC which is my character. The code is basically a collision detection between the character and the walls MCs. The var myBounce is the speed at which the character moves. Now, it works and I've gathered that it basically gets co-ordinates of my walls MC's edges or something, but that's about it.

So if someone could explain this code below, that would be great!:
        if (_root.walls.hitTest(getBounds(_root).xMax, _y, true)) {
            _x -= myBounce;
        }
        if (_root.walls.hitTest(getBounds(_root).xMin, _y, true)) {
            _x += myBounce;
        }
        if (_root.walls.hitTest(_x, getBounds(_root).yMax, true)) {
            _y -= myBounce;
        }
        if (_root.walls.hitTest(_x, getBounds(_root).yMin, true)) {
            _y += myBounce;
        }


If you need anything extra, like my fla or something if you don't understand from my explanation at the top that's cool. Don't worry about rushing or anything, just for future reference I'd like to know what the code in my MC does :P.

Thanks!




Page: <<   < prev  9 10 [11] 12 13   next >   >>

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition
0.125