4247 posts
  • Attended a Community Meetup
  • Bought between 10 and 49 items
  • Contributed a Blog Post
  • Exclusive Author
  • Has been a member for 5-6 years
  • Sold between 10 000 and 50 000 dollars
  • United States
Aw_Shucks says

I took what CrackerJack said and started working on the template. Here’s where i ask for help about a new script I made.

http://pastie.org/1340060

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 !!

http://urprogressions.com/awshucks/envisiontemplate/index.html

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.

4247 posts
  • Attended a Community Meetup
  • Bought between 10 and 49 items
  • Contributed a Blog Post
  • Exclusive Author
  • Has been a member for 5-6 years
  • Sold between 10 000 and 50 000 dollars
  • United States
Aw_Shucks says

Never mind. I found a cheap solution. Gosh!!

5310 posts The Dude Abides
  • United States
  • Exclusive Author
  • Has been a member for 5-6 years
  • Elite Author
  • Bought between 100 and 499 items
  • Referred between 100 and 199 users
  • Author had a Free File of the Month
+5 more
CodingJack says

Yo Joe, It’s because you have a semi-colon in the class constructor before the brackets begin :)

4247 posts
  • Attended a Community Meetup
  • Bought between 10 and 49 items
  • Contributed a Blog Post
  • Exclusive Author
  • Has been a member for 5-6 years
  • Sold between 10 000 and 50 000 dollars
  • United States
Aw_Shucks says

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. :P

1612 posts
  • 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
  • Referred between 1 and 9 users
+5 more
DaniMun says

Sooo… you’re using custom events, Ben! :D I’m about to finish the 3rd part of my 1st tutorial on Kuba’s blog about … building custom events, of course! :D

When it’s done, I’d love some feedback from you guys! :) Stay tuned… ;)

4247 posts
  • Attended a Community Meetup
  • Bought between 10 and 49 items
  • Contributed a Blog Post
  • Exclusive Author
  • Has been a member for 5-6 years
  • Sold between 10 000 and 50 000 dollars
  • United States
Aw_Shucks says

Yeah, I went back and ended up using the code anyway. I had to change it up a bit, but it works.

by
by
by
by
by
by