# Trying to emulate the Nissan Shift Intro

**URL:** https://forum.kirupa.com/t/trying-to-emulate-the-nissan-shift-intro/16826
**Category:** flash
**Created:** [March 28, 2003, 7:21pm UTC](https://forum.kirupa.com/t/trying-to-emulate-the-nissan-shift-intro/16826 "2003-03-28T19:21:19Z")
**Posts on this page:** 14
**Page:** 1

<div class="post-metadata">

### Author: ![tipusultan](https://avatars.discourse-cdn.com/v4/letter/t/b3f665/32.png) [@tipusultan](https://forum.kirupa.com/u/tipusultan)
#### Post date: [March 28, 2003, 7:21pm UTC](https://forum.kirupa.com/t/trying-to-emulate-the-nissan-shift-intro/16826/1 "2003-03-28T19:21:19Z")

</div>

Hi everyone…

I am trying to make something along the lines of  
[http://www.nissanusa.com/ms/shift/ShiftFlashFrameset](http://www.nissanusa.com/ms/shift/ShiftFlashFrameset)

isn’t that cool?

here is what i have so far  
[http://www.serindgroup.com/ShiftStyle.html](http://www.serindgroup.com/ShiftStyle.html)☹

as u can see, i am way off here… so i really need some help, hint, ideas, advice, anything… so put me into the right direction…

Thanks in advance…

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [March 28, 2003, 9:21pm UTC](https://forum.kirupa.com/t/trying-to-emulate-the-nissan-shift-intro/16826/2 "2003-03-28T21:21:22Z")

</div>

isn’t the Datsun site just a bunch of mcs that onRollOver and onRollOut play a fade in and fade out? so each pic is an mc that is stopped and when the mouse goes over, the mc fades and then when the mouse leaves, the mc finishes and stops.

you can’t build that interface with button symbols, it has to be mcs

if you want a specific example answer back and I’ll put up a fla with the basic idea this weekend

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [March 28, 2003, 10:23pm UTC](https://forum.kirupa.com/t/trying-to-emulate-the-nissan-shift-intro/16826/3 "2003-03-28T22:23:00Z")

</div>

Hey thanks for the reply

But I am kind of more lost now, cuz if its a bunch of movie clips, then how can you do a roll over effect on them and at the same time making them a link to something else?.. i.e. if the user clicks on it, it’s going to have to open up a new .swf

I just read yur post, so I am going to try and work on it right now and see how far I get with converting them into MCs, but yea an example would definately be awesome…

Thanks alot =)

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [March 28, 2003, 11:23pm UTC](https://forum.kirupa.com/t/trying-to-emulate-the-nissan-shift-intro/16826/4 "2003-03-28T23:23:03Z")

</div>

[http://www.kirupaforum.com/forums/showthread.php?s=&threadid=7457](http://www.kirupaforum.com/forums/showthread.php?s=&threadid=7457) :trout:

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [March 29, 2003, 1:10am UTC](https://forum.kirupa.com/t/trying-to-emulate-the-nissan-shift-intro/16826/5 "2003-03-29T01:10:49Z")

</div>

Yeah it is a bunch of MC’s. you can do it with buttons too if you want.

Its just a rollover effect. there is some code in there for the text to follow the mouse a little, and some other code to reduce the ambience of the page a little when you roll over the Mc’s but other than that…

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [March 29, 2003, 3:43pm UTC](https://forum.kirupa.com/t/trying-to-emulate-the-nissan-shift-intro/16826/6 "2003-03-29T15:43:01Z")

</div>

well, you can place movieclips for each imager, the individual mc has a timeline that fades in, stops, then fades out and stops

so imagine a set of rows and columns so that the top left mc has an instance name of A1, put an “invisible” button on top of each mc.

```auto
on (rollOver) {
    _root.A1.gotoAndPlay("fadeIn");
}
on (rollOut) {
    _root.A1.gotoAndPlay("fadeOut");
}
on (release) {
        loadMovieNum("A1content.swf", 2);
}

```

so you have an action for three user interactions. That would accomplish what you are trying to do in a n easy way.

Now, a real AS guru can write a single function that you could call for each mc . . . that would be a nice way to do it.

You might take a look at my homepage and the bottom “subquark actionscript” button. I had a lot of help from this forum on writing button functions that are nice and neat.

If you need more help, just answer back (I got to get a haircut right now . . .)

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [March 29, 2003, 7:58pm UTC](https://forum.kirupa.com/t/trying-to-emulate-the-nissan-shift-intro/16826/7 "2003-03-29T19:58:19Z")

</div>

Thanks alot subquark, that really helped me 🙂

I was trying to do the thing using arrays, but i guess yea this is a simpler way of doing it…I don’t have the whole thing done yet, but got the first piece to do the effect, so just have to do it for all the other ones…

oh…and um…for ilyamasse, sorry bud, didn’t read that post of yurs, but yea next time will be sure to put in the subject correctly…

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [March 29, 2003, 8:32pm UTC](https://forum.kirupa.com/t/trying-to-emulate-the-nissan-shift-intro/16826/8 "2003-03-29T20:32:29Z")

</div>

anything for a fellow-Queen-loving-Canadian, you do love the Queen?!?

Yeah, arrays and functions would be much neater but I don’t know enough to do that.

Post your work on the Site Check when your done! 🙂

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [March 31, 2003, 4:17am UTC](https://forum.kirupa.com/t/trying-to-emulate-the-nissan-shift-intro/16826/9 "2003-03-31T04:17:17Z")

</div>

yea I will definately post the final work and its code up on kirupa

and

yea ofcuz I love the Queen 🙂

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [March 31, 2003, 4:26pm UTC](https://forum.kirupa.com/t/trying-to-emulate-the-nissan-shift-intro/16826/10 "2003-03-31T16:26:29Z")

</div>

i know it’s kinda late but… i was bored 😛

```auto
instances = [];
vars = {i:0, o:0, e:0};
over = function() {
	for (k=0; k<instances.length; k++) instances[k].a = vars.o;
	this.a = vars.i;
}
out = function() {
	for (k=0; k<instances.length; k++) instances[k].a = vars.i;
}
fade = function() {
	this._alpha += (this.a-this._alpha)/vars.e;
}
for (k=0; k<instances.length; k++) {
	instances[k].a = vars.i;
	instances[k].onRollOver = over;
	instances[k].onRollOut = out;
	instances[k].onEnterFrame = fade;
}

```

just modify the first two lines…

_instances = [];_  
array containing the instance names of your movie clips.  
ie… _instances = [myMovieClip1, myMovieClip2, myMovieClip3, myMovieClip4];_

_vars = {i:0, o:0, e:0};_  
object containing the maximum alpha value (i), minimum alpha value (o), and ease speed (e).  
ie… _vars = {i:100, o:40, e:10};_

😉 =)

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [April 1, 2003, 3:59am UTC](https://forum.kirupa.com/t/trying-to-emulate-the-nissan-shift-intro/16826/11 "2003-04-01T03:59:51Z")

</div>

Hey kax…

That was exactly what i was looking for in the beginning, but then I would be stuck for the link part of it,

I mean I could make another function something like  
loadItUp = function () {  
for (k=0; k\<instances.length; k++)  
instances[k].a = vars.d;  
this.a = vars.i;  
loadMovieNum (“panelAbout.swf”, 6);  
}

where d is another variable whose value is 0 (that is I want the rest of the movie clips to turn black once something is clicked)

but then how do I know which .swf to pull up? …is using array a bad idea in this case? cuz this way the only way I can think of to do the linking is to do something like an if statement or case statement to find out which button the user clicked (does actionscript have case statements?)

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [April 1, 2003, 5:42am UTC](https://forum.kirupa.com/t/trying-to-emulate-the-nissan-shift-intro/16826/12 "2003-04-01T05:42:39Z")

</div>

a good idea would be naming the movie clips with the name of the movie to load…

so your function would be something like this:

```auto
loadItUp = function() {
for (k=0; k<instances.length; k++) instances[k].a = vars.d;
this.a = vars.i;
loadMovieNum(this._name+".swf", 6);
}

```

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [April 1, 2003, 10:27pm UTC](https://forum.kirupa.com/t/trying-to-emulate-the-nissan-shift-intro/16826/13 "2003-04-01T22:27:43Z")

</div>

thanks alot, that works perfectly…

i am beginning to love actionscript…

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [April 1, 2003, 10:50pm UTC](https://forum.kirupa.com/t/trying-to-emulate-the-nissan-shift-intro/16826/14 "2003-04-01T22:50:40Z")

</div>

no problem man =)

and i love actionscript since the day i started to work with flash :love: 😛
