
25-05-08, 20:52
|
|
Junior Member
|
|
Join Date: May 2008
Posts: 1
Rep Power: 0
|
|
|
Simple Problem Driving me Crazy
|
|
I am building a simple Video UI for Demonstration purposes. We have 7 Videos loaded that are triggered using functions for the related Buttons. In addition there is a Buy button that will simulate a purchase of the Video playing.
I need the Buy Button to have a URL assignment to a Shopping Cart Mock-Up for the currently playing Video.
I Have laid out Variables for the Shopping Carts.
Here is the Action Script:
import flash.events.MouseEvent;
var getCart1:URLRequest = new URLRequest("http://www.*************.**/shop/cart1.php");
var getCart2:URLRequest = new URLRequest("http://www.*************.**/shop/cart2.php");
var getCart3:URLRequest = new URLRequest("http://www.*************.**/shop/cart3.php");
var getCart4:URLRequest = new URLRequest("http://www.*************.**/shop/cart4.php");
var getCart5:URLRequest = new URLRequest("http://www.*************.**/shop/cart5.php");
var getCart6:URLRequest = new URLRequest("http://www.*************.**/shop/cart6.php");
var getCart7:URLRequest = new URLRequest("http://www.*************.**/shop/cart7.php");
//---Event Listeners---//
rockBtn.addEventListener(MouseEvent.CLICK,rockClic k);
urbanBtn.addEventListener(MouseEvent.CLICK,urbanCl ick);
popBtn.addEventListener(MouseEvent.CLICK,popClick) ;
altBtn.addEventListener(MouseEvent.CLICK,altClick) ;
newBtn.addEventListener(MouseEvent.CLICK,newClick) ;
currentBtn.addEventListener(MouseEvent.CLICK,curre ntClick);
rapBtn.addEventListener(MouseEvent.CLICK,rapClick) ;
buyBtn.addEventListener(MouseEvent.CLICK,buyClick) ;
//---Functions---//
function rockClick(event:MouseEvent):void {
myVideo.play("http://www.*************.**/*********/*****/*****.mp4");
}
function urbanClick(event:MouseEvent):void {
myVideo.play("http://www.*************.**/*********/*****/*****.mp4");
}
function popClick(event:MouseEvent):void {
myVideo.play("http://www.*************.**/*********/*****/*****.mp4");
}
function altClick(event:MouseEvent):void {
myVideo.play("http://www.*************.**/*********/*****/*****.mp4");
}
function newClick(event:MouseEvent):void {
myVideo.play("http://www.*************.**/*********/*****/*****.mp4");
}
function currentClick(event:MouseEvent):void {
myVideo.play("http://www.*************.**/*********/*****/*****.mp4");
}
function rapClick(event:MouseEvent):void {
myVideo.play("http://www.*************.**/*********/*****/*****.mp4");
} |
Last edited by Onsitus; 12-06-08 at 08:00..
Reason: Removed link to site on user's request
|