Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

preloader issue:  why doesn't my loadText dynamic text display

Posted on 2006-07-16
6
Medium Priority
?
247 Views
Last Modified: 2010-04-03
any ideas why a loadin swf, that loads into an empty movie clip, won't obey the same code?

have modified it to that below - content_container is the empty clip at  _root level

bytes_loaded = Math.round(_root.content_container.getBytesLoaded());
bytes_total = Math.round(_root.content_container.getBytesTotal());
getPercent = bytes_loaded/bytes_total;
_root.content_container.loadBar._width = getPercent*100;
_root.content_container.loadText.text = Math.round(getPercent*100)+"%";
if (bytes_loaded == bytes_total) {
     _root.content_container.gotoAndPlay(3);
}

thanks
aidan
0
Comment
Question by:aidan09
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 34

Expert Comment

by:Aneesh Chopra
ID: 17117619
Hi,

you have used absolute reference to _root here...
when this swf will be loading inside another swf then _root written in this swf will refer to the _root of _parent swf

a workaround to this is just add following code just above your code:

-----------------------
this._lockroot = true;
-----------------------
above code will lock the swf root in itself and all reference to _root written in this swf will forced to refer to only this root.

Rgds
Aneesh
0
 

Author Comment

by:aidan09
ID: 17118597
doesnt seem to work
the loadBar seems to work ok, but I still don't seem to get the dynamic field working
/??
0
 
LVL 34

Expert Comment

by:Aneesh Chopra
ID: 17119182
I suggest please upload your source files I will fix it and send back to you

you can use yousendit.com to upload your Files

Rgds
Aneesh
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

Author Comment

by:aidan09
ID: 17123171
thanks Aneesh

have uploaded the files for you.

Aidan
0
 
LVL 34

Accepted Solution

by:
Aneesh Chopra earned 2000 total points
ID: 17123361
updated code of "lodge7.fla" first frame
-------------
bytes_loaded = Math.round(this.getBytesLoaded());
bytes_total = Math.round(this.getBytesTotal());
getPercent = bytes_loaded/bytes_total;
this.loadBar._width = getPercent*100;
this.loadText.text = Math.round(getPercent*100)+"%";
if (bytes_loaded == bytes_total) {
      this.gotoAndPlay(3);
}
---------------------

copy the same code on first frame of "home.fla"


Rgds
Aneesh
0
 

Author Comment

by:aidan09
ID: 17140321
thanks aneesh!
much appreciated!
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is intended to introduce all collision detection principles in flash, their strengths, weaknesses and workarounds. The main method for Collision Detection in flash is using hitTestObject. But unless you'll be pushing rectangular shapes without …
Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.
Suggested Courses

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question