Joined: 27 Apr 2006
Posts: 22009
Location: Southern California
Posted: 10/13/08 16:31
I don't know how you're doing it, but if you're pointing something to an image file somewhere, make sure you are using an absolute path, and not a relative path.
the image is called out in action script inside the FLA file then compiled. So, using an absolute path won't work, as the hard coded JR variables will be compiled in the FLA as well. i'm doing this so that when I add new themes, I don't need to re-compile a new player with a new backround...make sense?
The image is in the same directory .swf file. Strange that it works when called directly but not through the theme.
smith.kyle:
I don't know how you're doing it, but if you're pointing something to an image file somewhere, make sure you are using an absolute path, and not a relative path.
Joined: 30 Mar 2005
Posts: 4086
Location: Southern California
Posted: 10/14/08 08:45
When you call the player into an Artist page, its going to be looking for everything in the media or members directories. And I think your problem is that you have the graphics in the Theme directory. Try changing your theme.cfg file so it creates a copy of your graphic in each artist directory that is using that theme and see if that helps.
And it might be easier to call your graphic into the player using the FlashVar function in the embed code instead of having it hard coded in the Fla. That way you could change the URL to the graphic whenever you wanted without recompiling the player.
And it might be easier to call your graphic into the player using the FlashVar function in the embed code instead of having it hard coded in the Fla. That way you could change the URL to the graphic whenever you wanted without recompiling the player.
Let me know......
Hi Sylem, thanks for the clues. I LOVE this idea. Here is what I've done:
I added this:
<param name="bgimage" value="'. $params['bgimage'] .'"/>
to line 229 of {function.jr_flash_player.php}
I added this:
bgimage="`$JAMROOM_URL`/themes/Theme_Dev/images/`$SITE_STYLE`/playerControlBKG.jpg"
to the "{jr_flash_player player_type="`$JAMROOM_URL...} smarty tag.
of {common_header.tpl}
Rebuild the profiles, and checked the page. The image doesn't show up...but I view the source code of , and the new param is printing as expected:
<param name="bgimage" value="themes/Theme_Dev/images/Theme_Dev/playerControlBKG.jpg"/>
It feels like this is ~almost~ right....
~E
Last edited by elric on 11/13/08 17:43; edited 1 time in total
ok, added this to the FLA file:
/* Specify default image in case there wasn't a value passed using FlashVars. */
var imgUrl:String = "/themes/Theme_Dev/images/Theme_Dev/playerBkg.jpg";
if (_level0.imgURL != undefined) {
// If image was specified, overwrite default value.
imgUrl = _level0.imgURL;
}
Joined: 30 Mar 2005
Posts: 4086
Location: Southern California
Posted: 10/14/08 17:32
I'm not a flash expert and maybe Nate could give some better advice on this than me, but it looks to me like your first trying to load a default image into the player and then if there is a second image defined in the flash variable, load that instead ??
Why dont you just install a default image in the player to begin with so it doesnt have to be loaded. Then all you would have to do is worry about the code needed to load a second image "over" the default image if you want to change the default. I think the code needed would be allot simpler and all you would need to do is keep the second image the same size as the default image.
I already created a player that does this but I had issues having it pull the background graphic out of some kind of generic directory that could be used on anyones site. The problem I had was with the depth of the Jamroom directory in the URL which can be different on everyones site along with a few other issues related to using this idea in many different skins and themes.
But I basically just used this in the frame that held the default background image....
createEmptyMovieClip("contain",0);
contain.loadMovie("../switch_ls.jpg")
And then you dont need a Flashvar because you should be able to define where you want the player to look for the "switch_ls.jpg" and if one isn't there it just shows the default background image. The code above tells it to look 2-directories down the URL for a "switch_ls.jpg" file.
I don't know if this helps, but like I said I'm not a flash expert.......
I'm not a flash expert and maybe Nate could give some better advice on this than me, but it looks to me like your first trying to load a default image into the player and then if there is a second image defined in the flash variable, load that instead ??
But I basically just used this in the frame that held the default background image....
createEmptyMovieClip("contain",0);
contain.loadMovie("../switch_ls.jpg")
And then you dont need a Flashvar because you should be able to define where you want the player to look for the "switch_ls.jpg" and if one isn't there it just shows the default background image. The code above tells it to look 2-directories down the URL for a "switch_ls.jpg" file.
I don't know if this helps, but like I said I'm not a flash expert.......
Unfortunately, Jamroom doesn't like relative linking like this. That's why I'm trying to use a FlashVar, so that the absolute link gets added at runtime. It should be simple enough, I just can't figure out what I'm missing.
Joined: 30 Mar 2005
Posts: 4086
Location: Southern California
Posted: 10/15/08 15:20
elric:
daddysylem:
I'm not a flash expert and maybe Nate could give some better advice on this than me, but it looks to me like your first trying to load a default image into the player and then if there is a second image defined in the flash variable, load that instead ??
But I basically just used this in the frame that held the default background image....
createEmptyMovieClip("contain",0);
contain.loadMovie("../switch_ls.jpg")
And then you dont need a Flashvar because you should be able to define where you want the player to look for the "switch_ls.jpg" and if one isn't there it just shows the default background image. The code above tells it to look 2-directories down the URL for a "switch_ls.jpg" file.
I don't know if this helps, but like I said I'm not a flash expert.......
Unfortunately, Jamroom doesn't like relative linking like this. That's why I'm trying to use a FlashVar, so that the absolute link gets added at runtime. It should be simple enough, I just can't figure out what I'm missing.
If I get some time this weekend I'll play with this and see if I can help. But right now I really dont know what to tell you.
If I get some time this weekend I'll play with this and see if I can help. But right now I really dont know what to tell you.
Sorry......
No worries, man!! It's all a learning curve. If i figure out something, i'll post it. In the meantime, i just put my flash smarty code inside a div, set the style of a div with the {$JAMROOM_URL}/themes/Theme_Dev/images/{$SITE_STYLE}/playerControlBKG.jpg for the background, re-compiled my player with a transparent background, and it works quite nicely across IE6, IE7, Safari, and FireFox. It's not as sexy as I would have liked, but it's quite functional, and more importantly, scalable.