Web Design Web Design Forum
Registration is free! Here you can view your subscribed threads, work with private messages and edit your profile and preferences Calendar Find other members Frequently Asked Questions Search
Home Web Design

Convenient web based access to our favorite web design Usenet groups

web design reviews

This is Interesting: Free Magazines for Graphics designers and webmasters  





  Last Thread  Next Thread
Author
Thread Post New Thread   

Javascript Function in Firefox
 

Chip W.




quote this post edit post

IP Loged report this post

Old Post  09-22-05 - 12:24 AM  
Hi,

I'm pretty new to Mozilla and was wondering about this Javascript function I
'm
able utilize in I.E. I'm in the process of updating my website to be
cross-browser compatible, the following function does not work in Firefox, a
nd
I was hoping someone could shed some light on "why?" If this topic is
redundant, my apologies.

Initialize the function:

<SCRIPT LANGUAGE=JavaScript>
function doPassVar(args){
var sendText = args.value;
var sendText = "1"
window.document.myFlash.SetVariable("myVar", sendText);
}
</SCRIPT>
Pass the function:

<body bgcolor="#999999" onload="doPassVar(sendText);">

Initialize the Flash object:

<tr>
<td><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.ca
b#ve
rsion=6,0,29,0" width="753" height="25" id="myFlash">
<param name="movie" value="../navigation/navBar_03.swf">
<param name="quality" value="high">
<param name="menu" value="false">
<embed src="../navigation/navBar_03.swf" quality="high"
pluginspage="http://www.macromedia.com/go/getflashplayer"
type="application/x-shockwave-flash" width="753" height="25" name="myFlash"
swLiveConnect="true"></embed></object>
</td>
</tr>


This works like a superstar in Internet Explorer, but not at all in Mozilla
Firefox. I'm sure it doesn't work in Netscape either, but I'm just starting 
to
tackle all this. Any help, direction, or links would be fab, not really sure
where to start with this.

Thanks,
~Chipley




Post Follow-Up to this message ]
Re: Javascript Function in Firefox
 

posted.by\(Vern\);




quote this post edit post

IP Loged report this post

Old Post  09-22-05 - 04:21 AM  
I am not real good at this, but I just went through a crash course in
passing variables from HTML into a flash movie.  I have seen the code you
are trying to use and I couldn't get it to work. I did however find a
solution.  You have to pass the variables though from within the <OBJECT>
and <EMBED> tags.

Here is the tute I found that solved my problems.  BUT ... the text itself
leaves out the js code needed to parse the query string.  So download the
sample files and deconstruct them.  I have it working perfectly now in all
PC browsers.

http://www.noscope.com/journal/2003/12/query_string

HTH

--
--
Regards,
--Vern
===========================
onClipEvent(doSomethingStupid){
setProperty("Face", color, #FF0000);
_root.audio = "uh oh!";
}




Post Follow-Up to this message ]
Re: Javascript Function in Firefox
 

Chip W.




quote this post edit post

IP Loged report this post

Old Post  09-22-05 - 09:18 AM  
Vern,

Thanks so very much, I'll be checking out the link and deconstructing all da
y tomorrow. I'll post back here with my results. That definitely helps.

Hail to vern...
~Chipley


Post Follow-Up to this message ]
Re: Javascript Function in Firefox
 

posted.by\(Vern\);




quote this post edit post

IP Loged report this post

Old Post  09-22-05 - 09:18 AM  
You can check the site I am building for a client if you like.  I am using
this to reposition an underline on a Flash menu after each click.  The site
is not all flash, just the menu and selected other parts.  So each time a
new page is clicked, the menu, and its sliding underline reload and start
back at the beginning.  What I needed to happen, is for the underline to
slide over to the current page.  So I learned from this tute how to pass the
variable through the URL, capture and parse them in JS, then use JS to write
the <EMBED> and OBJECT> tags to include the new variables as it reloads the
same Flash navbar.  Works great!

www.pc-grafix.com/Bretzlaw



--
--
Regards,
--Vern
===========================
onClipEvent(doSomethingStupid){
setProperty("Face", color, #FF0000);
_root.audio = "uh oh!";
}




Post Follow-Up to this message ]
Re: Javascript Function in Firefox
 

posted.by\(Vern\);




quote this post edit post

IP Loged report this post

Old Post  09-22-05 - 09:18 AM  
messed that up. sorry.

www.pc-grafix.com/BretzLaw

--
--
Regards,
--Vern
===========================
onClipEvent(doSomethingStupid){
setProperty("Face", color, #FF0000);
_root.audio = "uh oh!";
}




Post Follow-Up to this message ]
Re: Javascript Function in Firefox
 

Chip W.




quote this post edit post

IP Loged report this post

Old Post  09-23-05 - 12:32 AM  
Hey Vern,

Thanks for all the info. Your link to the source code worked like a charm fo
r
me. I took the script and converted it into an external .js file after
deconstructing, I'm now in the process of applying that technique to my whol
e
site. there were a few things I did notice that aren't compatible in
Mozilla(like I said in my first thread, i'm new to Firefox). In the assemble
flash object, Mozilla ignores the continuation (;) at the end of each line i
n
the Javascript, that punctualtion was showing up on my page before I deleted
them:

// assemble flash obj
var l1 = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.ca
b#ve
rsion=6,0,29,0" width="'+width+'" height="'+height+'">;'
var l2 = '<param name="movie" value="'+src+queries+'" />;'
var l3 = '<param name="quality" value="high" />;'
var l4 = '<embed src="'+src+queries+'" quality="high"
pluginspage="http://www.macromedia.com/go/getflashplayer"
type="application/x-shockwave-flash" width="'+width+'"
height="'+height+'"></embed>;'
var l5 = '</object>'

I checked out your site and it looks like you found that too. Anyway, thanks
 a
million. Problem solved.

Kind regards,
~Chipley



Post Follow-Up to this message ]
Re: Javascript Function in Firefox
 

posted.by\(Vern\);




quote this post edit post

IP Loged report this post

Old Post  09-23-05 - 12:32 AM  
Yep. I wish I would have remembered to tell you that, about the ; showing up
in the HTML.  Sorry.  I am sure you found the same thing.  I just eliminated
the offending ; and it works fine in all browsers.

Glad I could help!

Have a great day!

--
--
Regards,
--Vern
===========================
onClipEvent(doSomethingStupid){
setProperty("Face", color, #FF0000);
_root.audio = "uh oh!";
}




Post Follow-Up to this message ]
Sponsored Links
 





All times are GMT. The time now is 07:45 AM. Post New Thread   
  Previous Last Thread   Next Thread next
Flash Site Design archive | Show Printable Version | Email this Page | Subscribe to this Thread

Popular forums

Adobe Photoshop forum Macromedia Flash Web Site Design
Dreamweaver FrontPage forum
JavaScript Forum XML forum
Style Sheets VRML
Forum Jump:
Rate This Thread:

 

XML RSS Feed web design latest articles Syndicate our forum via XML or simple JavaScript

Web Design archive  Database administration help  


Top Home  -  Register  -  Control Panel   -  Memberlist  -  Calendar  -  Faq  -  Search Top