23/03/2010, 17:02
|
| | Fecha de Ingreso: marzo-2010
Mensajes: 4
Antigüedad: 14 años, 8 meses Puntos: 0 | |
Respuesta: contextmenu en template hola Bandit muchas gracias por tu respuesta, mira qui esta el codigo no hay nada de contextmenu ayudame porfis
// C o p y r i g h t © f l a s h m o . c o m
// D e v e l o p e d b y M i n T h u
stop();
fm_button.visible = false;
// To make a link to an external page, write label as "Label|URL" in array value
// EXAMPLE 1: "Flash Templates|http://www.flashmo.com/store"
// EXAMPLE 2: "Donate|http://www.flashmo.com/donate"
var menu_label:Array = new Array("All Photos", "Insects", "Flowers",
"Testimonials", "About Us", "Contact Us");
var total:Number = menu_label.length;
var i:Number = 0;
var page:Number;
var main_menu:MovieClip = new MovieClip();
var roller_group:MovieClip = new MovieClip();
stage.addChild(main_menu);
for( i = 0; i < total; i++ )
{
var btn = new flashmo_button();
btn.name = "btn" + i;
btn.x = fm_button.x + (fm_button.width + 10) * i;
btn.y = fm_button.y;
btn.item_no = i;
btn.addEventListener( Event.ENTER_FRAME, btn_enter );
var each_substring:Array = menu_label[i].split("|");
btn.flashmo_button_label.fm_label.text = each_substring[0];
btn.item_url = each_substring[1];
main_menu.addChild(btn);
}
function btn_over(e:MouseEvent):void
{
e.target.over = true;
}
function btn_out(e:MouseEvent):void
{
e.target.over = false;
}
function btn_click(e:MouseEvent):void
{
var mc = e.target.parent;
if( mc.item_url != undefined )
navigateToURL( new URLRequest( mc.item_url ), "_parent" );
else
change_page(mc.item_no);
}
function btn_enter(e:Event):void
{
var mc = e.target;
if( mc.over == true )
mc.nextFrame();
else
mc.prevFrame();
}
function change_page(no:Number):void
{
for( var i:Number = 0; i < main_menu.numChildren; i++ )
{
var mc = MovieClip( main_menu.getChildAt(i) );
mc.over = false;
mc.flashmo_click_area.visible = true;
mc.addEventListener( MouseEvent.ROLL_OVER, btn_over );
mc.addEventListener( MouseEvent.ROLL_OUT, btn_out );
mc.addEventListener( MouseEvent.CLICK, btn_click );
}
var mc_selected = MovieClip( main_menu.getChildAt(no) );
mc_selected.over = true;
mc_selected.flashmo_click_area.visible = false;
mc_selected.removeEventListener( MouseEvent.ROLL_OVER, btn_over );
mc_selected.removeEventListener( MouseEvent.ROLL_OUT, btn_out );
mc_selected.removeEventListener( MouseEvent.CLICK, btn_click );
page = no + 1;
play();
}
change_page(0); // default page on load
flashmo_credit.addEventListener( MouseEvent.CLICK, credit_link );
function credit_link(e:MouseEvent):void
{
navigateToURL( new URLRequest( "http://www.flashmo.com" ), "_parent" );
}
/*
var default_volume:Number = 0.70; // 0.00 to 1.00
var bg_music:Sound = new flashmo_music();
var music_channel:SoundChannel = bg_music.play(0, 10000);
var music_volume:SoundTransform = new SoundTransform();
music_volume.volume = default_volume;
music_channel.soundTransform = music_volume;
sound_control.stop();
sound_control.addEventListener( MouseEvent.CLICK, play_pause );
function play_pause(e:MouseEvent):void
{
music_volume.volume = default_volume;
if( e.target.currentFrame == 1 )
music_volume.volume = 0;
music_channel.soundTransform = music_volume;
e.target.play();
}
*/ |