Mike, I'm a single frame flasher to.. its all I do.. you don't have to
create empty frames in your fla.

You can do something as simple as:
this.onLoad = function():Void {
    var c:Number = 0;
    this.onEnterFrame = function() {
        if (c >= 5) { // you pick a number that works...
            delete this.onEnterFrame;
            stageSizeListener.onResize();
        }
        c++;
    }
}

On 4/12/06, Mike Anderson <[EMAIL PROTECTED]> wrote:
>
> Oh yes, I absolutely understand that.
>
> I only use the visibility toggle, for extremely used "Dialog Boxes" -
> there is no point in instantiating them, and then killing them, over and
> over again - if I know for a fact that it will be used often.
>
> For like a Forms Based application (like a Masters Grid, and Details
> Window) I will actually delete the MovieClip when I am finished - due to
> the large amounts of Code contained inside it, in addition to the large
> collection of Controls that make up the Details form.
>
> What makes this all possible, is the init() portion of the Class Files -
> where you can pass all your parameter data to the MovieClip FIRST before
> it's instantiated, so it's all ready to rock before the controls get
> generated.
>
> It's taken me a long time, to figure out how to properly write these
> kinds of apps, using Flash.  This was all such a piece of cake in VB.NET
> and C# - but Flash was a different story.
>
> As soon as I master Flex, I am moving over to that, and will never look
> back (unless I need to write a Widget, which I think Flash is better
> suited for).
>
> Thanks for the extra input though -
>
> Mike
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Steven
> Sacks
> Sent: Wednesday, April 12, 2006 3:18 PM
> To: Flashcoders mailing list
> Subject: RE: [Flashcoders] Manually triggering the Screens "onResize"
> event
>
> You do realize that toggling _visible does not release any memory,
> right?  Flash still tracks the movieclip in memory, it just doesn't draw
> it.  If you're building RIAs, you should open up your task manager and
> watch your memory usage over time to make sure you're not using too
> much.  I have no problem with frame-based RIAs, but then again, I tend
> to use all the tools Flash makes available to me, not just Actionscript.
>
> -Steven
>
>
>
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] On Behalf Of Mike
> > Anderson
> > Sent: Wednesday, April 12, 2006 12:09 PM
> > To: Flashcoders mailing list
> > Subject: RE: [Flashcoders] Manually triggering the Screens "onResize"
> > event
> >
> > I am really sorry Ryan -
> >
> > I put some more thought into what you had to say, and I got it to
> > work.
> > Tunnel vision is dangerous sometimes, and when you code a certain way
> > for so long, it's hard to break out of your normal coding methods.
> >
> > So with that said, I simply inserted 5 blank frames - but made sure
> > that all the layers containing components, extended out to the 5th
> > frame.
> > That way, they never get erased when moving to the next Frame.  As you
>
> > can probably guess, I am not a typical Flash programmer who does
> > animation, etc.  I write ONLY applications.
> >
> > I still have my main Include file on Frame 1 (which contains all my
> > code for the entire app), but I created a Key Frame on Frame 5 - which
>
> > calls the "onResize" event for the Stage Listener.  Now I understand
> > what you were trying to say - give the movie more time to initialize,
> > and THEN call the "onResize" method.
> >
> > Now the movie comes up with all the controls positioned properly.
> >
> > THANK YOU - and I will make sure that I listen with "more open ears"
> > next time I get some good advice ;-)
> >
> > Thanks and take care,
> >
> > Mike
> >
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] On Behalf Of Mike
> > Anderson
> > Sent: Wednesday, April 12, 2006 1:46 PM
> > To: Flashcoders mailing list
> > Subject: RE: [Flashcoders] Manually triggering the Screens "onResize"
> > event
> >
> > The only problem is, it's a "Single Frame" application.
> >
> > I avoid multi-frame apps like the plague - because I have so many
> > coding issues, and can't have controls residing on multiple frames
> > (they must exist at all times, because they intercommunicate with each
>
> > other, throughout the lifetime of the application).
> >
> > This app is considered to be an "RIA", and resides ALL on a single
> > frame.  All my MovieClips have Class Files attached to them, and I
> > truly run this Movie like an Application.
> > Multiple Windows, toggling visibility, remoting calls, etc.
> > all tied together by listening to Events.
> >
> > It's a wonderfully reliable application - which I plan on migrating to
>
> > Flex as soon as I can.  But in the meantime, Flash is my only
> > solution.
> >
> > With that said, is there anything else I can do - to force the
> > "onResize" event to kick off, just milliseconds after the application
> > gets fully initialized?  I have a feeling this may fix the problem.
> >
> > Maybe some kind of Timer that only runs once?  Once things are
> > positioned properly upon the initial load, it's all well and good -
> > the StageListener coupled with the manual browser resizes, takes care
> > of everything after that.
> >
> > Thanks for anything else you can throw my way :)
> >
> > Mike
> >
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] On Behalf Of Ryan
> > Matsikas
> > Sent: Wednesday, April 12, 2006 12:41 PM
> > To: Flashcoders mailing list
> > Subject: Re: [Flashcoders] Manually triggering the Screens "onResize"
> > event
> >
> > I'm guessing yer having these issues in IE? Try waiting an extra frame
>
> > or 2..
> >
> > On 4/12/06, Mike Anderson <[EMAIL PROTECTED]> wrote:
> > >
> > > Hello,
> > >
> > > Thanks for the suggestion, but I tried in that in the meantime.
> > >
> > > 2 very undesired things happen:
> > >
> > >         1) The movie components are still in the exact same spots.
> > >
> > >         2) The bottom StatusBar actually is 1-inch shorter -
> > >            this not even reaching to the other side of the
> > >            stage
> > >
> > > It's almost as if (especially in case #2) that the
> > StatusBar is basing
> >
> > > it's _width property on mis-information.  If I didn't know better,
> > > it's as if there are timing problems going on.
> > >
> > > I thought that the "onLoad" event fixes problems like that
> > - since it
> > > waits until all components are instantiated and initialized, before
> > > Dispatching the "I am all finished" signal.
> > >
> > > What I have is this (in root):
> > >
> > > =====================================================
> > >
> > > var stageSizeListener:Object = new Object();
> > >
> > > stageSizeListener.onResize = function():Void {
> > >         var stageHeight:Number = Stage.height;
> > >         var stageWidth:Number = Stage.width;
> > >
> > >         // Main Menu
> > >         mainMenu._width = stageWidth;
> > >         mainMenu.updateDisplay(true);
> > >
> > >         // Map Status Bar
> > >         mapStatusBar._width = stageWidth;
> > >
> > >         etc....
> > > }
> > >
> > > this.onLoad = function():Void
> > > {
> > >         stageSizeListener.onResize(); }
> > >
> > > Stage.addListener( stageSizeListener );
> > >
> > > =====================================================
> > >
> > > All this resize code works beautifully, but only AFTER the movie is
> > > completely loaded, and the user MANUALLY resizes the browser.
> > >
> > > Am I missing something here?  I was hoping the onLoad
> > function would
> > > alleviate any timing issues, but not only does it NOT work, it's
> > > actually causing my StatusBar (which resides at the bottom)
> > to have a
> > > lesser width size.
> > >
> > > If I remove the onLoad code, then eveything paints fine -
> > but things
> > > are not positioned correctly.
> > >
> > > Any more ideas?
> > >
> > > Thanks,
> > >
> > > Mike
> > >
> > > -----Original Message-----
> > > From: [EMAIL PROTECTED]
> > > [mailto:[EMAIL PROTECTED] On
> > Behalf Of Ryan
> > > Matsikas
> > > Sent: Wednesday, April 12, 2006 12:02 PM
> > > To: Flashcoders mailing list
> > > Subject: Re: [Flashcoders] Manually triggering the Screens
> > "onResize"
> > > event
> > >
> > > manually call your onResize method in your main Mc's onLoad.
> > >
> > > On 4/12/06, Mike Anderson <[EMAIL PROTECTED]> wrote:
> > > >
> > > > Hello All,
> > > >
> > > > I have a Flash App, that uses a "Non-Scaling" type setup
> > - in which
> > > > upon browser resize, the controls simply reposition themselves
> > > > around,
> > >
> > > > creating more usable area for content.  It's works
> > beautifully, but
> > > > with a catch.
> > > >
> > > > The problem is, my application insists on starting out at it's
> > > > Published Size - so if the browser is larger than the
> > application,
> > > > there is a bunch of white-space along the Right and Bottom.  Of
> > > > course, I designed the app to take up the entire browser window.
> > > >
> > > > The moment the user resizes the browser, the application
> > immediately
> >
> > > > snaps into place taking up 100% of the browser area - and
> > everything
> >
> > > > is well.
> > > >
> > > > How can I trigger this event, the moment the application
> > is loaded
> > > > in the browser???
> > > >
> > > > Thanks in advance for your help,
> > > >
> > > > Mike
> > > >
> > > > _______________________________________________
> > > > [email protected]
> > > > To change your subscription options or search the archive:
> > > > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> > > >
> > > > Brought to you by Fig Leaf Software Premier Authorized Adobe
> > > > Consulting and Training http://www.figleaf.com
> > > > http://training.figleaf.com
> > > >
> > > _______________________________________________
> > > [email protected]
> > > To change your subscription options or search the archive:
> > > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> > >
> > > Brought to you by Fig Leaf Software
> > > Premier Authorized Adobe Consulting and Training
> > > http://www.figleaf.com http://training.figleaf.com
> > > _______________________________________________
> > > [email protected]
> > > To change your subscription options or search the archive:
> > > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> > >
> > > Brought to you by Fig Leaf Software
> > > Premier Authorized Adobe Consulting and Training
> > > http://www.figleaf.com http://training.figleaf.com
> > >
> > _______________________________________________
> > [email protected]
> > To change your subscription options or search the archive:
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
> > Brought to you by Fig Leaf Software
> > Premier Authorized Adobe Consulting and Training
> > http://www.figleaf.com http://training.figleaf.com
> > _______________________________________________
> > [email protected]
> > To change your subscription options or search the archive:
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
> > Brought to you by Fig Leaf Software
> > Premier Authorized Adobe Consulting and Training
> > http://www.figleaf.com http://training.figleaf.com
> > _______________________________________________
> > [email protected]
> > To change your subscription options or search the archive:
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
> > Brought to you by Fig Leaf Software
> > Premier Authorized Adobe Consulting and Training
> > http://www.figleaf.com http://training.figleaf.com
> >
>
>
> ___________________________________________________
> This e-mail is intended only for the named person or entity to which it
> is addressed and contains valuable business information that is
> privileged, confidential and/or otherwise protected from disclosure.
> Dissemination, distribution or copying of this e-mail or the information
> herein by anyone other than the intended recipient, or an employee or
> agent responsible for delivering the message to the intended recipient,
> is strictly prohibited. All contents are the copyright property of
> Agency.com Ltd., its affiliates or a client of such agencies. If you are
> not the intended recipient, you are nevertheless bound to respect the
> worldwide legal rights of Agency.com, its affiliates and its clients. We
> require that unintended recipients delete the e-mail and destroy all
> electronic copies in their system, retaining no copies in any media. If
> you have received this e-mail in error, please immediately notify us via
> e-mail to [EMAIL PROTECTED] We appreciate your cooperation.
>
> We make no warranties as to the accuracy or completeness of this e-mail
> and accept no liability for its content or use. Any opinions expressed
> in this e-mail are those of the author and do not necessarily reflect
> the opinions of Agency.com or any of its affiliates.
>
>
> _______________________________________________
> [email protected]
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training http://www.figleaf.com
> http://training.figleaf.com
> _______________________________________________
> [email protected]
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to