This is a cool little thing which might come in helpful for you.
This will be the finished product, something like this-
Example
And this is how it works.
First, you need to make a frame. This will just be a box with a line thickness of 1.5 and no fill.
Then, draw your screen design inside. Note that if you make something with too much opaque colour in it, then it will cover up a lot of the screen and you wont really see much of your animation. Plus, you must NOT go outside the box with any of the design. If you do, it will pretty much ruin everything, as the box around the outside wont run round the outside of the screen.
Right. Convert to symbol, call it "camFrame". Next, add this code into a new EMPTY layer, in the movieclip-
[SIZE="1"]parentColor.setTransform(camColor.getTransform());
function camControl() {
parentColor.setTransform(camColor.getTransform());
var scaleX = sX/this._width;
var scaleY = sY/this._height;
_parent._x = cX-(this._x*scaleX);
_parent._y = cY-(this._y*scaleY);
_parent._xscale = 100*scaleX;
_parent._yscale = 100*scaleY;
}
function resetStage() {
var resetTrans = {ra:100, rb:0, ga:100, gb:0, ba:100, bb:0, aa:100, ab:0};
parentColor.setTransform(resetTrans);
_parent._xscale = 100;
_parent._yscale = 100;
_parent._x = 0;
_parent._y = 0;
}
this._visible = true;
var oldMode = Stage.scaleMode;
Stage.scaleMode = "exactFit";
var cX = Stage.width/2;
var cY = Stage.height/2;
var sX = Stage.width;
var sY = Stage.height;
Stage.scaleMode = oldMode;
var camColor = new Color(this);
var parentColor = new Color(_parent);
this.onEnterFrame = camControl;
camControl();
this.onUnload = resetStage;[/SIZE]
And now all you have to do is use this new screen exactly like the v-cam.
A v-cam tutorial can be found here.
Happy animating.
Flash Game screen [Flash][V-Cam]
Started by: Mesmay | Replies: 15 | Views: 2,421
Feb 6, 2008 9:41 PM #82322
Feb 6, 2008 9:59 PM #82326
Holy crap, it sounds awsome when it's animated, and how you have it.
Thanks alot, I'm so gonna try that.
:D
Thanks alot, I'm so gonna try that.
:D
Feb 6, 2008 10:23 PM #82327
Thanks. :]
I wasnt sure people would like this, but...
I wasnt sure people would like this, but...
Feb 6, 2008 10:35 PM #82329
:/ A victory shortly lived, I can't get it to work with my V-cam, though I rarely use one.
I'll try again later.
Cudose.
I'll try again later.
Cudose.
Feb 6, 2008 10:41 PM #82331
?
Ive given you all the code you need...
What do you mean?
Ive given you all the code you need...
What do you mean?
Feb 6, 2008 10:52 PM #82332
I used one of those premade V-cams, and the tut you gave a link too matches the type of tutorial that confuses me ( XD ) So it mest up when I try to have them both move , I'll try with a non-premade one soon.
Edit: XD Woops, it was the fact I "Had" a v-cam in it, you didn't make the message clear to me it was ALSO a v-cam.
Double thanks, it's even less work than I thought.
Edit: XD Woops, it was the fact I "Had" a v-cam in it, you didn't make the message clear to me it was ALSO a v-cam.
Double thanks, it's even less work than I thought.
Feb 6, 2008 11:05 PM #82333
this is just a how-to-make-a-vcam tutorial. pretty lame.
Feb 6, 2008 11:09 PM #82334
Quote from Spitzerthis is just a how-to-make-a-vcam tutorial. pretty lame.
No, it's really not, this is more advanced, with a regualy V-cam you can't have something stay on the edges on the screen all the time unless you shrink it to fit everytime, while with this one you don't. Find another place that offers this tut, it's not as easy as it sounds. So this is a danm good tut, despite the length, though that can't be fixed since all the information was already given.
Feb 6, 2008 11:15 PM #82336
oh awesome thanks, ive genuinely wanted to know how to do something like this cuz i was thinking that if i use an animation that has, for example, lifebars, i'll need to know how to do something like this. so thanks honestly. and although i havnt tried it, im sure ill be able to make it work should the need arise. ill probably end up making good use out of it...or at least, thats the hope
Feb 6, 2008 11:21 PM #82337
true grubbz, i wasnt thinkin of that.
Feb 6, 2008 11:29 PM #82339
what i'd really like to be able to do is sort of have 2 vcams. like be able to show 2 different parts at the same time..i know that may be impossible to do with AS..or at least extremely difficult, just it'd be good to be able to do :P
but this tut will be good when i use it :)
but this tut will be good when i use it :)
Feb 7, 2008 6:25 PM #82385
Quote from Spitzerthis is just a how-to-make-a-vcam tutorial. pretty lame.
>:[
No, it isnt.
Quote from grubberNo, it's really not, this is more advanced, with a regualy V-cam you can't have something stay on the edges on the screen all the time unless you shrink it to fit everytime, while with this one you don't. Find another place that offers this tut, it's not as easy as it sounds. So this is a danm good tut, despite the length, though that can't be fixed since all the information was already given.
Yes, exactly.
Feb 8, 2008 2:09 AM #82462
Quote from Mesmay>:[
No, it isnt.
Yes, exactly.
That was a pretty pointless post.
Feb 8, 2008 9:45 AM #82537
:D
I was just saying that grubber was right about the purpose of this thing.
I was just saying that grubber was right about the purpose of this thing.
Feb 8, 2008 8:57 PM #82574
Yeah, I know. Spitzer already saw grubbers post, though.
It's your thread, though, so nothing big.
It's your thread, though, so nothing big.