PDA

View Full Version : Publish Flash MX files in a HTML page


Gwenouille
03-06-2006, 06:47 PM
Hello,

I have created my website on Flash MX. I have differents files. my menu is in a file and charges external swf.

I would like to publish my files to see how it is, in real, and to see if I have to change my images and movies resolution.

How can I do ? I don't know very well html language.

My flash animation has to be centered (horizontal and vertical), format 100% and in a black background.

Can you give me what I have to write, please ?

Thanks a lot

Gwen

Paerez
03-06-2006, 08:26 PM
I posted a solution here:

http://www.actionscript.org/forums/showthread.php3?t=80492&highlight=table+100%25

just make sure to change:
<body bgcolor="#cccccc">
to:
<body bgcolor="#000000">
to make the background black.

Gwenouille
03-06-2006, 09:33 PM
Thanks, Paerez, it works ;-)

I create "index.html" with your help. I have put some swf to test. But do I need to put the html files of my swf ? I think I only need "index.html", isn't it ?

Something is bizarre in my menu. Someone helped me to create a code to disactivate the button of the page which is loaded. For example, if I am on the page "radio", the button "radio" is disactivated. But, it doesn't work for one of my submenus. I don't know why.

The code of the frame number one is :
label=["Accueil","Expérience","Médias","Autres domaines","Etude de cas"];
lien=["home.swf","","","","",""];
if(ini==null){
ini=true;
last_c=btn1;
last_f=_currentframe;
}
frame=_currentframe;
for(i=0;i<label.length;i++){
this["btn"+Number(i+1)].id=i;
this["btn"+Number(i+1)].onRelease=function(){
if(lien[this.id]!=""){
_root.contents.loadMovie(lien[this.id]);
gotoAndStop("Accueil");
last_c=this;
last_f=frame;
ini_col();
}
}
this["btn"+Number(i+1)].onRollOver=function(){
if(label[this.id]!=""){
gotoAndStop(label[this.id]);
}
}
ini_col();
}



function change_col(cib){
cib.color = new Color(cib);
cib.color.setTransform({ga: 75});
}
function ini_col(){
for(j=0;j<label.length;j++){
if(this["btn"+Number(j+1)]==last_c&&frame==last_f){
this["btn"+Number(j+1)].enabled=false;
change_col(this["btn"+Number(j+1)]);
}else{
this["btn"+Number(j+1)].enabled=true;
this["btn"+Number(j+1)].ini_col=new Color(this["btn"+Number(j+1)]);
this["btn"+Number(j+1)].color.setTransform({ga:100});
}
}
}

Do you know what is the problem ?

Thanks

Gwen

Paerez
03-07-2006, 05:52 PM
I create "index.html" with your help. I have put some swf to test. But do I need to put the html files of my swf ? I think I only need "index.html", isn't it ?

You make your own index.html using my code, and just use that by itself. Don't use the index.html that is made by flash's publish. If you want to use your own html with more than the flash, you can just add the code I gave you to that file.

about the other code.... I don't know sorry...

Gwenouille
03-07-2006, 07:56 PM
You make your own index.html using my code, and just use that by itself. Don't use the index.html that is made by flash's publish. If you want to use your own html with more than the flash, you can just add the code I gave you to that file.

about the other code.... I don't know sorry...

I made my own index.html only with your code. Maybe my hoster adds something to my index.html

I tried codes : Stage.scaleMode = "noScale";
Stage.align = "TL"; but it doesn't work. It creates something bizarre.

Before, I had on my frame number 1 :
fscommand("allowscale", "true");
It works in Flash, but not on the Internet.

So, my pages are not elastic :-(