Share
View previous topicGo downView next topic
avatar
Spritan
Spritan
Reputation:
Age:
Posts:
Registration Date:
Location:
View user profile

Parallax Code

on 4/12/2012, 1:15 pm
I'm having trouble with the parallax code Leo posted in some old topic. Unless I've done something wrong, you paste this code onto the sky/whatever and it should always be in the same position as the V-Cam.


onClipEvent(enterFrame){
this._x=_root.vcam._x
this._y=_root.vcam._y
this._xscale=_root.vcam._xscale
this._yscale=_root.vcam._yscale
}

SWF here: http://www.newgrounds.com/dump/item/a7405e41a497ba1be11bb8db055362cf

I've probably completely overlooked something important lmao.
avatar
Moderator
Moderator
Reputation:
Age:
Posts:
Registration Date:
Location:
View user profile

Re: Parallax Code

on 4/12/2012, 1:24 pm
Is your vcam with the instance name of "vcam" (without quotes)?

If not, that's why.
avatar
Spritan
Spritan
Reputation:
Age:
Posts:
Registration Date:
Location:
View user profile

Re: Parallax Code

on 4/12/2012, 1:29 pm
Fixed that, but it still doesn't seem to be working.





avatar
Moderator
Moderator
Reputation:
Age:
Posts:
Registration Date:
Location:
View user profile

Re: Parallax Code

on 4/12/2012, 1:48 pm
Give me your FLA, I'll see what's going on.
avatar
Spritan
Spritan
Reputation:
Age:
Posts:
Registration Date:
Location:
View user profile

Re: Parallax Code

on 4/12/2012, 1:53 pm





avatar
Moderator
Moderator
Reputation:
Age:
Posts:
Registration Date:
Location:
View user profile

Re: Parallax Code

on 4/12/2012, 2:21 pm
yo
When I was talking about instance name, I was talking about this

NOT THE NAME OF THE MOVIECLIP
UGGGHHHHHHHHHHHH

Just type "vcam" without quotes on the field I showed you which has INSTANCE NAME inside it.

But I also noticied a bunch of other errors here.
First your V-CAM. It's with the wrong size. You tried to fix that but you did it wrong since you cannot stretch it on the animation itself. Only INSIDE it's movie clip, all you gotta do is make the viewfinder rectangle be the same size as your stage.

Another thing is that the image of the sky (why a image, if it's only a gradient?) is not on the center of it's registration point (or whatever the hell it is called). That way, when the code tells the sky to match its center with the center of the v-cam, the sky ends up on the wrong place.

But whatever, I fixed everything and it's working now. I even gave you a new v-cam.
http://www.newgrounds.com/dump/item/9f644c214ac4725b5c4c7719745db6a1
And for the love of god, don't ever put filters on a high quality setting. Low is all you need.

Happy animating.
avatar
Spritan
Spritan
Reputation:
Age:
Posts:
Registration Date:
Location:
View user profile

Re: Parallax Code

on 4/12/2012, 2:47 pm
*takes vcam*





"On my business card, I am a corporate president. In my mind, I am a game developer. But in my heart, I am a gamer." - Satoru Iwata 1959-2015
avatar
Moderator
Moderator
Reputation:
Age:
Posts:
Registration Date:
Location:
View user profile

Re: Parallax Code

on 4/12/2012, 3:11 pm
@NS01 wrote:*takes vcam*

noooooooooooooooooooooooooooooooooo

It's an extension I got from here
http://anipedia.thebackalleys.com/index.php/Flash_extensions
avatar
Spritan
Spritan
Reputation:
Age:
Posts:
Registration Date:
Location:
View user profile

Re: Parallax Code

on 4/12/2012, 5:55 pm
Leo=bein badass and helpin people at only 14. Like a boss.
avatar
Spritan
Spritan
Reputation:
Age:
Posts:
Registration Date:
Location:
View user profilehttp://psychodino3.deviantart.com/https://twitter.com/PsychoDino

Re: Parallax Code

on 4/12/2012, 6:01 pm
Wait hes 14......Well we know hes going to get famous.
avatar
Moderator
Moderator
Reputation:
Age:
Posts:
Registration Date:
Location:
View user profile

Re: Parallax Code

on 4/12/2012, 6:04 pm
yoshifanatic2595 wrote:Wait hes 14......Well we know hes going to get famous.

wait
you didn't know?
avatar
Spritan
Spritan
Reputation:
Age:
Posts:
Registration Date:
Location:
View user profilehttp://psychodino3.deviantart.com/https://twitter.com/PsychoDino

Re: Parallax Code

on 4/12/2012, 6:20 pm
Nope late as hell
avatar
Spritan
Spritan
Reputation:
Age:
Posts:
Registration Date:
Location:
View user profile

Re: Parallax Code

on 4/13/2012, 3:53 am
I always knew leo was a kid -.-













(talented 1)





avatar
Spritan
Spritan
Reputation:
Age:
Posts:
Registration Date:
Location:
View user profilehttp://psychodino3.deviantart.com/https://twitter.com/PsychoDino

Re: Parallax Code

on 4/13/2012, 10:40 am
lol my lazy ass left eye never took the time to check his age, well hes young and talented.
View previous topicBack to topView next topic
Permissions in this forum:
You cannot reply to topics in this forum