-
Call A Javascript Function
I'd like to do some thing that seems to be very simple for me, but I can't make this works. I'd like to call a javascript function that change the background color of the HTML page when determined frame is reached in my flash movie. I tried the getUrl("javascript:changeColor();"); putting it directly on the frame in the timeline to call the javascript but didn't work. I'm a graphic designer and at this moment I'm out of time to find the solution. Anybody can help me?
Thank you very much.
Marcelo.
----- o o o -----
Marcelo Rocha de Souza
Graphic Designer
------------------------
Avenida Onze de Junho, 686 apto 42 A - 04041-002 - São Paulo - SP - Brazil
Tel.: 5511 5082-2345
E-mail: marcrock@uol.com.br
----- o o o -----
-
The Flashman
The code seems to be correct... soem problems i could think of is:
1) Your javascript is the one that's wrong.
2) maybe the playhead does not enter the frame with your getURL script???
3) or maybe is because you used getUrl instead of getURL
Last edited by earl223; 07-05-2005 at 10:22 AM.
i eat actionscripts for breakfast
-
Thank you by your reply.
1) My javascript function is very simple:
<script language="JavaScript">
<!--
function changeColor()
{
document.bgcolor = "#FFFFFF";
}
//-->
</script>
2) The playhead reaches the frame, where I have a movieclip triggered by it
3) I use getURL. Here I wrote wrong...
----- o o o -----
Marcelo Rocha de Souza
Graphic Designer
------------------------
Avenida Onze de Junho, 686 apto 42 A - 04041-002 - São Paulo - SP - Brazil
Tel.: 5511 5082-2345
E-mail: marcrock@uol.com.br
----- o o o -----
-
thats strange, it should work... did you make sure that the javascript function works?? perhaps try calling it from html to make sure it works...
Otherwise, i cant spot the problem :O
-
In your javascript try document.bgcolor = #FFFFFF;
No quotes around color.
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
|