Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / Flash / Flash Actionscript / September 2005



Tip: Looking for answers? Try searching our database.

simple dynamic text field

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
JG_English - 07 Jan 2005 19:58 GMT
I want to set up a simple dynamic text field.  When you click on a button it
will pass new text to a text field in the parent movie.    For instance..  If
the original text said 'cat'  when you clicked on button 'dog'  the parent
movie text field will change to say 'dog'  This really easy stuff - but I have
not been able to get it to work.  Does anyone know of a tutorial - or can you
show me a code example..  Thanks j
looklisten - 07 Jan 2005 20:26 GMT
I'm a bit confused by your question, but yes, you should have one routine that
loads the jpgs and one preloader to display the load status.

To do this, make a movieclip that will show the percentage. You can visualize
this with any of the movieclip properties where 100 is the max value (_xscale,
_yscale, _alpha). The most common, of course, is _xscale. Assuming you have a
movieclip named 'bar_mc' with some graphic inside (rectangular shape works
best) and an empty movieclip named 'stub_mc' to load the jpg into, here's a
quick function that you can use:

function loadJPG(mc:MovieClip, jpgPath:String):Void {
    loadMovie(jpgPath, mc);
    bar_mc._visible=true;
    onEnterFrame = function () {
        var bl = mc.getBytesLoaded();
        var bt = mc.getBytesTotal();
        if (bl == bt && bt>1000) {
            bar_mc._visible=false;
            delete this.onEnterFrame;
        } else {
            bar_mc._xscale = bl/bt*100;
        }
    };
}

To call it, do something like this:

loadJPG(stub_mc,"myFile.jpg");
jizzlober - 30 Sep 2005 14:27 GMT
Where would you place this code? Inside the stub_mc on the first frame? Also, to call it where do you put that code?

thank you.
myname70 - 30 Sep 2005 14:43 GMT
Originally posted by: jizzlober
Where would you place this code? Inside the stub_mc on the first frame? Also,
to call it where do you put that code?

thank you.

I have the same question. Please advise if you work out this problem.

Thanks.
myname70 - 30 Sep 2005 16:17 GMT
I have about 15 JPEG pictures and I load them into separate movieclips by loop
function.
Ex:
for (i=1; i<=15; ++i) {

this.mc_picture.loadMovie(pic);

};

I wouldl like to have some preload indication for each JPEG pictures in the
loop . And to show the picture only after loading it.

Please help to work out this issue.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.