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.
|
|
|
|
|
![]() |
||
Goto - midframe button problems
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
Goto - midframe button problems
Hi peps,
Wondering if you can help. Please could you look at a site that is under construction. www.selfcatering-bridlington.co.uk I have a midframe action working. Playing an intro and an outro. If you could look at the 'AROUND BRIDLINGTON' button. It loads in fine, but when you click another button you will see my problem. The script stops when needed. you can use the goto and stop buttons. When you click away the animation plays from that point to the end of the animation. Is there a way of jumping the animationto the outro only??? Thanks for taking your time to help me out. |
|
|
|
|||
|
Re: Goto - midframe button problems
That is why I am seeing the delay between clicking the button and it playing the animation I presume....
Did you use this tutorial to build it? If not check it out this is how it should be structured. http://www.kirupa.com/developer/mx2004/transitions.htm
Last Blog Entry: Yay!? (Oct 8th, 2007)
|
|
|||
|
Re: Goto - midframe button problems
Hi Sgaspar11 (Scott if I remember correctly??)
Thanks for the guidance. Yes I did use that tutorial. The transitions worked fine, the problem I am having is the 'go to' and 'stop' command. If the play head jumps to a certain point then the user clicks another button the play head plays the remains 'go to' and 'stop' animations then plays the fade out transition. Do you know if there is any actionscript I might be able to use to make the play head jump to the fade out animation when the user clicks another navigation button? Thanks again for your help Toby |
|
|||
|
Re: Goto - midframe button problems
I am sure there is, this will take some thinking...and right now I got a bad bad head cold and probably won't be able to think in a code mindset right now....
Last Blog Entry: Yay!? (Oct 8th, 2007)
|
|
|||
|
Re: Goto - midframe button problems
No worries. Hope you feel better soon.
|
|
|||
|
Re: Goto - midframe button problems
Is there anyone else that might know the answer out there?
|
|
|||
|
Re: Goto - midframe button problems
Do you have any experience writing IF statements? Let's think together how this would look. I'm gonna learn you. :-P
Using IF and THEN statements, just talk out what you think this should look like from an AS perspective. The code doesn't need to be proper, just write it out to start... :-)
Last Blog Entry: Yay!? (Oct 8th, 2007)
|
|
|||
|
Re: Goto - midframe button problems
Thanks scott. Hope you are feeling better. I have dabbled in PHP. I'll give it a go.
Cheers |
|
|||
|
Re: Goto - midframe button problems
if (another button is pressed){
then this.gotoAndPlay("80"); } Am I on the right track? Do i need to specify the buttons as variables? |
|
|||
|
Re: Goto - midframe button problems
yep you need to specify the buttons and/or certain frames as a varible....
So you could say something in that IF statement like.... If (currently frame !=(does not equal) "A Certain Frame") { gotoAndPlay("80"); }
Last Blog Entry: Yay!? (Oct 8th, 2007)
|
|
|||
|
Re: Goto - midframe button problems
Thanks Scott. I have been trying to figure out where the IF statement should go.
I take it that its not on the midframe? Or on the movie that is 'Around Bridlington'? So perhaps the buttons? But would that work? each movie is of different length. Also, is an instance name or frame name the same as declaring a variable? Or do I need actionscript? Thanks for sticking by me Scott. I'm really grateful for your help. |
|
|||
|
Re: Goto - midframe button problems
Yep, there are a couple of places you can put this.
You can either place it right on the button(which I wouldn't reccomend) or you can use the "." syntax on your actions layer to call it.... Let's say your button has an instance name of "button" (properties panel, lower left corner) you could use something like:
Last Blog Entry: Yay!? (Oct 8th, 2007)
|
|
|||
|
Re: Goto - midframe button problems
Hi Scott,
I have this: Quote:
Also, I have given instances to all my buttons now. I presume that I would have to duplicate this actionscript replacing 'home' with the other buttons? Or can I use another method? Arrays are groups of variable aren't they? In PHP I could have done this with a '$buttons' declaration. Thanks again for your support. |
|
|||
|
Re: Goto - midframe button problems
You are missing a } at the very end of the code...
Make it look like this:
Let's get this working on 1 button though before we talk about arrays. Cheers, Scott
Last Blog Entry: Yay!? (Oct 8th, 2007)
Last edited by Sgaspar11; Aug 10th, 2007 at 20:40. |
|
|||
|
Re: Goto - midframe button problems
Hi Scott. I put the code on my button and it was dead. I already have the code:
|
|
|||
|
Re: Goto - midframe button problems
Does anyone have any ideas?
Scott mentioned: Quote:
Thanks Toby |
|
|||
|
Re: Goto - midframe button problems
That is what you are already using with that script, mostly.
The other thing you can do is give the button on instance name, say "button" And instead of placing the code on the actual button, you would create and actions layer and say say: button.onRelease = function() //button is the name of the button. { code goes here. } Not sure if that'd fix the problem but it is defiantely cleaner
Last Blog Entry: Yay!? (Oct 8th, 2007)
|
|
|||
|
Re: Goto - midframe button problems
Awesome. Your a star Scott. thanks again for your support. I will try that and get back.
Cheers. |
|
|||
|
Re: Goto - midframe button problems
Hi Scott,
I have finally found five mins to look at this again. Thanks for the input. I am getting an error on the IF statements. Quote:
|
|
|||
|
Re: Goto - midframe button problems
Make it look like this: You just forgot a semi colon...:-)
Last Blog Entry: Yay!? (Oct 8th, 2007)
|
![]() |
| Tags |
| flash, yjshjd |
| Thread Tools | |
|
|
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 |