  | |  Re: [Flashnewbie] External data - What am I Doing Wrong? I 'm at
a deadline, | Re: [Flashnewbie] External data - What am I Doing Wrong? I 'm at
a deadline, 2004-02-06 - By Jim Cheng
Back Alan Rafael Bleiweiss wrote:
> If I put the on(press) removemovieclip code in every one of them > buttons, AND if I want to have dynamic CF generated text on almost > every page, can I get away with using that one textfield on all > those pages? I figure I can because the script will be doing the > loadvariablesnum for a unique file on each page. Make sense?
That's actually a terribly good idea. Like you said, it really does beat having 16 versions of the same thing over and over again. I typically go with such a technique for a lot of sites in Flash and HTML where I can just load and insert text into a common template.
While you're at it, you might also write one function to clear the textfield and go to the proper frame. Say at the main timeline, write something like:
function clearTextAndGo(frameNum) { if (_root.txtField) { _root.txtField.removeMovieClip(); } gotoAndPlay(frameNum); }
Now the buttons' code can be simplified to:
on(press) { // Change the number as appropriate for each button clearTextAndGo(1054); }
I'm going to head out to dinner with my wife and a friend of ours (it's 6:00PM here in Denver). I hope it all works out well for you. I'll probably be back online in about two or three hours--I've been quite hard at work moonlighting on several open-source Flash projects these past few days.
Jim
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------ Supported by Fig Leaf Software -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------ Lower Prices for Certified Training! Check out new lower prices for Certified Macromedia Training from Fig Leaf Software. Expand your skill set with courses in ColdFusion, Flash, Rich Internet Applications and .NET in the new year. Fig Leaf Software provides the highest caliber instruction at our training centers in Washington D.C., Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location.
Get the details at http://training.figleaf.com/ -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- To unsubscribe, e-mail: flashnewbie-unsubscribe@(protected) For additional commands, e-mail: flashnewbie-help@(protected)
Earn $52 per hosting referral at Lunarpages.
|
|
 |