-
1. Re: Calling user-defined functions
kglad Apr 22, 2011 2:45 PM (in response to barpos)is this a trick question?
-
2. Re: Calling user-defined functions
barpos Apr 22, 2011 3:17 PM (in response to kglad)Hmmm, not really. I guess I'll have to learn to use the debugger to try to find out why that is, unless it is normal. I'm used to procedural programming!
Regards,
Ron
-
3. Re: Calling user-defined functions
kglad Apr 22, 2011 4:41 PM (in response to barpos)you're assigning the scaleMode to both noScale and showAll. what's unexpected?
-
4. Re: Calling user-defined functions
barpos Apr 22, 2011 5:06 PM (in response to kglad)Yes, but SHOW_ALL should run after the function is executed, no?
-
5. Re: Calling user-defined functions
kglad Apr 22, 2011 5:45 PM (in response to barpos)assigning showAll will occur after that function is called. use the trace() function to see how that works.
-
6. Re: Calling user-defined functions
barpos Apr 22, 2011 6:07 PM (in response to kglad)That's what I want, I want it to execute it after the function. I've already put a trace() line inside the function, but I don't understand why stage.scaleMode shows up as SHOWALL. Anyhow, I'm going to use breakpoints to try to resolve the mystery. I presume one can setup a conditional breakpoint for when SHOWALL becomes current.
function backgroundPositioning(browserW:uint, browserH:uint):void
{
trace("stage.scaleMode: " + stage.scaleMode); -
7. Re: Calling user-defined functions
kglad Apr 22, 2011 10:40 PM (in response to barpos)i can't tell you much about break points in flash except they are not needed to debug flash applications. the trace() function is all you need for ide debugging.
-
8. Re: Calling user-defined functions
barpos Apr 23, 2011 6:37 PM (in response to kglad)I was quickly able to detect the problem within the debugger. There's no way I would have found it using trace()'s alone.
Regards,
Ron


