# Changing images using AS

**URL:** <https://forum.kirupa.com/t/changing-images-using-as/264590>\
**Category:** flash\
**Created:** [June 27, 2008, 3:12pm UTC](https://forum.kirupa.com/t/changing-images-using-as/264590 "2008-06-27T15:12:19Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![mrwizard](https://avatars.discourse-cdn.com/v4/letter/m/bbce88/32.png) [@mrwizard](https://forum.kirupa.com/u/mrwizard)\
**Post date:** [June 27, 2008, 3:12pm UTC](https://forum.kirupa.com/t/changing-images-using-as/264590/1 "2008-06-27T15:12:19Z")

</div>

Hi,

I’ve just joined this forum 🙂

I’m editing a website, it has a picture on top. What I want to do is to use a different picture for every different page (home, contact etc). So when they click on lets say contact it loads the contact page (which it does right now) and also changes the picture on top to the contact one.

Sunny!

---

<div class="post-metadata">

**Author:** ![pantas](https://avatars.discourse-cdn.com/v4/letter/p/3e96dc/32.png) [@pantas](https://forum.kirupa.com/u/pantas)\
**Post date:** [June 27, 2008, 3:29pm UTC](https://forum.kirupa.com/t/changing-images-using-as/264590/2 "2008-06-27T15:29:56Z")

</div>

check out the tutorials…  
you guys waste more time here waiting for anyone, then reading and learning in the tutorial section…

---

<div class="post-metadata">

**Author:** ![mrwizard](https://avatars.discourse-cdn.com/v4/letter/m/bbce88/32.png) [@mrwizard](https://forum.kirupa.com/u/mrwizard)\
**Post date:** [June 27, 2008, 3:51pm UTC](https://forum.kirupa.com/t/changing-images-using-as/264590/3 "2008-06-27T15:51:48Z")

</div>

[quote=pantas;2350225]check out the tutorials…  
you guys waste more time here waiting for anyone, then reading and learning in the tutorial section…[/quote]

Thats how I find this site while searching for tutorials on google. I cant find the one that can solve my probs. thanx for the nice welcome anywayz

---

<div class="post-metadata">

**Author:** ![pantas](https://avatars.discourse-cdn.com/v4/letter/p/3e96dc/32.png) [@pantas](https://forum.kirupa.com/u/pantas)\
**Post date:** [June 27, 2008, 4:01pm UTC](https://forum.kirupa.com/t/changing-images-using-as/264590/4 "2008-06-27T16:01:21Z")

</div>

lol…dont be offended…

welcome 🙂  
[http://www.kirupa.com/developer/mx/loading.htm](http://www.kirupa.com/developer/mx/loading.htm)

---

<div class="post-metadata">

**Author:** ![mrwizard](https://avatars.discourse-cdn.com/v4/letter/m/bbce88/32.png) [@mrwizard](https://forum.kirupa.com/u/mrwizard)\
**Post date:** [June 27, 2008, 4:41pm UTC](https://forum.kirupa.com/t/changing-images-using-as/264590/5 "2008-06-27T16:41:29Z")

</div>

Actually thats the problem!! Whenever I search I get lot of results for loading images “externally”, just like your link. I have created a symbol(movie) and frame 1 is pic1 for home frame 2 is pic2 for about us and so on…Thats how I want to do it.

---

<div class="post-metadata">

**Author:** ![pantas](https://avatars.discourse-cdn.com/v4/letter/p/3e96dc/32.png) [@pantas](https://forum.kirupa.com/u/pantas)\
**Post date:** [June 27, 2008, 4:58pm UTC](https://forum.kirupa.com/t/changing-images-using-as/264590/6 "2008-06-27T16:58:04Z")

</div>

ahhhhhhhhhhh so your not loading a pic!

picture\_mc.gotoAndStop(the contacts picture frame)

---

<div class="post-metadata">

**Author:** ![mrwizard](https://avatars.discourse-cdn.com/v4/letter/m/bbce88/32.png) [@mrwizard](https://forum.kirupa.com/u/mrwizard)\
**Post date:** [June 27, 2008, 5:38pm UTC](https://forum.kirupa.com/t/changing-images-using-as/264590/7 "2008-06-27T17:38:49Z")

</div>

Not working!!

I even tried pic.pic3.play();

Actually im trying to edit a flash template and the button alreay has this AS, this make the page load! but wont change the pic on top ☹

onClipEvent (load)  
{  
num = 2;  
}  
on (rollOver)  
{  
if (\_root.link != num)  
{  
this.gotoAndPlay(“s1”);  
} // end if  
}  
on (releaseOutside, rollOut)  
{  
if (\_root.link != num)  
{  
this.gotoAndPlay(“s2”);  
} // end if  
}  
on (release)  
{  
if (\_root.link != num && \_root.animation == 1)  
{  
\_root.animation = 0;  
\_root.link\_prev = \_root.link;  
\_parent[“item” + \_root.link].gotoAndPlay(“s2”);  
\_root.link = num;  
\_root.play();  
\_root.anim.gotoAndPlay(“s1”);  
\_root.scroller.scroller.gotoAndStop(3);  
\_root.DY = stage.height + 4;  
\_root.DX = stage.width + 4;  
} // end if  
}
