Goto - midframe button problems

This is a discussion on "Goto - midframe button problems" within the Flash & Multimedia Forum section. This forum, and the thread "Goto - midframe button problems are both part of the Design Your Website category.



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

Notices


Reply
 
LinkBack Thread Tools
  #21 (permalink)  
Old Aug 30th, 2007, 17:39
Junior Member
Join Date: Jun 2007
Location: Leeds, England
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Goto - midframe button problems

I have already tried that. It still says that a ')' or ',' is expected.

This is driving me up the wall now.
Thanks for sticking my me.
Reply With Quote
  #22 (permalink)  
Old Aug 30th, 2007, 17:55
Multimedia Specialist
Join Date: Apr 2007
Location: Arizona
Age: 25
Posts: 666
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Goto - midframe button problems

This code gives me no errors, did you declare the variable curentframe anywhere like mine?
Code: Select all
var currentframe:String
contact.onRelease = function()
{
if (currentframe != "77")
{
gotoAndPlay("80");
}
}
Last Blog Entry: Yay!? (Oct 8th, 2007)
Reply With Quote
  #23 (permalink)  
Old Aug 31st, 2007, 16:33
Junior Member
Join Date: Jun 2007
Location: Leeds, England
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Goto - midframe button problems

Hey Scott. I have tried that already mate. Still says that its expecting a ')' or ','.

I'm sure this must be driving you up the wall. It is me! Have a good weekend. I will be spending a bit more time on this next week. Hopefully I can have a proper play and get it sorted.

Thanks mate.
Reply With Quote
  #24 (permalink)  
Old Sep 9th, 2007, 20:07
Junior Member
Join Date: Jun 2007
Location: Leeds, England
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Goto - midframe button problems

I am still getting an error on the if statement. It is expecting a ')' or ','

Any ideas before I give up complete?

I have this on an actions layer in the movie ('around'). I also have a 'MAIN' movie which is to be affected.

Thanks.

Code: Select all
home.onRelease = function()
{
If (current frame != "77");
{
gotoAndPlay("80");
}

tariffs.onRelease = function()
{
If (current frame != "77");
{
gotoAndPlay("80");
}
contact.onRelease = function()
{
If (current frame != "77");
{
gotoAndPlay("80");
}

find.onRelease = function()
{
If (current frame != "77");
{
gotoAndPlay("80");
}
Reply With Quote
  #25 (permalink)  
Old Sep 10th, 2007, 18:56
Multimedia Specialist
Join Date: Apr 2007
Location: Arizona
Age: 25
Posts: 666
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Goto - midframe button problems

Here is what it should look like...I get NO errors with this....
Code: Select all
var currentFrame;
home.onRelease = function()
{
if (currentFrame = "77")
gotoAndPlay("80");
}
Look closely at what I have...I removed the ; from after the if statement, I declared the currentFrame variable since it is something you are creating...and you'll need to set it's value to the appropriate amount depending the frame it is on inside the .swf.

P.S. Only declare the "var" once at the top of all of your code, no need to do it multiple times.

Cheers,

Scott
Last Blog Entry: Yay!? (Oct 8th, 2007)
Reply With Quote
  #26 (permalink)  
Old Sep 11th, 2007, 21:21
Junior Member
Join Date: Jun 2007
Location: Leeds, England
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Goto - midframe button problems

Hi Scott, Sorry mate. I thought you hadn't responded. But I stupidly didn't turn the page in the thread.

Thanks for the code. I am trying to figure it all out. I will do some research into declaring the currentframe var.

As i see it at the moment... I need to set the '77' value???

Because the currentframe will be differnent (due the the 'goto and stop' function), I tried.... !"77"

If currentframe does not equal 77 gotoAndPlay "80"

That didn't have the right effect. I'll keep at it.

Once again. I'm sure your sick of me by now. Thank you SO much.

Toby
Reply With Quote
Reply

Tags
flash, yjshjd

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
Submit button problems lucyhjones Starting Out 4 Sep 6th, 2007 18:22
Radio Button Problems in ActionScript 3.0 dgstarr Flash & Multimedia Forum 1 Sep 6th, 2007 17:11
Midframe variable David Blake Flash & Multimedia Forum 5 Jul 18th, 2007 19:43
goTo Top Button berjoe Webforumz Suggestions and Feedback 3 Oct 19th, 2006 16:02


All times are GMT. The time now is 03:42.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs 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 43