Problem in Firefox 3.0.1 with path scrambling

3 views
Skip to first unread message

ceasar

unread,
Jul 18, 2008, 3:44:36 PM7/18/08
to SWFObject
I use with SWFobject 1.5 some scrambling for my files mp3 path in php

<?=obfuscateURL($mp3_path.$sMusicFile,3); ?> normally this means ./
images/my.mp3

the output will became this
s2.addVariable("file","&#46;&#x2f;&#x69;&#109;&#x61;&#103;&#x65;&#115;&#47;&#109;&#x70;&#x33;&#47;");

and this works fine in all browser

Now I wanted to upgrade to version 2.1 and find out that this will
break in firefox. IE7 is no problem

flashvars.myfilm1 =
"&#46;&#x2f;&#x69;&#109;&#x61;&#103;&#x65;&#115;&#47;&#109;&#x70;&#x33;&#47;";

There is no js error or anything. It just won't play. If I use the
unscrambling version it plays

Is this a bug ?

Aran Rhee

unread,
Jul 20, 2008, 8:03:57 PM7/20/08
to swfo...@googlegroups.com
When you display/trace the value of :

1) the string (original / scrambled)
2) the unscrambled (proper path value)

in Flash, what are you seeing?

If you alert the value of obfuscateURL($mp3_path.$sMusicFile,3) in Firefox,
is it as expected? If you are setting it as a string, I don't see what the
issue would be...

Aran

ceasar

unread,
Jul 21, 2008, 1:55:26 AM7/21/08
to SWFObject
I don't see the issue either

If I don't use the scrambling it gives this path ./ images/my.mp3 and
it play's properly
Like I said it's only a problem in firefox

Here I have the srambling function in php

<?
function encodeString ($originalString, $mode) {
$encodedString = "";
$nowCodeString = "";
$randomNumber = -1;

$originalLength = strlen($originalString);
$encodeMode = $mode;

for ( $i = 0; $i < $originalLength; $i++) {
if ($mode == 3) $encodeMode = rand(1,2);
switch ($encodeMode) {
case 1: // Decimal code
$nowCodeString = "&#" .
ord($originalString[$i]) . ";";
break;
case 2: // Hexadecimal code
$nowCodeString = "&#x" .
dechex(ord($originalString[$i])) . ";";
break;
default:
return "ERROR: wrong encoding
mode.";
}
$encodedString .= $nowCodeString;
}
return $encodedString;
}

function obfuscateEMail($email, $naam, $mode) {
$obfuscatedEMail = encodeString($email,$mode);
return "<a href=
\"&#x6d;&#97;&#105;&#x6c;&#x74;&#111;&#x3a;".$obfuscatedEMail."\">".
$naam."</a>";
//return "<a href=\"mailto:".$obfuscatedEMail."\">".
$naam."</a>";
}
function obfuscateURL($urllink, $mode) {
$obfuscatedURL = encodeString($urllink,$mode);
return $obfuscatedURL;
}
?>
> Is this a bug ?- Tekst uit oorspronkelijk bericht niet weergeven -
>
> - Tekst uit oorspronkelijk bericht weergeven -

ceasar

unread,
Jul 24, 2008, 1:20:12 PM7/24/08
to SWFObject
Any news about this issue ?

http://www.cfcms.nl/content-met-mp3.html

Here is a live example (with swfoblect 1.5) so perhaps you can explore
this issue

Thanks for the help
> > - Tekst uit oorspronkelijk bericht weergeven -- Tekst uit oorspronkelijk bericht niet weergeven -

Getify Solutions

unread,
Jul 24, 2008, 1:35:57 PM7/24/08
to swfo...@googlegroups.com
We need to have a link to the page you tried the SWFObject 2/2.1 code on, so
we can see it breaking in FF3...

--Kyle





--------------------------------------------------
From: "ceasar" <cfcons...@gmail.com>
Sent: Thursday, July 24, 2008 12:20 PM
To: "SWFObject" <swfo...@googlegroups.com>
Subject: Re: Problem in Firefox 3.0.1 with path scrambling
Reply all
Reply to author
Forward
0 new messages