PDA

View Full Version : Inheritance problem


Derek
02-10-2005, 12:39 PM
hmm, here's something that's causing a pause for thought!

I have Label object on a login page showing Date/Time [updated every second]. I wanted to move it to a 'menu' page that is inherited by all other pages so it appears on all pages instead of the login page only. Now, of course, it wont work coz the menu page events are not called like other 'shown' pages are. I need a global timer really with
GlobalTimer > Page.Menu.LabelSetText (DateNow .. TimeNow)

I know I can use swf to do this since that will always be running [or should] but didnt really wanna do that.
Is there something i'm missing with this or is it the pain in the butt i think it is?

TJ_Tigger
02-10-2005, 12:49 PM
You shoud be able to place your code in the On Timer event for the pages tha inherit that as an object. Create a function that updates the time in that object and place it on each page. Not the best solution but it should work.

Derek
02-10-2005, 12:56 PM
You shoud be able to place your code in the On Timer event for the pages tha inherit that as an object. Create a function that updates the time in that object and place it on each page. Not the best solution but it should work.
Yeah I thought of that too. Just wasn't appealing having to go thru all the pages to paste the code in. Looks like it might be that or flash [or nothing!].
Thanks, Tigg

TJ_Tigger
02-10-2005, 12:59 PM
What might be cool is the ability to inherit code from an event on a page. But then again using functions you can do almost the same thing.

Inherit Code from "Page5", "On Timer" event. something like that

Tigg

Derek
02-10-2005, 01:04 PM
yeah, i agree.

With the functions, altho its close, it doesnt quite have the same effect - as this 'hiccup' suggests. Or at least, not all the time.
Looks like a suggestion box post! :)