Subject: problem with two pages launching
Posted By: Diggers33 Post Date: 1/24/2007 12:50:20 PM
Hello,

I have the following script on two different buttons

onClipEvent (load) {
    num = 1;
}
onClipEvent (mouseUp) {
getURL("http://www.siesta.cat");
}

onClipEvent (load) {
    num = 2;
}
onClipEvent (mouseUp) {
getURL("http://www.ipic.cat");
}

What is supposed to happen is when you roll the mouse over the first icon it shakes and then when you click it open the html page. the same with the second icon. The problem is that they are connected and when I click on one icon both pages open.

Any ideas?

Thanks



Reply By: harpua Reply Date: 1/24/2007 3:53:01 PM
Since you have 2 movies you have to given each movie clip a seperate name and use the onRelease event for movieclips.

_root.myFirstMovieClipName_mc.onRelease = function() {
    getURL("http://www.siesta.cat");
}

_root.mySecondMovieClipName_mc.onRelease = function() {
    getURL("http://www.ipic.cat");
}

Peace
Mike
http://www.eclecticpixel.com
Reply By: Diggers33 Reply Date: 1/25/2007 6:39:20 AM
when I change it to the following

mc2.onrelease = function() {
run = 2
}

or

mc2.onrelease = function() {
getURL("http://www.ipic.cat")
}

I get the follwoing error

Statement must appear within on(onClipEvent handler.

Any ideas?


Thanks


Go to topic 55369

Return to index page 53
Return to index page 52
Return to index page 51
Return to index page 50
Return to index page 49
Return to index page 48
Return to index page 47
Return to index page 46
Return to index page 45
Return to index page 44