Mailing List
Home
Forum Home
Flash Pro
Subjects
Subject: RE: Firework Effect
Web Service Results
Flash Interface with 10mb xml file
AW: [Flashcoders] Switch/Case vs If/else
AW: [Flashcoders] Switch/Case vs If/else
Flash MX 2004 Sucks
Reading and displaying RSS feeds in Flash MX
Flash and QuickTime VR
Textfield prototype question
XML to Object help
Order of events per frame
MX2004 Dataset itemClassName
memory management removeMovieClip /
Event Dispatcher between classes
Help: MX 2004 How to script a print button to print the entire sli
ScrollPane component doesn 't auto update
setInterval bug identified and fixed
setInterval bug identified and fixed
Listener Object 's best practice
 
detecting a held button

detecting a held button

2004-03-06       - By Richard Carr

 Back
Reply:     1     2     3     4     5     6     7     8     9     10  



Hi Andreas,
I really appreciate your assistance. This has been driving me crazy  for
days.
The hand cursor shows on other buttons (mc's) on stage. Placing a "
myButton2_mc" on stage works locally and trace results work, but button2
doesn't work live.( hand cursor shows tho)
The text on holder_mc"+i, loads from the db on 4 test mc's. , so button is
there.  Prior to placing "double click" code, sound and zip loaded fine,
using a seperate button for each. I've also tried the double click with out
the other button functions.( onRollOver etc).
Thanks !!!!!
Here's the code, on frame one with a stop action, flash mx,

stopAllSounds();
limit = 200;
clicked = 0;
myData = new LoadVars()

myData.load("zip.php")



myData.ref = this

myData.onLoad = function(succes){
if(succes){
 for(var i=0; i<this.cant; i++){
  this.ref["Title_txt"+i].htmlText = "<b>"+this["Title"+i]+"</b>"
 //need }else{ here
};
};

 this.ref["holder_mc"+i].sound = this["Sound"+i]
this.ref["holder_mc"+i].onPress = function() {
clicked ++;
if(clicked == 1){
int1 = setInterval(test2, limit)

}
}
this.ref["holder_mc"+i].onRelease = function(){


function test2(){
if(clicked == 1){
trace('do the one-click thing');
       mySound = new Sound();
         mySound.loadSound(this.sound, true);
        // this._alpha=50;
   this.loadPlay.gotoAndPlay(2);

 this.BtnFade.gotoAndStop("press");
 this.loadPlay.gotoAndPlay(2);



  }else{
trace('do the double-click thing');
 this.getURL(this.zip,"_parent");

clicked = 0;
clearInterval(int1);
}
}
}
};


//888888888888888888
this.ref["holder_mc"+i].onRollOver = function() {
this.BtnFade.gotoAndPlay("over"); // not working with double click code in
place

};
//88888888888888888
this.ref["holder_mc"+i].onRollOut= function() {
//_parent.subMenu.femScroll.femCHA.femCHA1.two.artistText.gotoAndStop(1);
this.BtnFade.gotoAndPlay("out");  // not working with double click code in
place
};
//888888888888888888
//uses table "new10" , zip.php
//****************************************88888888888888
this.ref["holder_mc"+i].onReleaseOutside = function() {
this.BtnFade.gotoAndPlay("out");  // not working with double click code in
place

};
//88888888888888888888888
// double-click test button works locally only

limit = 200;
clicked = 0;

myButton2_mc.onPress = function(){
clicked ++;
if(clicked == 1){
int1 = setInterval(test2, limit)
}
}
myButton2_mc.onRelease = function(){
// whatever
}

function test2(){
if(clicked == 1){
trace('do the one-click thing');
gotoAndStop(6);//works, locally only
}else{
trace('do the double-click thing');
gotoAndStop(10);//works, locally only
}
clicked = 0;
clearInterval(int1);
}

-- -- Original Message -- --
From: "Andreas Weber" <webweber@(protected)>
To: <flashnewbie@(protected)>
Sent: Friday, March 05, 2004 11:36 PM
Subject: RE: [Flashnewbie] detecting a held button


> Hi Richard
>
> Basically there is nothing wrong how you apply the double-click code - the
> problem seems to be that there is 'no button'.
>
> > no hand cursor...
>
> I would suppose that
>
>    this.ref["holder_mc"+i]
>
> does not resolve to a MC, is probably undefined.
>
> Put a
>    trace(this.ref["holder_mc"+i]);
> at the beginning of your script to find out.
>
> From the (fragment-) script you posted it's impossible to say why it does
> not evaluate as expected and how it could be fixed. You would have to give
> more context / more code.
>
> HTH
>
> -- ---- ------
> Andreas Weber
> motiondraw.com
>
>
>
>
> -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
> Supported by Fig Leaf Software
> -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
> Lower Prices for Certified Training! Check out new lower prices for
> Certified Macromedia Training from Fig Leaf Software. Expand your
> skill set with courses in ColdFusion, Flash, Rich Internet
> Applications and .NET in the new year.  Fig Leaf Software provides
> the highest caliber instruction at our training centers in Washington
> D.C., Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at
> your location.
>
> Get the details at http://training.figleaf.com/
> -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
> To unsubscribe, e-mail: flashnewbie-unsubscribe@(protected)
> For additional commands, e-mail: flashnewbie-help@(protected)
>
>


-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
Supported by Fig Leaf Software
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
Lower Prices for Certified Training! Check out new lower prices for
Certified Macromedia Training from Fig Leaf Software. Expand your
skill set with courses in ColdFusion, Flash, Rich Internet
Applications and .NET in the new year.  Fig Leaf Software provides
the highest caliber instruction at our training centers in Washington  
D.C., Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at
your location.

Get the details at http://training.figleaf.com/
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
To unsubscribe, e-mail: flashnewbie-unsubscribe@(protected)
For additional commands, e-mail: flashnewbie-help@(protected)