Wrox Programmer Forums
|
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Flash (all versions) section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 24th, 2007, 01:50 PM
Registered User
 
Join Date: Jan 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default problem with two pages launching

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



 
Old January 24th, 2007, 04:53 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 249
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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
 
Old January 25th, 2007, 07:39 AM
Registered User
 
Join Date: Jan 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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






Similar Threads
Thread Thread Starter Forum Replies Last Post
Launching HTML Help in VB6 tknnguyen Pro VB 6 1 October 16th, 2007 02:28 PM
Launching Crystal reports from a Gridview redbull8vodka Crystal Reports 0 January 26th, 2007 06:45 AM
Access launching Word for mail merge Loralee Access 8 November 14th, 2005 04:24 PM
Launching Apps from VB?? PeteS Beginning VB 6 2 June 20th, 2003 01:23 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.