RE: Flash Q&A Thread 4 (Full Version)

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



Message


Sephiroth12 -> RE: Flash Q&A Thread 4 (3/9/2008 15:45:35)

I mean like to invert the colors... :) Like in MS Paint if you select the image and press ctrl+i




master dragon lord -> RE: Flash Q&A Thread 4 (3/9/2008 16:55:20)

to invert i think you go to: selection>>>invert,with any selcted object or color




EragonZZZZ -> RE: Flash Q&A Thread 4 (3/9/2008 17:05:31)

I played around a bit and here's what you want to do.

1. Create a shape the size of the area you want inverted; if you want the entire stage inverted, just make a huge rectangle the size of the stage. Color it black and put it on it's own layer ABOVE all the previous layers.

2. Convert it to a MovieClip. This is important, it HAS to be a movieclip.

3. Do your drawing on whatever other layers you have.

4. Show the top layer again so that your drawing is covered.

5. Select your shape; go down to the Properties menu and drop down the menu that says "Blend Mode: None". Change it so it says "Invert".




Sephiroth12 -> RE: Flash Q&A Thread 4 (3/10/2008 7:46:13)

Okay, thanks! :D

It doesn't work in Flash MX... You can only do that in Flash 8 think; I used to have it but then my dad deleted it by setting the date of the computer back or something...




Peregrine Falcon -> RE: Flash Q&A Thread 4 (3/11/2008 10:58:32)

hello everyone.... i have a question...

the following is a code for some flame animation i am doing...

quote:

this.createEmptyMovieClip("holder_mc",this.getNextHighestDepth());

for(i=0;i<50;i++)

{
var t:MovieClip = holder_mc.attachMovie("flame","flame"+i,holder_mc.getNextHighestDepth());

t._y = 220
t._x = Math.random()*160+(Stage.width/2-29);
t._xscale = t._yscale = Math.random()*80 + 20;
t.gotoAndPlay(Math.ceil(Math.random()*16));
t._rotation = Math.random()*-20
}


i want it to start on, say, frame 20 and end on frame 40.... how do i do that?

also, i want it to change it opacity gradually from 90 to 50 to 90 and so on...

thanks..




flsg -> RE: Flash Q&A Thread 4 (3/11/2008 17:57:07)

use this.gotoAndPlay(20)
you could replace the number 20 by a frame label in string
then the easiest way is to simply put a stop() function in the MC at the frame 40(there are other more complicated ways)
for the opacity, put a onEnterFrame, then use the _alpha variable on a mc, change its value from 90 to 50 then to 90 again by increasing and decreasing that mc's alpha value

Judging from the code you wrote(if you didnt copy paste it), you should know what I'm talking about. If you don't understand I'll explain more in details




Peregrine Falcon -> RE: Flash Q&A Thread 4 (3/11/2008 19:17:37)

well... i copied and pasted some of it.... but also wrote some of it.... and i get what u wrote :) thanks :)

but wouldnt putting a stop() at frame 40 make it not loop?[8|]

also, i dont get how to gradually change the alpha from 90 to 50 .... i mean could u tell me the actual code to insert there?.... i is a noob....[;)]




Sephiroth12 -> RE: Flash Q&A Thread 4 (3/11/2008 19:58:50)

I'm not all great at flash or anything but if you wanted it to loop couldn't you just put a gotoAndPlay() command on the 40th frame?




Peregrine Falcon -> RE: Flash Q&A Thread 4 (3/11/2008 20:06:36)

@seph: would that make the whole file go to frame 40 and play or would it only make the one layer do that?...




Sephiroth12 -> RE: Flash Q&A Thread 4 (3/11/2008 20:26:10)

Which frame did you want it to loop at? It would make it go to the specific frame you typed within the brackets and play until it gets to 40, where it loops back. Example:

You set a gotoAndPla() function at frame 40, you type in 'gotoAndPlay(1)', so you want it to go back to frame one and play again. I couldn't really think of another way of explaining it right now... :P




Peregrine Falcon -> RE: Flash Q&A Thread 4 (3/12/2008 11:41:30)

u didnt understand my last post clearly seph :)

there are two layers in the .fla file. The ActionScript is on the upper layer. My question is, will putting a gotoAndPlay() at frame forty of the second layer affect the first layer?




Sephiroth12 -> RE: Flash Q&A Thread 4 (3/12/2008 17:50:16)

Yes, plus it usually does for any flash movie, so yeah




flsg -> RE: Flash Q&A Thread 4 (3/12/2008 18:18:54)

