Hi there
I am doing a portfolio website with a lot of artwork, and I want to include a showreel video. I am working with AS3 in CS5.
The way I set it up, is that I have my main swf, and I load in each gallery or video as an external swf using this kind of code:
stop();
var my_loader:Loader = new Loader();
conceptButton.addEventListener(MouseEvent.CLICK, goConcept);
function goConcept(event:Event):void {
gotoAndStop("concept");
my_loader.load(new URLRequest("concept art.swf"));
addChild(my_loader);
}
If I navigate away from the galleries, to my contact info for instance, I use this bit of code:
contactButton.addEventListener(MouseEvent.CLICK, goContact);
function goContact(event:Event):void {
if(currentFrame > 20){
removeChild (my_loader);
my_loader=null;
gotoAndStop(1);
}
gotoAndStop("contact");
}
This works fine for the image galleries, but I can’t get it to work right for my video swf.
What I have done is, make a seperate swf, where I have imported my video clip. The clip itself is kept in the same folder as the swf, so I think I can use a relative path, and basically just have it’s name alone in the source field.
Then I upload the swf, to my website, along with the skin and the video. It work locally, but I can’t get it to work on the web. Is it a simply a question of getting the path right?
The second part of my question is:
Like I said, I can get it to work locally, but once I navigate away from the videoclip, I can still hear it playing in the background. If I then navigate back to it, another instance of the video will load, and I get can hear the old video playing in the background, while the new one is playing on top. How do I fix this?
Last but not least, I can’t figure out how to deploy my video as progressive download. How or where do I specify this?
I shold tell you, that I really don’t know my way around AS3. I used to be pretty good with AS2, but all I do now, is copy paste code snippets from tutorials and such.
You can see my website (in it’s incomplete stage) here. www.voncotta.com
Cheers