The Enchanted Cave 2
Delve into a strange cave with a seemingly endless supply of treasure, strategically choos
4.39 / 5.00 38,635 ViewsGhostbusters B.I.P.
COMPLETE edition of the interactive "choose next panel" comic
4.09 / 5.00 15,161 Viewsyea i asked a while ago and got some responses but i didnt understand what to do with the AS they was given.
I'm makin a flash site and Basicly i want it to be fully interactive. So rather like the snow effect that follows you're mouse, i need AS that when the mouse is to the left of the flash stage the Background would move to the left e.g There a bustop on the far right but you cant see it when the site loads up, Thus you need to scroll right to get to it. I know there is a AS code for this but its realy hard to find. IF theres a Tutorial or Possibly step by step help someone could helpwith
id appreiciate it
Darkaxl.
There isn't a set AS code for it, but it is possible. One way would be to make all the background a movie clip and then have it so if the _xmouse was lower than a set point (eg 150) then the background moves to the left/right.
Sup, bitches :)
As I posted last time, put this code on your frame, and name the back ground movie clip "backGround_mc". That will work fine.
_root.onEnterFrame = function(){
xDist =( Stage.width/2)-_root._xmouse;
yDist = (Stage.height/2)-_root._ymouse;
backGround_mc._x += xDist/30;
backGround_mc._y +=yDist/30;
}
V Cam is a nightmare to get to scroll using AS, so dont bother using that.
Dude, I know what you mean. I had it - but I got a new comp and lost all my codes.. ill go a' searching for you!
Im sure something like when mouse is at 200 on the x axis, background_mc go to 600 on the x axis. I havent actionscripted for a while, need to get back into it!
"Actually, the server timed out trying to remove all your posts..."
-TomFulp
What is V Cam??? sounds interesting. Is it similar to the flash camera used in 'Prowlies by the River'???
Here's an example, move your mouse to the left or to the right..
Sup, bitches :)
At 9/9/05 11:35 AM, LEMITUDE wrote: What is V Cam??? sounds interesting.
Yeah its used in PBTR, you can't really use it for game scrolling though as it resizes the stage so co ordinates get messed up. Might be able to but I've never been able to get it working that way.
At 9/9/05 12:03 PM, T-H wrote:At 9/9/05 11:35 AM, LEMITUDE wrote: What is V Cam??? sounds interesting.Yeah its used in PBTR, you can't really use it for game scrolling though as it resizes the stage so co ordinates get messed up. Might be able to but I've never been able to get it working that way.
Yeah I thought the VC was an action script command for a while then when I used it I realised that it was the best EVER tool for animators and is sooooo easy to use.
Also dont try and export movies as anything except swf when using one :P
- Matt, Rustyarcade.com
At 9/9/05 12:05 PM, Ninja-Chicken wrote: Also dont try and export movies as anything except swf when using one :P
That will be because AS only works with .swf XD
Sup, bitches :)
LIAM THAT OWNZ ^^: And Thanx the script Ill credit ya for AS help ^^;
At 9/9/05 12:03 PM, T-H wrote:At 9/9/05 11:35 AM, LEMITUDE wrote: What is V Cam??? sounds interesting.Yeah its used in PBTR, you can't really use it for game scrolling though as it resizes the stage so co ordinates get messed up. Might be able to but I've never been able to get it working that way.
OIC.
You can use it in games... just make your own MC the same size as your stage (because its actually the resizing of the camera MC that causes the co-ords. to go funny), copy the AS accross minus the scaling and tint parts (if you dont need them) and bobs yer uncle.
I used it to do the scrolling for this: http://www.newground..ag/alphas/alpha/1194
although the camera's _x and _y positions are simply _root.cam._x = _root.hero._x ... but in the same way for mouse controled scrolling, you could have two simple, invisible MCs, set to _root.its_name1._x = _root.cam._x + 200 and for the 2nd.. - 200 with another bit of code, something along the lines of
if (_root._xmouse >= _root.its_name1._x){
_root.cam._x +=5;
}
or whatever.
DOH!
or even simpler... without the invisible MCs, you could just have:
if (_root._xmouse >= _root.cam._x +200){
_root.cam._x +=5;
}
if (_root._xmouse<= _root.cam._x -200){
_root.cam._x -=5;
}
At 9/9/05 12:27 PM, LEMITUDE wrote: OIC.
Thanks for that, didn't follow what you were saying completey but its good to know it can be done. I'll have a play around when i need to.
At 9/9/05 12:06 PM, -liam- wrote:At 9/9/05 12:05 PM, Ninja-Chicken wrote: Also dont try and export movies as anything except swf when using one :PThat will be because AS only works with .swf XD
Really you dont say??
OMG you are clever I didnt realise that I though I could use AS to make dvds
- Matt, Rustyarcade.com
ninja dont be harsh he's just commenting ^^;