oh, if that's the problem, try to click the 40th frame of the actionscript layer, and extends the frame to there. DONT MAKE THE 40TH FRAME A KEYFRAME
now you should see 40 empty frames
now when flash loops back it checks if anything new happens: since your last actionscript layer frame is the same as the first actionscript layer frame, it does't change anything :D
and yes, gotoAndPlay something makes the entire layers on that movie level play

for the alpha part, just like you did t._rotation = Math.random()*-20, use t._apha=transparencyValue
but you want it to gradually change, so you use t._alpha+=5 or something like this
then you insert this code into a onEnterFrame, which execute the command inside repeatly
if you dont know how to use onEnterFrame tell me




Peregrine Falcon -> RE: Flash Q&A Thread 4 (3/13/2008 19:02:53)

sry i couldn't reply earlier, but thanks for the answers XD

@flsg: i could play around and try to find how to use the onEnterFrame... but I is bored... so plz could u tell me how to use it?... [:)]




flsg -> RE: Flash Q&A Thread 4 (3/14/2008 12:11:51)

kk
there's lots of ways to make a piece of code to execute multiple times. the for loops you used in the code was one one them. But that loop executes the code 50 times(i=0; i<50), and only render the image at the end of all the 50 executions.
onEnterFrame is another kind of loop, which update the screen immediately after it runs the code once, the delay between each run is dertermined by the frame per second(FPS)
you must associate the onEnterFrame with a movieclip:
mc1.onEnterFrame=function(){
_root.ball._x+=2
}

this code makes the ball mc to move a little bit to the right every 1/12 second(the default FPS is 12)
in your case, you do:
t.onEnterFrame=function(){
this._alpha+=2
}

you could choose any number for the increase value
then you simply add a if() statement after _alpha line to check every time if the alpha has reached a certain value. If it does, then start decreasing the alpha value. To do this you must set a variable:
(the complete code)
t.alphaValue=2
t._alpha=50//start at 50 transparency
t.onEnterFrame=function(){
this._alpha+=this.alphaValue
if(this._alpha>=100||this._alpha<50){
this.alphaValue*=-1//inverse the alphaValue to increase transparency
}
}

BTW, ina onEnterFrame, "this" is the mc on which you put the onEnterFrame




Peregrine Falcon -> RE: Flash Q&A Thread 4 (3/14/2008 16:12:27)

OMG flsg, u r the best... thanks...

quote:

t.alphaValue=2
t._alpha=50//start at 50 transparency
t.onEnterFrame=function(){
this._alpha+=this.alphaValue
if(this._alpha>=100||this._alpha<50){
this.alphaValue*=-1//inverse the alphaValue to increase transparency
}
}


so the alpha increases by 2 every frame right...?




flsg -> RE: Flash Q&A Thread 4 (3/15/2008 10:47:29)

yes, everytime the time of a frame passes
so when the _apha value is 100, the variable alphaValue becomes -2 (2 x -1), and gives:
this._alpha+=-2
which decrease
once it's less than 50, -2 x -1, which returns 2 again, and gives:
this._alpha+=2




Taerzik -> RE: Flash Q&A Thread 4 (3/21/2008 2:32:38)

Ever tried loading one movie into another and playing it? Yeah... I'm a little stumped. And it needs to load from a relative URL.




the person! -> RE: Flash Q&A Thread 4 (3/22/2008 22:55:13)

On Adobe Flash CS3 Professional, how do you colour in a scanned image?
Everytime I use the brush tool, I see the colour line, but when I let go of my mouse button, it disappears.


I coloured a scanned image before, but I forgot how I did it.




zenron the great -> RE: Flash Q&A Thread 4 (3/23/2008 5:53:30)

honestly dude, your better off doing that sort of thing in paint.

what you have to do is create a new layer and draw over all the lines. Then color from there...Its annoying as hell trust me.




flsg -> RE: Flash Q&A Thread 4 (3/23/2008 10:21:44)

you could change the bitmap image into a vector image by using that converter in modify(or tool or something like that)




the person! -> RE: Flash Q&A Thread 4 (3/23/2008 13:15:19)

The layer thing worked.
I colour in scanned images to make them easier to see, and theres lots of different gray pixels everywhere because of the pencil, and Paint get get those easily as Flash can.
And I have to outline in black to. Makes it easier to see than just colouring, so the outlining is good.




ShadowBlitz -> RE: Flash Q&A Thread 4 (3/23/2008 15:17:29)

im new to flash 8 need basics

i even use GIMP




biG frend -> RE: Flash Q&A Thread 4 (3/23/2008 15:33:29)

What do you mean by basics you need to be more clear.




ShadowBlitz -> RE: Flash Q&A Thread 4 (3/23/2008 16:17:07)

i mean i dont no which tool does wat




Page: <<   < prev  26 27 28 [29] 30   next >   >>

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition
0.125