-
publication problem with flash 8 ?
Hi all,
I put an animation in a site created with flashCS4 with this script to keep waiting the load :
Code:
var Barre:MovieClip;
var Pourcentage:TextField;
var Attente:TextField;
PourPourcentage.html = true;
PourAttente.html = true;
function onEnterFrame(){
var pc = _root.getBytesLoaded()*100/_root.getBytesTotal();
Barre._xscale = pc;
Attente.htmlText = "Merci de patienter";
Pourcentage.htmlText = "<b>"+Math.round(pc)+"%</b> effectués";
if (pc >= 100){
delete onEnterFrame;
Play();
}
}
stop();
I updated the file with CS6 and after publication I have a bug ( no more percentage and vanished text) .
I publish it by selecting flashplayer8 and actionscript2… But that does not solve the problem.
Anybody could do something for me ?
-
.
Hi,
You either need to create the textfields dynamically or you or removed them from the stage.
Attach all your files that yo use.
-
.
Hi,
PHP Code:
stop();
var Barre:MovieClip;
var Pourcentage:TextField = this.createTextField("Pourcentage", 1, 10, 0, 10, 10); var Attente:TextField = this.createTextField("Attente", 2, 10, 20, 10, 10);
Pourcentage.html = true; Attente.html = true;
Pourcentage.autoSize = true; Attente.autoSize = true;
//textformat = new TextFormat(); //textformat.color = 0xff0000;
//Pourcentage.setTextFormat(textformat); //Attente.setTextFormat(textformat);
function onEnterFrame() { var pc:Number = Math.round(_root.getBytesLoaded() * 100 / _root.getBytesTotal()); trace(pc);
Barre._xscale = pc; Attente.htmlText = "Merci de patienter"; Pourcentage.htmlText = "<b>" + pc + "%</b> effectués";
if (pc >= 100) { delete onEnterFrame; Play(); trace("Playing"); } }
-
Hi, thank you very much for your help !
I have tried your code. Actually, the percentage is visible but not in the right place ?? There 's an another problem : the percentage and the message "merci de patienter" does not vanished when the animation is loaded ??
Here is my code in my html file :
PHP Code:
<script type="text/javascript" src="css/js/swfobject.js"></script> <script type="text/javascript"> var flashvars = {}; var params = {}; params.wmode="transparent"; swfobject.embedSWF("css/swf/fond_AFF.swf","anim","900","800","10.0.0","css/js/expressinstall.swf",flashvars,params); swfobject.embedSWF("css/swf/fond_AFF.swf","boutaffret","0","0","10.0.0","css/js/expressinstall.swf",flashvars,params); </script>
Sorry, I am not a develpper, I just need this code which was ok and doesnot work anymore...
-
.
Hi,
It would help to see the files.
To remove a dynamic textField = textName.removeTextField(); so do that for both when complete
-
-
.
Hi,
You needed to embed the fonts, but if you do use my code, then add the red parts
if (pc >= 100)
{
delete onEnterFrame;
play();
trace("Playing");
Pourcentage.removeTextField();
Attente.removeTextField();
}
-
Hi,
sorry for the long time before my answer, thank you very much for that, the loading is very much faster !!! Actuallly I had to try it on a very slow system to improve it (which explain the time before my answer) and the percentage and the message doesn't work ?
-
Hi, I shall let this. Thanks a lot for your precious help, Fruitbeard !
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|