Link to url with buttons

  • lvchang
  • Novice
  • Novice
  • User avatar
  • Posts: 34
  • Loc: malaysia

Post 3+ Months Ago

I have try to do link it to next scene!\

my second try is export it out and link in in a url format!

code:

button.onPress = function() {
getURL("F:\IAM\IAM project\Narnia_Scene 4.swf");
}

error;

**Error** Scene=Scene 1, layer=Cast, frame=84:Line 1: Statement must appear within on handler
button.onPress = function() {

Total ActionScript Errors: 1 Reported Errors: 1



and if I don't put the handler, it appear like this:


**Error** Scene=Scene 1, layer=Cast, frame=84:Line 1: Statement must appear within on handler
  • Tchuki
  • Mastermind
  • Mastermind
  • Tchuki
  • Posts: 1774
  • Loc: Edinburgh

Post 3+ Months Ago

Code: [ Select ]
on(release) {
gotoAndPlay("SCENE", FRAME);
}
  1. on(release) {
  2. gotoAndPlay("SCENE", FRAME);
  3. }


Or

Code: [ Select ]
on(release) {
getURL("path_to_file", "_self");
}
  1. on(release) {
  2. getURL("path_to_file", "_self");
  3. }
  • kanaduh
  • Student
  • Student
  • User avatar
  • Posts: 86

Post 3+ Months Ago

Are you just trying to make it so when you click on a button it goes to next scene?
If so use the code:
Code: [ Select ]
on(release) {
gotoAndPlay("SCENE", FRAME);
}
  1. on(release) {
  2. gotoAndPlay("SCENE", FRAME);
  3. }

It always works with me! :D
  • lvchang
  • Novice
  • Novice
  • User avatar
  • Posts: 34
  • Loc: malaysia

Post 3+ Months Ago

i don't know! I'm using the Flash Mx 2004

thats why some of the codes cannot be accepted by the application!
  • lvchang
  • Novice
  • Novice
  • User avatar
  • Posts: 34
  • Loc: malaysia

Post 3+ Months Ago

yay i got it

this is my codes :D

on (release) {

//Goto Webpage Behavior
getURL("Narnia_Scene 4.swf","_self");
//End Behavior

}

Post Information

  • Total Posts in this topic: 5 posts
  • Users browsing this forum: No registered users and 9 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.