Copy link to clipboard
Copied
Hi,
This may be a stupid question but I am not being able to solve it by myself ...
I have been animating gotoandstop buttons in AS3. Sometimes I can make the button work along several frames and other times it doesn't work and I have to use one button in each frame for the same function... can't figure the difference or what am I getting wrong ...
Any help here?
Thanks
Hi Ana
I haven't forgotten you and your problem with your buttons and gotoAndStop(). Examining your work I thought long and hard how to tell you that your kind of approach, how you build this AIR desktop app leads you into all kinds of problems. In short: you should be the author and maker of texts, graphics, layouts and overall content structure, somebody else should be responsible for programming and development. (whereby I'm really touched by the plight of the Iberian Lynx).
So in a nutshell: I
...Copy link to clipboard
Copied
Hi Ana B
Is this still related to this issue Go to previous frame ?
Your problem could be interpreted in several ways, the best would be your share your FLA with us. Then we/I could see better how your confusion came about.
Klaus
Copy link to clipboard
Copied
Hi Klaus
It is the same project but the question is different and it happens in different projects.
Thank you for the answer for the previous one, it worked perfectly
Let's see if I can explain better.
In the same timeline, I have several buttons with the AS3 go to frame and stop, in some places of the timeline I am able to use the same button and code in 3 or 4 different frames and in some other places I have to create different buttons for each frame even the action I want to use is exactly the same and I want it to go to the same place with the same button. I can't understand what changes to change the button behaviour.
I would share the project but it is a general doubt I have...
Thank you again
Ana
Copy link to clipboard
Copied
"I have several buttons"
Does that mean you have several button symbols in your library or you use the same button symbol in several frames?
"I am able to use the same button and code in 3 or 4 different frames"
Can you please past this code in your next reply?
"in some other places I have to create different buttons"
Again, what precisely does that mean, different button symbols from your library placed into those problematic frames or the same button symbol with different instance names?
further questions:
You know, your explanation is still somewhat unclear and this is an indication that this is also the cause of your problem.
Klaus
Copy link to clipboard
Copied
Hi again, sorry for my bad english ... and bad explanations about my problem...
"I have several buttons" - I am trying to use the same button symbols in several frames, with different instance names.
That's what I am doing when the same button that appears in diferent frames doesn't work on the second and next frames
"I am able to use the same button and code in 3 or 4 different frames" -
This is the code:
btclosememoria.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndStopAtFrame_31);
function fl_ClickToGoToAndStopAtFrame_31(event:MouseEvent):void
{
gotoAndStop(242);
}
But in some places it works from the frame where I code through the next frames (1) where the button appears and in other places (2) I have to put 5 or 6 diferent buttons with the same image and code to do exactly the same function.
It is probably something very basic that I am not getting.
Thanks for trying to help...
Copy link to clipboard
Copied
Hi Ana
I haven't forgotten you and your problem with your buttons and gotoAndStop(). Examining your work I thought long and hard how to tell you that your kind of approach, how you build this AIR desktop app leads you into all kinds of problems. In short: you should be the author and maker of texts, graphics, layouts and overall content structure, somebody else should be responsible for programming and development. (whereby I'm really touched by the plight of the Iberian Lynx).
So in a nutshell: I can't really help you with your button/gotoAndStop() problem without taking your work apart and re-organising it completely.
Though, there is still one thing left, your video issue:
"But if you're available I have a harder question... somehow in this project, where I am suppose to add some videos, every time I try to add a video with the playback then I get this error when using the button gotoandstop: "
ReferenceError: Error #1056: Cannot create property __id0_ on flash.display.Stage.
at flash.display::MovieClip/gotoAndStop()
at LinceV1_3_fla::MainTimeline/fl_ClickToGoToAndStopAtFrame_5()[LinceV1_3_fla.MainTimeline:: frame1:60]
When I tried to add a video using the FLVPlayback component I got the same ReferenceError. You know my last Actionscript 3 days are about 5 years ago. It's very rusty these days. It's all HTLM5 Canvas Javascript.
But while reading in the Actionscript 3 Reference for some time to refresh my knowledge it suddenly came to me. There is a problem with the FLVPlayback Component and Fullscreen. Your very first AS3 code starts with
stage.displayState = StageDisplayState.FULL_SCREEN;
Normally videos in the FLVPlayback component are supposed to be Fullscreen, the controls of the video often include a toggle Fullscreen button. But if the AIR or Flash Player document as such is already Fullscreen before the FLVPlayback component appears, this leads to trouble. I had this problem some 9 years ago and found a solution then.
What I did today was comment out your //stage.displayState = StageDisplayState.FULL_SCREEN; statement and then the videos are playeing without an error. So for now it's either Fullscreen but no videos or videos but no Fullscreen.
There's a very old post (2007) which helped me 9 years ago (2010) to begin tackling the problem: full-screen mode and FLVPlayback component conflict.
I suggest you post a new question here and in the Actionsript3 Subforum with the headline Full-screen mode and FLVPlayback component conflict, where you describe the problem like you did to me. Maybe some clever people who are still more into Actionscript 3 can help you with fresher advice that I can give you.
Klaus
Copy link to clipboard
Copied
Hi Klaus!
Thank you for your answer and help.
I totally agree with you and as a scientific illustrator I should only worry with the graphics and layout, but I really want to learn more about animate cc to be able to integrate it in some of my works.
I know I still do lots of errors but I am learning everday a bit more ... do you know of any good course on animatecc online? I am using the LinkedIn learning for now...
I had figure the fullscreem incompability will check the post you mention.
thank you
AB