You will recieve your password to this address. Address is not made public.

Your preferred username that is used when logging in.

How do I Load a flash plugin with flashvars Created Oct 15, 2009

This thread is solved

Views: 3063     Replies: 4     Last reply Apr 2, 2010  
You must login first before you can use this feature

rmerch

Posts: 8

Registered:
Sep 16, 2009

How do I Load a flash plugin with flashvars

Posted: Oct 15, 2009

At present I am loading flash content over my video everytime it reached a certain part of the timeline. using the code below:

myflow.loadPlugin("swipe" + current, playerPath + "plugins/swipe/red.swf",
{
bgcolor:'#FEFE33',
top: 0,
left: 0,
width: 790,
height: 293,
zIndex: zindex
}

As you can see I am only loading one swf file (red.swf). What I want to do is make it more dynamic by loading a swf file with a white background and pass the background colour each time I load the flash plugin.

I have tried passing in the background colour in the url to the swf file like this: plugins/swipe/red.swf?bgcolor=#ffffff but this cause the plugin to fail.

Does anyone know how to get this to work

Thanks

rmerch

Posts: 8

Registered:
Sep 16, 2009

Solved: How do I Load a flash plugin with flashvars

Posted: Oct 21, 2009

Reply to: How do I Load a flash plugin with flashvars, from rmerch
So where to begin, I have been having trouble with this for a very long time and was about to give up on the whole idea. Just to give you a rundown on what I wanted to do.

1. I have a video player that has several clips on the same time line.

2. When the video reaches the next clip, a flash animation plays before the next video starts.

3. Each clip has its own colour.

What I wanted to do was set the colour of the flash animation to the colour of the clip. The animation was a simple swipe across the screen, like a curtain being drawn.

To embed the animation in the player, I am using the loadPlugin function. I tried several ways to pass the colour to flash. Setting in in the JSON calls and as a query string. I had no luck with the JSON calls as i had no way of knowing how the loadPlugin embeds the flash of where it was located. Normally you can look at the source file and see the embed content but there was no reference to the flash animation I was loading.

So I decided to look at getting the value from the query string.

The call to the loadPlugin flash contents looks like this:

myflow.loadPlugin("swipe" + current, playerPath + "plugins/swipe/swipe.swf?" + colours[current % colours.length]

colours is an array of colours.

To get this value in flash, I used the actionscript code:

1. Get the url that called the flash content: var url = this._url;

2. Then get the parameter, in this case the hex value:
var paramPosition = url.lastIndexOf("?");

3. Then we take that parameter and store it in a variable:
var param = url.substring(paramPosition + 2, url.length).toLowerCase();

I add 2 in order to remove the ? and # from the parameter. Flash uses the 0xffffff format.

4. Because I was using this variable in several places in the flash time line, I set it as a global variable:

_global.colourHexValue = param;

5. Now I had to set the colour of the flash elements. To do this I had to make each element a moveclip and set an instance name for eack movieclip. I then use the folowing code to set the colour:

var setSwipeColor = new Color(swipe);
setSwipeColor.setRGB("0x" + colourHexValue);

I hope this helps someone.

Queenvictoria

Posts: 2

Registered:
Mar 15, 2010

» How do I Load a flash plugin with flashvars

Posted: Mar 15, 2010

Reply to: How do I Load a flash plugin with flashvars, from rmerch
http://flowplayer.org/forum/2/19655

Use the flash parameter bgcolor in the 2nd argument (note that it changes from string to array) to flowplayer:


flowplayer("containerid", { 
  src: "/path/to/flowplayer.swf", bgcolor: "#ffffff" 
}, { 
  // player config 
}); 

[ Note the 2nd parameter is now an array ]

Here's further reading ;-)

india123
http://www.articlesbase.com/health-articles/top-grade-acai-review-where-to-buy-top-grade-acai-1970281.html

Posts: 1

Registered:
Apr 2, 2010

Top Grade Acai

Posted: Apr 2, 2010

Reply to: How do I Load a flash plugin with flashvars, from rmerch
how we use database activity with javascript.
i also want to share about Top Grade Acai its concerning link :
http://www.articlesbase.com/health-articles/top-grade-acai-review-where-to-buy-top-grade-acai-1970281.html