I took what CrackerJack said and started working on the template.
Here’s where i ask for help about a new script I made.
When I try to run the script from the main class, it throws an error like:
“A super statement can be used only inside class instance contructors”.
I’m trying to make a variable available to 4 different OTHER classes, and I’m using dispatchEvent to fire the function in order to get the value… supposedly. But that’s not working for some reason. Because before I can test it, the error shouts… NOOOO !! YOU CAN ’T DO THAT !!
As you can see from the link above, the footer and mp3 player change their Y positions upon clicking a menu item. But when opening the “Image Gallery”, “Video Gallery”, and “Portfolio” pages, actually AFTER opening them, the footer stays in its last position even though the content changes when interacting with it.
Might someone be able to tell me what I’m doing wrong with that class I posted on Pastie.org? Why is it throwing that error? Honestly, I don’t understand super statements very well. Its my first time using one.
Never mind. I found a cheap solution. Gosh!!
Yo Joe, It’s because you have a semi-colon in the class constructor before the brackets begin
Oh, you mean I didn’t have to delete it and do something else? Hmm, oh well. I couldn’t wait, so I went ahead and changed it. But thanks, that’s very helpful. I usually don’t make that mistake.
- Author had a Free File of the Month
- Envato Studio (Microlancer) Beta Tester
- Beta Tester
- Contributed a Tutorial to a Tuts+ Site
- Won a Competition
- Repeatedly Helped protect Envato Marketplaces against copyright violations
- Author has had an Item Featured
- Author was Featured
- Referred between 1 and 9 users
Yeah, I went back and ended up using the code anyway. I had to change it up a bit, but it works.