What is wrong with my code

This is a discussion on "What is wrong with my code" within the Flash & Multimedia Forum section. This forum, and the thread "What is wrong with my code are both part of the Design Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Design Your Website > Flash & Multimedia Forum

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Jul 30th, 2007, 13:45
Reputable Member
Join Date: Mar 2007
Location: UK
Posts: 305
Thanks: 0
Thanked 0 Times in 0 Posts
What is wrong with my code

What is wrong with my AS code?

on release{
getURL"http:www.google.com""_self";
}
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Jul 30th, 2007, 13:50
Reputable Member
Join Date: Jul 2007
Location: UK, Essex
Age: 21
Posts: 172
Thanks: 0
Thanked 1 Time in 1 Post
Re: What is wrong with my code

his error occurs if you put object code on a frame instead of the object...

"**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 1: Mouse events are permitted only for button instances
on (release) (


The next two errors can result from and incomplete function or a function with an extra paren that is not needed...

**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 2: ')' expected
getURL("http://www.google.com", "_self");

**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 3: Unexpected ')' encountered
)

The final error is due to the getURL method being empty...

**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 1: Wrong number of parameters; getURL requires between 1 and 3.
getURL();"


If your using object code, make sure the object is highlighted before posting code in the AS window. The AS window will tell you what object or frame is in focus at the top of the window.
Useful Tutorials
http://ntdesigns.net/tutorial/imageAnimation.html
http://ntdesigns.net/tutorial/toolTips.html
http://ntdesigns.net/tutorial/Mailform.html
http://ntdesigns.net/tutorial/FlashCardGames.html

Wayne
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Jul 30th, 2007, 14:01
Reputable Member
Join Date: Mar 2007
Location: UK
Posts: 305
Thanks: 0
Thanked 0 Times in 0 Posts
Re: What is wrong with my code

Ok I get:

Scene 1, Layer 'Layer Name', Frame 1, Line 1

1071: Syntax error: expected a definition keyword (such as function) after attribute on, not release.

on release{
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old Jul 30th, 2007, 14:58
Multimedia Specialist
Join Date: Apr 2007
Location: Arizona
Age: 25
Posts: 666
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Re: What is wrong with my code

It should look like this:

Code: Select all
on (release)
{
getURL("http://www.google.com", _self);
}
Cheers,

Scott
Last Blog Entry: Yay!? (Oct 8th, 2007)

Last edited by Sgaspar11; Jul 30th, 2007 at 15:01.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old Jul 30th, 2007, 15:18
Reputable Member
Join Date: Mar 2007
Location: UK
Posts: 305
Thanks: 0
Thanked 0 Times in 0 Posts
Re: What is wrong with my code

ok that gives me more errors
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6  
Old Jul 30th, 2007, 15:22
Multimedia Specialist
Join Date: Apr 2007
Location: Arizona
Age: 25
Posts: 666
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Re: What is wrong with my code

Flash 8 or 9? No errors for me in Flash 8.

Remember, this needs to be ON a button, NOT on the actions layer since it uses the "on" scripting feature.
Last Blog Entry: Yay!? (Oct 8th, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7  
Old Jul 30th, 2007, 15:31
Reputable Member
Join Date: Mar 2007
Location: UK
Posts: 305
Thanks: 0
Thanked 0 Times in 0 Posts
Re: What is wrong with my code

9 and I'm putting the code here:
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #8  
Old Jul 30th, 2007, 15:33
Reputable Member
Join Date: Mar 2007
Location: UK
Posts: 305
Thanks: 0
Thanked 0 Times in 0 Posts
Re: What is wrong with my code

select the layer that the button is on as a symbol and action scripting, if I go into the button it says:

Current selection cannot have actions applied to it
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #9  
Old Jul 30th, 2007, 16:07
Reputable Member
Join Date: Mar 2007
Location: UK
Posts: 305
Thanks: 0
Thanked 0 Times in 0 Posts
Re: What is wrong with my code

sorted, cheers guys
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #10  
Old Jul 30th, 2007, 16:19
Multimedia Specialist
Join Date: Apr 2007
Location: Arizona
Age: 25
Posts: 666
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Re: What is wrong with my code

Mind sharing what you did to fix it?

Scott
Last Blog Entry: Yay!? (Oct 8th, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
code, wrong

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] What have I done wrong in this code? acrikey JavaScript Forum 6 Mar 23rd, 2008 22:39
What's wrong with this code?? Lexxi JavaScript Forum 1 Apr 26th, 2007 01:07
AAArrrgggg....what;s wrong with this code murf JavaScript Forum 2 Nov 25th, 2006 00:50
what is wrong with this code inusrat JavaScript Forum 0 Jun 28th, 2006 13:18
Can somebody give me the code to hide the source code? renren JavaScript Forum 7 Mar 7th, 2006 12:27


All times are GMT. The time now is 13:43.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42