Copy link to clipboard
Copied
Hi,
I have these actions in frame 1 of an animation that used to work, but after removing a section, 2 of the buttons don't work, once the animation gets to the last frame.
stage.enableMouseOver;
//ChiroButton
this.ChiroButton.addEventListener("mouseover", overChiro.bind(this));
function overChiro()
{
this.gotoAndStop(99);
}
this.ChiroButtonWhite.addEventListener("mouseover", overChiroWhite.bind(this));
function overChiroWhite()
{
this.gotoAndStop(99);
}
this.ChiroButton.addEventListener("click", fl_ClickToGoToWebPageChiro);
function fl_ClickToGoToWebPageChiro() {
window.open("http://www.mpamedia.com/audiences/target_chr.php", "_blank");
}
this.ChiroMoreInfoButton.addEventListener("click", fl_ClickToGoToWebPageChiroMoreInfo);
function fl_ClickToGoToWebPageChiroMoreInfo() {
window.open("http://www.mpamedia.com/audiences/target_chr.php", "_blank");
}
//AcuButton
this.AcuButton.addEventListener("mouseover", overAcu.bind(this));
function overAcu()
{
this.gotoAndStop(201);
}
this.AcuButtonWhite.addEventListener("mouseover", overAcuWhite.bind(this));
function overAcuWhite()
{
this.gotoAndStop(201);
}
this.AcuButton.addEventListener("click", fl_ClickToGoToWebPageAcu);
function fl_ClickToGoToWebPageAcu() {
window.open("http://www.mpamedia.com/audiences/target_acu.php", "_blank");
}
this.AcuMoreInfoButton.addEventListener("click", fl_ClickToGoToWebPageAcuMoreInfo);
function fl_ClickToGoToWebPageAcuMoreInfo() {
window.open("http://www.mpamedia.com/audiences/target_acu.php", "_blank");
}
//ConsumerButton
this.ConsumerButton.addEventListener("mouseover", overConsumer.bind(this));
function overConsumer()
{
this.gotoAndStop(301);
}
this.ConsumerButtonWhite.addEventListener("mouseover", overConsumerWhite.bind(this));
function overConsumerWhite()
{
this.gotoAndStop(301);
}
this.ConsumerButton.addEventListener("click", fl_ClickToGoToWebPageConsumer);
function fl_ClickToGoToWebPageConsumer() {
window.open("http://www.mpamedia.com/audiences/target_con.php", "_blank");
}
this.ConsumerMoreInfoButton.addEventListener("click", fl_ClickToGoToWebPageConsumerMoreInfo);
function fl_ClickToGoToWebPageConsumerMoreInfo() {
window.open("http://www.mpamedia.com/audiences/target_con.php", "_blank");
}
The last working version of this can be found at: https://www.mpamedia.com. I have since removed the "Massage" section and when the play head gets to the final frame, the Chiropractic & Acupuncture buttons only function as simple buttons (where the rollover state of the button can be seen to work, but the actions that move the play head in the timeline on mouseover no longer function.
I am an old Flash trained designer who is not up to date on Animate/ActionScript3 and was never really a scripter to begin with. Please help!
Thanks,
Thomas
Copy link to clipboard
Copied
do you see an error when testing?
Copy link to clipboard
Copied
I see this under Output:
WARNINGS:
** 4 Bitmaps packed successfully into 1 spritesheet(s).
Frame numbers in EaselJS start at 0 instead of 1. For example, this affects gotoAndStop and gotoAndPlay calls. (20)
Content with both Bitmaps and Buttons may generate local security errors in some browsers if run from the local file system.
Motion tweens are published as frame by frame animations. Use classic tweens where possible. (15)
Can I send you the file?
Thanks,
Thomas
Copy link to clipboard
Copied
open your browser's developer console and check for errors when testing.
[moved from ActionScript 3 to Adobe Animate CC]
Copy link to clipboard
Copied
I'm not sure if I'm looking under the right section, but I don't see any errors.
Copy link to clipboard
Copied
click on console and attach a screenshot.
Copy link to clipboard
Copied
It is Blank.
Copy link to clipboard
Copied
did you click the problematic button?
Copy link to clipboard
Copied
Copy link to clipboard
Copied
put a console.log in your button listener to see if its being called.
Copy link to clipboard
Copied
Sorry, I am clueless...
Is this the correct call?
console.log(want);
Can you explain how / where to add it?
Thanks,
Thomas
Copy link to clipboard
Copied
put want in quotes: “want”
place it in the problematic button’s listener.
Copy link to clipboard
Copied
Like this?
this.AcuButtonWhite.addEventListener("mouseover", "want", overAcuWhite.bind(this));
Copy link to clipboard
Copied
no.
if that’s the problem button and listener, use:
function overAcuWhite(){
this.gotoAndStop(201);
console.log(”want”);
}
Copy link to clipboard
Copied
When I add "want", the top 2 buttons stop working correctly and the console does not provide additional information.
Copy link to clipboard
Copied
read my last message
Copy link to clipboard
Copied
When I add the following, the movie won't load in my browser.
console.log(”want”);
}
-----------------------------------------------------------
this.ChiroButton.addEventListener("mouseover", overChiro.bind(this));
function overChiro()
{
this.gotoAndStop(99);
}
this.ChiroButtonWhite.addEventListener("mouseover", overChiroWhite.bind(this));
function overChiroWhite()
console.log(”want”);
}
{
this.gotoAndStop(99);
}
Copy link to clipboard
Copied
no.
look at my code and mimic it.
Copy link to clipboard
Copied
This exact code does not load.
//AcuButton
this.AcuButton.addEventListener("mouseover", overAcu.bind(this));
function overAcu()
{
this.gotoAndStop(201);
}
this.AcuButtonWhite.addEventListener("mouseover", overAcuWhite.bind(this));
function overAcuWhite(){
this.gotoAndStop(201);
console.log(”want”);
}
this.AcuButton.addEventListener("click", fl_ClickToGoToWebPageAcu);
function fl_ClickToGoToWebPageAcu() {
window.open("http://www.mpamedia.com/audiences/target_acu.php", "_blank");
}
this.AcuMoreInfoButton.addEventListener("click", fl_ClickToGoToWebPageAcuMoreInfo);
function fl_ClickToGoToWebPageAcuMoreInfo() {
window.open("http://www.mpamedia.com/audiences/target_acu.php", "_blank");
}
Copy link to clipboard
Copied
what do you mean, “it doesn’t load”.
Copy link to clipboard
Copied
When I change the code to exactly what I pasted above (for that section) and then test movie, I get a blank page.
Copy link to clipboard
Copied
open the console and check for an error.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Found it. It was the curly quotes I copied and pasted.
But no new inspector clues and the buttons are working even more erratically.
Copy link to clipboard
Copied
If there is any chance I can get you to help fix this by tomorrow (I expected to have this fixed and live tomorrow). Please let me know.
Thank you for trying to assist.
Thomas