Sign in to follow this  
bEbEr

2 Swf Numa Page

Recommended Posts

Galera.. seguinte..

tenho 2 swf`s numa index.php..

1 é o principal.swf e o outro menu.swf

como faco pra um interagir com o outro? tp.. no swf menu.. aplicar acoes no principal.swf??

flww

Share this post


Link to post
Share on other sites

para interagir 2 swf é preciso usar uma "LocalConnection"

suponha no swf 1 você cria uma conexao:

id = 1
conexao = new LocalConnection();
conexao.roda = function ()
{
    _root.play();
};
varid = "left" + id;
conexao.connect(varid);

no swf 2:
id = 2
conexao = new LocalConnection();
conexao.roda = function ()
{
    _root.play();
};
varid = "right" + id;
conexao.connect(varid);

para chamar a função "roda" do swf 1 par o swf 2 use:
_root.conexao.send("right2", "roda");

e vice-versa...

:blink:

Share this post


Link to post
Share on other sites

cara

não consegui fazer..

tens como fazer mais detalhado?? ou passar os arquivos pra mim entender??

falou

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this