# & AS 3: Anyone have a script for that pseudo 3D effect? Objects moving @ diff. speed?

**URL:** <https://forum.kirupa.com/t/as-3-anyone-have-a-script-for-that-pseudo-3d-effect-objects-moving-diff-speed/264632>\
**Category:** flash\
**Created:** [June 27, 2008, 10:27pm UTC](https://forum.kirupa.com/t/as-3-anyone-have-a-script-for-that-pseudo-3d-effect-objects-moving-diff-speed/264632 "2008-06-27T22:27:17Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![REEF](https://avatars.discourse-cdn.com/v4/letter/r/ce73a5/32.png) [@REEF](https://forum.kirupa.com/u/REEF)\
**Post date:** [June 27, 2008, 10:27pm UTC](https://forum.kirupa.com/t/as-3-anyone-have-a-script-for-that-pseudo-3d-effect-objects-moving-diff-speed/264632/1 "2008-06-27T22:27:17Z")

</div>

Kind of like [saintsandsoldiers.com](http://saintsandsoldiers.com) (when you click enter). Ive seen it done so many times, cant find the name of the effect though.

---

<div class="post-metadata">

**Author:** ![Anogar](https://avatars.discourse-cdn.com/v4/letter/a/ed655f/32.png) [@Anogar](https://forum.kirupa.com/u/Anogar)\
**Post date:** [June 27, 2008, 10:46pm UTC](https://forum.kirupa.com/t/as-3-anyone-have-a-script-for-that-pseudo-3d-effect-objects-moving-diff-speed/264632/2 "2008-06-27T22:46:56Z")

</div>

It’s called parallax. It just involves having the foreground move faster than the background.

---

<div class="post-metadata">

**Author:** ![REEF](https://avatars.discourse-cdn.com/v4/letter/r/ce73a5/32.png) [@REEF](https://forum.kirupa.com/u/REEF)\
**Post date:** [June 27, 2008, 11:14pm UTC](https://forum.kirupa.com/t/as-3-anyone-have-a-script-for-that-pseudo-3d-effect-objects-moving-diff-speed/264632/3 "2008-06-27T23:14:32Z")

</div>

Yeah, Ive been programming in Flash for 6 years and I dont know what a class is. Bro, I cant program for my life no matter how hard I try lol. I need help!

Problem is I have about 5 objects I need to scroll differently, and in a contained area (not the whole stage). Tough stuff.

---

<div class="post-metadata">

**Author:** ![krilnon](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/krilnon/32/34_2.png) [@krilnon](https://forum.kirupa.com/u/krilnon)\
**Post date:** [June 27, 2008, 11:26pm UTC](https://forum.kirupa.com/t/as-3-anyone-have-a-script-for-that-pseudo-3d-effect-objects-moving-diff-speed/264632/4 "2008-06-27T23:26:24Z")

</div>

It’s going to be a lot easier in Flash Player 10, if that makes you feel any better. [ot]And yes, I’m always watching your threads.[/ot]

---

<div class="post-metadata">

**Author:** ![REEF](https://avatars.discourse-cdn.com/v4/letter/r/ce73a5/32.png) [@REEF](https://forum.kirupa.com/u/REEF)\
**Post date:** [June 27, 2008, 11:39pm UTC](https://forum.kirupa.com/t/as-3-anyone-have-a-script-for-that-pseudo-3d-effect-objects-moving-diff-speed/264632/5 "2008-06-27T23:39:47Z")

</div>

Yeah, whenever that comes out :sure:.

---

<div class="post-metadata">

**Author:** ![0L4F](https://avatars.discourse-cdn.com/v4/letter/0/848f3c/32.png) [@0L4F](https://forum.kirupa.com/u/0L4F)\
**Post date:** [July 5, 2008, 1:29pm UTC](https://forum.kirupa.com/t/as-3-anyone-have-a-script-for-that-pseudo-3d-effect-objects-moving-diff-speed/264632/6 "2008-07-05T13:29:38Z")

</div>

You mean something like this (shameless self-plug) ?

> **[Rocketclowns | Creating experiences for brands and people](https://rocketclowns.com/)**
>
> Rocketclowns | Experience Design | Game development | Animation | Sound Design | App Development

or this (more plugging):

[http://www.shootingfootage.net/wg.html](http://www.shootingfootage.net/wg.html)

If so, I could help you with some code hints. Both are done in AS2.

---

<div class="post-metadata">

**Author:** ![REEF](https://avatars.discourse-cdn.com/v4/letter/r/ce73a5/32.png) [@REEF](https://forum.kirupa.com/u/REEF)\
**Post date:** [July 5, 2008, 8:04pm UTC](https://forum.kirupa.com/t/as-3-anyone-have-a-script-for-that-pseudo-3d-effect-objects-moving-diff-speed/264632/7 "2008-07-05T20:04:20Z")

</div>

[QUOTE=0L4F;2353908]You mean something like this (shameless self-plug) ?

> **[Rocketclowns | Creating experiences for brands and people](https://rocketclowns.com/)**
>
> Rocketclowns | Experience Design | Game development | Animation | Sound Design | App Development

or this (more plugging):

[http://www.shootingfootage.net/wg.html](http://www.shootingfootage.net/wg.html)

If so, I could help you with some code hints. Both are done in AS2.[/QUOTE]Yeah! You got exactly what I mean. I’d actually like to learn how to put the effect in a contained area (through a mask or something) inside an swf, and how to allow only X movement or Y movement (and of course how to activate both).

I’d love to learn how to program that, problem is Im the worst programmer on the planet. Recently, I lost 2 weeks on a website because I couldn’t figure out how to load simple XML text, perform a parallax scenery and how to make a reel of photos slide left/right on button presses.

PS. Oh and I just lost two days cause I couldn’t program a simple navigation. I’m on craigslist right now looking for flash programmers lol.

---

<div class="post-metadata">

**Author:** ![azdak](https://avatars.discourse-cdn.com/v4/letter/a/ba8739/32.png) [@azdak](https://forum.kirupa.com/u/azdak)\
**Post date:** [July 6, 2008, 7:35am UTC](https://forum.kirupa.com/t/as-3-anyone-have-a-script-for-that-pseudo-3d-effect-objects-moving-diff-speed/264632/8 "2008-07-06T07:35:42Z")

</div>

Like [this?](http://www.negatia.com) (plug plug)

Good tutorial-  
[http://imm.sheridanc.on.ca/imm2003/zhanghai/perspective-tutorial/tutorial1.shtml](http://imm.sheridanc.on.ca/imm2003/zhanghai/perspective-tutorial/tutorial1.shtml)

Reef- nice work.

---

<div class="post-metadata">

**Author:** ![REEF](https://avatars.discourse-cdn.com/v4/letter/r/ce73a5/32.png) [@REEF](https://forum.kirupa.com/u/REEF)\
**Post date:** [July 6, 2008, 6:34pm UTC](https://forum.kirupa.com/t/as-3-anyone-have-a-script-for-that-pseudo-3d-effect-objects-moving-diff-speed/264632/9 "2008-07-06T18:34:32Z")

</div>

Yeah, nice site lol. How do you get the effect to work full screen? Or is that just a really big swf?

And more importantly, how can I contain the effect in a certain area?

---

<div class="post-metadata">

**Author:** ![tpspoons](https://avatars.discourse-cdn.com/v4/letter/t/b4bc9f/32.png) [@tpspoons](https://forum.kirupa.com/u/tpspoons)\
**Post date:** [July 6, 2008, 7:41pm UTC](https://forum.kirupa.com/t/as-3-anyone-have-a-script-for-that-pseudo-3d-effect-objects-moving-diff-speed/264632/10 "2008-07-06T19:41:07Z")

</div>

put a mask over it? 😛

---

<div class="post-metadata">

**Author:** ![REEF](https://avatars.discourse-cdn.com/v4/letter/r/ce73a5/32.png) [@REEF](https://forum.kirupa.com/u/REEF)\
**Post date:** [July 6, 2008, 8:45pm UTC](https://forum.kirupa.com/t/as-3-anyone-have-a-script-for-that-pseudo-3d-effect-objects-moving-diff-speed/264632/11 "2008-07-06T20:45:52Z")

</div>

No, that’ll hide the view to an area. It won’t contain the code within the area.

The bounding box of the mouse is originally the stage, I need to change it to a specific area.

---

<div class="post-metadata">

**Author:** ![azdak](https://avatars.discourse-cdn.com/v4/letter/a/ba8739/32.png) [@azdak](https://forum.kirupa.com/u/azdak)\
**Post date:** [July 8, 2008, 7:24am UTC](https://forum.kirupa.com/t/as-3-anyone-have-a-script-for-that-pseudo-3d-effect-objects-moving-diff-speed/264632/12 "2008-07-08T07:24:24Z")

</div>

My site works by scaling to fit the window and some smoke and mirrors. What you’re basically doing with this is moving some MCs at various ratios to the cursor movement, via figuring out the cursor position in ratio to the stage. In that tut, it’s dividing by the stage height/width, but you could set the relative cursor bounding box to anything. Play with replacing all the stage.widths, ects with constants and you’ll see what I mean.  
(I think that makes sense) 😛

---

<div class="post-metadata">

**Author:** ![REEF](https://avatars.discourse-cdn.com/v4/letter/r/ce73a5/32.png) [@REEF](https://forum.kirupa.com/u/REEF)\
**Post date:** [July 9, 2008, 7:32pm UTC](https://forum.kirupa.com/t/as-3-anyone-have-a-script-for-that-pseudo-3d-effect-objects-moving-diff-speed/264632/13 "2008-07-09T19:32:31Z")

</div>

Would you mind giving me a sample .fla with some rectangles (to represent objects) that I can study? Thanks.
