Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Flash and document.write()

Reply
Thread Tools

Flash and document.write()

 
 
Charles
Guest
Posts: n/a
 
      04-28-2007
It's strange... The following works:

document.write('<object classid="clsid27CDB6E-
AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/
pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="1"
height="1"><param name="movie" value="vinheta1.swf"><embed
src="vinheta1.swf" quality="high" pluginspage="http://
www.macromedia.com/go/getflashplayer" type="application/x-shockwave-
flash" width="1" height="1"></embed></object>');

But the following doesn't:

document.write('<object classid="clsid27CDB6E-
AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/
pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="1"
height="1"><param name="movie" value="vinheta' . '1' . '.swf"><embed
src="vinheta' . '1' . '.swf" quality="high" pluginspage="http://
www.macromedia.com/go/getflashplayer" type="application/x-shockwave-
flash" width="1" height="1"></embed></object>');

Have you had this sort of problem? Do you know why this doesn't work
in the 2nd case?
Thanks,

 
Reply With Quote
 
 
 
 
Peter Michaux
Guest
Posts: n/a
 
      04-28-2007
On Apr 27, 7:19 pm, Charles <(E-Mail Removed)> wrote:
> It's strange... The following works:
>
> document.write('<object classid="clsid27CDB6E-
> AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/
> pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="1"
> height="1"><param name="movie" value="vinheta1.swf"><embed
> src="vinheta1.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-
> flash" width="1" height="1"></embed></object>');
>
> But the following doesn't:
>
> document.write('<object classid="clsid27CDB6E-
> AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/
> pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="1"
> height="1"><param name="movie" value="vinheta' . '1' . '.swf"><embed
> src="vinheta' . '1' . '.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-
> flash" width="1" height="1"></embed></object>');
>
> Have you had this sort of problem? Do you know why this doesn't work
> in the 2nd case?


I doubt anyone is going to bust out a diff program to figure out what
is different in these two blobs. Perhaps you'd like to indicate what
is different?

Peter

 
Reply With Quote
 
 
 
 
Mark
Guest
Posts: n/a
 
      04-28-2007
The string concatenation operator is '+' not '.'.

 
Reply With Quote
 
Charles
Guest
Posts: n/a
 
      04-29-2007
On Apr 28, 12:32 am, Mark <(E-Mail Removed)> wrote:
> The string concatenation operator is '+' not '.'.


Correct.

 
Reply With Quote
 
Charles
Guest
Posts: n/a
 
      05-01-2007
Any idea?

 
Reply With Quote
 
-Lost
Guest
Posts: n/a
 
      05-01-2007
Charles wrote:
> Any idea?
>


About what? Didn't Mark's response solve your problem?

--
-Lost
Remove the extra words to reply by e-mail. Don't e-mail me. I am
kidding. No I am not.
 
Reply With Quote
 
Charles
Guest
Posts: n/a
 
      05-01-2007
On May 1, 1:49 am, -Lost <(E-Mail Removed)> wrote:
> About what? Didn't Mark's response solve your problem?


No, I would like to know why this difference prevents the Flash
animation from appearing.
TIA,

 
Reply With Quote
 
-Lost
Guest
Posts: n/a
 
      05-01-2007
Charles wrote:
> On May 1, 1:49 am, -Lost <(E-Mail Removed)> wrote:
>> About what? Didn't Mark's response solve your problem?

>
> No, I would like to know why this difference prevents the Flash
> animation from appearing.


And you changed your .'s to +'s, right?

--
-Lost
Remove the extra words to reply by e-mail. Don't e-mail me. I am
kidding. No I am not.
 
Reply With Quote
 
Charles
Guest
Posts: n/a
 
      05-02-2007
On May 1, 7:30 pm, -Lost <(E-Mail Removed)> wrote:
> And you changed your .'s to +'s, right?


Nope.

 
Reply With Quote
 
Charles
Guest
Posts: n/a
 
      05-02-2007
On May 2, 10:06 am, Randy Webb <(E-Mail Removed)> wrote:
> Because one way is a syntax error and the other way isn't. When the
> syntax error is encountered script execution stops. When it stops you
> won't see an animation because it hasn't been completely created yet.


Thanks. From the 2nd snippet, I'm just concatenating strings. This is
why I don't understand it fails to render the Flash animation.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Canon D60, 28-135IS, 420EX flash, BG-ED3 grip, 1GB Microdrive, some filters and flash diffuser Joe Wilson Digital Photography 2 10-18-2004 05:17 AM
flash problem, session id not consistent when using flash with query stirng parameters Bernie ASP .Net 0 09-05-2004 05:28 AM
Canon Powershot G3 and flash speedlite 420EX : overexpose in fill-flash Charles Bueche Digital Photography 2 06-07-2004 01:08 PM
Is Flash Flash? Targa Cisco 1 11-25-2003 03:34 PM
Re: With More Flash More Lumix: using an external flash unit with the FZ1 and other digicams Hans-Georg Michna Digital Photography 4 08-24-2003 06:05 PM



Advertisments