Streamlining the code for the button group with individual links and rollover imgs
I am looking for a solution to streamline the code for the array of 20+ buttons located inside the scroll pane.
I know I can make an array if all the buttons would have a unified code executable change, i.e. they would become larger and brighter.
My problem is that each button represents an product image in the lights off stage, then of rollover it is a lights on stage so I have to import two images in the on and off stage and play around with the opacity.
Additional problem is that each button has to ling to a different label.
My question is: is it possible to unify the code if buttons have that much individuality or I have to make each one of them as in the example below.
// makes a hand cursor appear over a mc acting as a button for all the buttons inside the scrollpnaeBckgrnd_mc.scrollpaneBckgrnd_btns_mc.
MovieClip(mc_pane2.content).scrollpaneBckgrnd_mc.scrollpaneBckgrnd_btns_mc.buttonMode = true;
MovieClip(mc_pane2.content).scrollpaneBckgrnd_mc.scrollpaneBckgrnd_btns_mc.useHandCursor = true;
///////////////INDIVIDUAL BUTTONS
MovieClip(mc_pane2.content).scrollpaneBckgrnd_mc.scrollpaneBckgrnd_btns_mc.FloraLyte _btn.FloraLyte_ON.alpha = 0;
var FloraLyte_btn_Tween:TweenLite = TweenLite.to(MovieClip(mc_pane2.content).scrollpaneBckgrnd_mc.scrollpaneBckgrnd_btns_mc.F loraLyte_btn.FloraLyte_ON, .5, {alpha:1, paused:true});
MovieClip(mc_pane2.content).scrollpaneBckgrnd_mc.scrollpaneBckgrnd_btns_mc.Flor aLyte_btn.addEventListener(MouseEvent.ROLL_OVER, overHandler_FloraLyte_btn);
MovieClip(mc_pane2.content).scrollpaneBckgrnd_mc.scrollpaneBckgrnd_btns_mc.Flor aLyte_btn.addEventListener(MouseEvent.ROLL_OUT, outHandler_FloraLyte_btn);
MovieClip(mc_pane2.content).scrollpaneBckgrnd_mc.scrollpaneBckgrnd_btns_mc.FloraLyte_btn. addEventListener(MouseEvent.CLICK, onClick_floralytePopUp);
function onClick_floralytePopUp(event:MouseEvent) :void {
gotoAndPlay("floralytepp");
function overHandler_FloraLyte_btn(e:MouseEvent):void{
FloraLyte_btn_Tween.play();
trace("you rolled over me");
function outHandler_FloraLyte_btn(e:MouseEvent):void{
FloraLyte_btn_Tween.reverse();
trace("you rolled off me");
MovieClip(mc_pane2.content).scrollpaneBckgrnd_mc.scrollpaneBckgrnd_btns_mc.FloraLytell_btn .FloraLytell_ON.alpha = 0;
var myTween:TweenLite = TweenLite.to(MovieClip(mc_pane2.content).scrollpaneBckgrnd_mc.scrollpaneBckgrnd_btns_mc.F loraLytell_btn.FloraLytell_ON, .5, {alpha:1, paused:true});
MovieClip(mc_pane2.content).scrollpaneBckgrnd_mc.scrollpaneBckgrnd_btns_mc.Flor aLytell_btn.addEventListener(MouseEvent.ROLL_OVER, overHandler);
MovieClip(mc_pane2.content).scrollpaneBckgrnd_mc.scrollpaneBckgrnd_btns_mc.Flor aLytell_btn.addEventListener(MouseEvent.ROLL_OUT, outHandler);
MovieClip(mc_pane2.content).scrollpaneBckgrnd_mc.scrollpaneBckgrnd_btns_mc.FloraLytell_bt n.addEventListener(MouseEvent.CLICK, onClick_floralytellPopUp);
function onClick_floralytellPopUp(event:MouseEvent) :void {
gotoAndPlay("floralyte2pp");
function overHandler(e:MouseEvent):void{
myTween.play();
trace("you rolled over me");
function outHandler(e:MouseEvent):void{
myTween.reverse();
trace("you rolled off me");
as ned suggested, plan your flow and code into it. here is one example:
var buttonArray = [someButton, someOtherButton, aDifferentButton];
for(var i = 0; i < buttonArray.length; i++){
//get reference to county movieclip
var mc = buttonArray[i];
//then add listeners
mc.addEventListener(MouseEvent.ROLL_OVER, overMe);
function overMe(e:MouseEvent){
var mc = e.target;
switch(mc){
case: someButton:
someOtherButton: doThis();
break;
case: aDifferentButton: doThat();
break;
default: //do nothing;
break;
function doThis(){
trace("do this")
function doThat(){
trace("do that")
Similar Messages
-
Where is the code for the collapse button in the default SAP iview layout?
I need to eliminate the collapse/restore button displayed on each iView tray. I was looking at the default layout component (com.sap.portal.layouts.default) but I could not find the code for the tray. The code for "FullWidth.jsp" (this file that implements the "FullWidth" component) is below:
<%@ taglib uri="prt:taglib:com.sap.portal.reserved.layout.TagLibHtmlb" prefix="hbj" %>
<%@ taglib uri="prt:taglib:com.sap.portal.reserved.layout.TagLibLayout" prefix="lyt" %>
<lyt:template>
<hbj:content id="myContext" >
<hbj:page title="Portal Page">
<lyt:container id="column1" />
</hbj:page>
</hbj:content>
</lyt:template>
as you can see, there is no reference to the tray tags.
note: I am familiar with how to create a new iView tray using the new Layout Tag Library (from blog below)
EFP: Layout Tag Library
, but I want am not interested in this approach... All I want is to modify the EXISTING tray.Hi,
may be it's helpful for you.
http://blog.flexexamples.com/2010/05/18/changing-the-background-color-of-a-disabled-spark- textarea-control-in-flex-4/
Regards
-Bechar -
How to create a transaction code for a function group with screen 100 as st
Hello ,
I have requirement where I need to create a function group and create screen 100, 200, 300 and include the function in the screens.
Customer asked me to create a transaction with the screen 100 as the starting screen.
Can you please let me know how to create a transaction code for a function group with screen 100 as starting screen.
[ It is not a module pool program ].
Thanks
Prashanth.
Moderator message - Please ask a specific question and do not ask the forum to do your work for you - post locked
Edited by: Rob Burbank on Jun 2, 2009 11:49 AMGo to transaction SE93, enter a transaction code that you want and click on "create". Enter a text and select the "Transaction with Parameters" button. In the Default Values section, enter START_REPORT in the transaction field. Check the "skip initial screen" box. In the Name of Screen field section enter the following lines:
Name of screen field: Value
D_SREPOVARI-REPORTTYPE RW
D_SREPOVARI-REPORT ZPCA
Save and transport accordingly. -
Has anyone one else had problems redeeming the code for the free onetime download of the Star Trek 2009 Movie?
dawnfromcabot wrote:
ITUNES HAS CHARGED MY DEBIT CARD $99.99 FOR GLOBAL WAR RIOT-SOME GAME I DID NOT KNOW WAS LOADED ON MY OTHER PHONE; HOWEVER, WHEN I PULLED UP THIS APP TO SEE EXACTLY WHAT IT WAS WAS I SURPRISED TO SEE I COULD DOWNLOAD IT FOR 'FREE'. I HAVE CONTACTED ITUNES THROUGH THIS REDICULOUSLY CHICKEN SH_T SYSTEM THEY USE SO THEY DO NOT ACTUALLY HAVE TO HEAR HOW UPSET A PERSON IS NOW THAT THEY CANNOT BUY FOOD FOR THEIR CHILDREN BECAUSE OF A MISTAKE MADE ON ITUNES PART. I DID RECEIVE AN EMAILED RESPONSE FROM STEPHANIE WHO ADVISED THIS WAS PUCHARED ON A PHONE THAT HAS PURCHASED DOWNLOADS IN THE PAST. I WONDER IF SHE THOUGHT TO LOOK AT MY ENTIRE DOWNLOAD HISTORY AND DISCOVER THAT NOTHING HAS EVER BEEN PURCHASED ON MY ITUNE ACCOUNT IN THE AMOUNT REMOTELY CLOSE TO WHAT THEY ARE CHARGING ME NOW. THAT IS BECAUSE I DO TRY TO MONITOR THIS ACCOUNT AND OBVIOUSLY THIS LAST PURCHASE WAS DONE WITHOUT MY KNOWLEDGE UNTIL I CHECKED MY ONLINE BANKING ACCOUNT, WHICH I DO EVERY DAY. TO MAKE MATTERS WORSE THE APP STATES IT IS FREE TO INSTALL WHEN YOU PULL IT UP SO NO ONE HAS CLARIFIED TO MY WHERE THE $99.99 COMES INTO PLAY. I WILL NOT DROP THIS UNTIL MY BACK ACCOUNT HAS BEEN PROPERERLY CREDITED IN THE SAME TIME FRAME IT TOOK YOU TO TAKE MY MONEY. I WILL LAUNCH A COMPLAINT WITH EVERY POSSIBLE ENTITY IN THE ITUNES COMPANY AND BUSINESSES OUTSIDE THAT REGULATE THEIR BUSINESS UNTIL THIS HAS RESOLVED IN MY FAVOR AS I AM THE ONE WHO HAS BEEN VICTIMIZED BY A COMPANY I INVITED INTO MY TELEPHONE NETWORK IN GOOD FAITH!!!!!!!!!!!!
Reading that is giving me a headache, how about normal type. -
How to add add the code for the MouseEvent.CLICK event
Could anyone help me who is a beginner please?
I'd like to know step by step how to do the following
instruction.
I am trying to add a link to my flash.
I drew a shape on the stage, select it and transform it to
movie clip (hit F8 or right-click on it and select "Convert to
symbol" from the popup menu or use the main menu: Modify ->
Convert to symbol). I resized it as the same size as my stage, then
make it transparent.
Then I am supposed to do the following in order to create a
link.
"add the code for the MouseEvent.CLICK event that would open
a url using the navigateToURL() function."
But I just don't know how to. Could anyone tell me step by
step approach please?
Thanks in advance.Yes, click the frame where you have the button on stage and
open the actions panel. paste the script in, and make sure whatever
instance name you gave the button, you plug into the script. Also,
the function declaration should be like so:
function callFunction(e:MouseEvent):void{ <-- 'e' can be
anything you want, it could be 'kfjeiwajfkd' for that
matter. -
500px give to me and redeem 24 code but i can't find the code for the activation of adobe cc
500px give to me and redeem 24 code but i can't find the code for the activation of adobe cc
Hi Ntinos,
Normally you just need to go to https://creative.adobe.com/redeem and sign in with your Adobe ID to activate the code. The address you gave to 500px for registration and payment has to match that of your Adobe ID.
Hope that helps,
- Dave -
I scratched the label off on a £25 gift card and it removed the code. How can I get the code for the card?
Click here and request assistance. Gift cards are usually if not always final sale because it would be easy enough for someone dishonest to abuse returns or replacements of them.
(58640) -
How do I obtain the code for the $50.00 reduction for lightroom from Lexar?
I recently purchased 2 - Lexar 300 16GB Compact Flash cards which included in the box notificationthat I would receive $50.00 off my purchase of Lightroom 3. I am unable to locate the Code.
Your help appreciated.
JB
[email protected]Thanks for your reply, but I am not sure where to locate the message page or where, exactly, to send this. I appreciate your help.
Message
Oct 23, 2010 6:54 PM
How do I obtain the code for the $50.00 reduction for lightroom from Lexar?
I recently purchased 2 - Lexar 300 16GB Compact Flash cards which included in the box notificationthat I would receive $50.00 off my purchase of Lightroom 3. I am unable to locate the Code.
Your help appreciated.
JB7000
[email protected] -
request the code for the exchange of Mac OS X Mountain Lion, on 25 July and still I do not get the validation email, what should I do?
ANYBODY HELP ME!!same problem here.....
anyone can help? -
Where is the code for the contentBackgroundColor in the spark textArea
Where is the code for the contentBackgroundColor in the spark textArea, I can't seem to locate it anywhere but you can set the contentBackgroundColor in the <s:TextArea tag
Hi,
may be it's helpful for you.
http://blog.flexexamples.com/2010/05/18/changing-the-background-color-of-a-disabled-spark- textarea-control-in-flex-4/
Regards
-Bechar -
Problem in fetching the code for the line item
Hi,
I am working on a report in which to display the values corresponding to the line item of a PO.
For, ex, if there are 3 line items 10,140,150 and their condition values such zing,zgrd,zbrd are the condition types consist of different values depending on the line item i.e. 10,140,150.
My problem is when i execute the code the data of 1st line item is correctly fetched but the rest 2 line item data is pasted as it is. only the main pricre changes and the code for zing,zbrd,zgrd remains same as it is in the first line item 10.
plzz proivde me guide lines how to solve this problem.
Here's d code:-
DATA : vspl LIKE konv-kbetr.
DATA : vspl1 LIKE konv-kbetr.
DATA : vkwert LIKE konv-kwert.
DATA: VSPL2 LIKE KONV-kbetr. "ZING COST
DATA: VSPL3 LIKE KONV-kbetr. "ZGRD COST
DATA: VSPL4 LIKE KONV-kbetr. "ZBDL COST
LOOP AT item.
SELECT kbetr FROM konv INTO item-rate WHERE knumv = header-knumv AND kposn = item-ebelp
AND ( kschl = 'ZP00' OR kschl = 'P001' OR kschl = 'PBXX' OR kschl = 'P000' OR kschl = 'PB00' OR kschl = 'ZING' OR kschl = 'ZBRD' OR kschl = 'ZGRD').
MODIFY item.
ENDSELECT.
ENDLOOP.
LOOP AT item.
SELECT kwert FROM konv INTO vkwert WHERE knumv = header-knumv AND kposn = item-ebelp
AND ( kschl = 'ZP00' OR kschl = 'P001' OR kschl = 'PBXX' OR kschl = 'P000' OR kschl = 'PB00' OR kschl = 'ZING' OR kschl = 'ZBRD' OR kschl = 'ZGRD').
ENDSELECT.
ENDLOOP.
CLEAR : vspl , vspl1 , vspl2 , vspl3 , vspl4.
LOOP AT item.
SELECT kbetr FROM konv INTO vspl WHERE knumv = header-knumv AND kposn = item-ebelp
AND kschl = 'ZCOM'.
ENDSELECT.
SELECT kbetr FROM konv INTO vspl1 WHERE knumv = header-knumv AND kposn = item-ebelp
AND kschl = 'ZBR1'.
ENDSELECT.
*******************Begin - new code added on 14.01.2009******************
SELECT kbetr FROM konv INTO vspl2 WHERE knumv = header-knumv AND kposn = item-ebelp
AND kschl = 'ZING'.
ENDSELECT.
SELECT kbetr FROM konv INTO vspl3 WHERE knumv = header-knumv AND kposn = item-ebelp
AND kschl = 'ZGRD'.
ENDSELECT.
SELECT kbetr FROM konv INTO vspl4 WHERE knumv = header-knumv AND kposn = item-ebelp
AND kschl = 'ZBRL'.
ENDSELECT.
*******************End - new code added on 14.01.2009******************
ENDLOOP.
LOOP AT item.
item-rate = item-rate + vspl + vspl1.
*******************Begin - new code added on 14.01.2009******************
item-rate1 = item-rate1 + vspl2.
item-rate2 = item-rate2 + vspl3.
item-rate3 = item-rate3 + vspl4.
********************End - new code added on 14.01.2009*******************
MODIFY item INDEX sy-tabix TRANSPORTING rate.
*******************Begin -11`` new code added on 14.01.2009******************
MODIFY item INDEX sy-tabix TRANSPORTING rate1.
MODIFY item INDEX sy-tabix TRANSPORTING rate2.
MODIFY item INDEX sy-tabix TRANSPORTING rate3.
*********************End - new code added on 14.01.2009******************
ENDLOOP.
PLZ PROIVDE ME GUIDLINES HOW TO SOLVE THIS PROBLEM .
Edited by: ricx .s on Jan 19, 2009 10:16 AM
Edited by: Vijay Babu Dudla on Jan 19, 2009 5:22 AMHello,
Why are you looping at the same internal table so many times, you could probably perform everything within one loop instead.
DATA : vspl LIKE konv-kbetr.
DATA : vspl1 LIKE konv-kbetr.
DATA : vkwert LIKE konv-kwert.
DATA: VSPL2 LIKE KONV-kbetr. "ZING COST
DATA: VSPL3 LIKE KONV-kbetr. "ZGRD COST
DATA: VSPL4 LIKE KONV-kbetr. "ZBDL COST
field-symbols <fs>.
LOOP AT item assigning <fs>.
SELECT kbetr FROM konv INTO <fs>-rate WHERE knumv = header-knumv AND kposn = item-ebelp
AND ( kschl = 'ZP00' OR kschl = 'P001' OR kschl = 'PBXX' OR kschl = 'P000' OR kschl = 'PB00' OR kschl = 'ZING' OR kschl = 'ZBRD' OR kschl = 'ZGRD').
MODIFY item.
ENDSELECT.
SELECT kwert FROM konv INTO vkwert WHERE knumv = header-knumv AND kposn = item-ebelp
AND ( kschl = 'ZP00' OR kschl = 'P001' OR kschl = 'PBXX' OR kschl = 'P000' OR kschl = 'PB00' OR kschl = 'ZING' OR kschl = 'ZBRD' OR kschl = 'ZGRD').
ENDSELECT.
ENDLOOP.
CLEAR : vspl , vspl1 , vspl2 , vspl3 , vspl4.
SELECT kbetr FROM konv INTO vspl WHERE knumv = header-knumv AND kposn = item-ebelp
AND kschl = 'ZCOM'.
ENDSELECT.
SELECT kbetr FROM konv INTO vspl1 WHERE knumv = header-knumv AND kposn = item-ebelp
AND kschl = 'ZBR1'.
ENDSELECT.
*******************Begin - new code added on 14.01.2009******************
SELECT kbetr FROM konv INTO vspl2 WHERE knumv = header-knumv AND kposn = item-ebelp
AND kschl = 'ZING'.
ENDSELECT.
SELECT kbetr FROM konv INTO vspl3 WHERE knumv = header-knumv AND kposn = item-ebelp
AND kschl = 'ZGRD'.
ENDSELECT.
SELECT kbetr FROM konv INTO vspl4 WHERE knumv = header-knumv AND kposn = item-ebelp
AND kschl = 'ZBRL'.
ENDSELECT.
*******************End - new code added on 14.01.2009******************
<fs>-rate = <fs>-rate + vspl + vspl1.
*******************Begin - new code added on 14.01.2009******************
<fs>-rate1 = item-rate1 + vspl2.
<fs>-rate2 = item-rate2 + vspl3.
<fs>-rate3 = item-rate3 + vspl4.
ENDLOOP.
Also, use field-symbols and use loop at itab assigning addition so that you can directly change the contents of the table without using modify statment.
regards,
Advait -
Who has the code for the mpegconverta
I have adobe premiere pro, I've edited it and want to burn it but it tells me I need an activation code for the MPEGconverta but nobody seems to know it at adobe ?
I don't think "MPEGconverta" is an Adobe product.
If you think it is part of Premiere Pro, then please ask in that forum. This is the Flash Player forum. -
I have an iTunes gift card with an unreadable "scratch off" code. I am unable to use the card? Any suggestions?
If you can't redeem your iTunes Gift Card or code.
-
please give me a reason as soon as possible !!!!! i need my phone to work
Sorry but I see that now other people are having your similar issue as you, when they updated it started asking them for a passcode. This is one thing I found that might help.....
Do a backup to iTunes (yes, you can do a backup to iTunes or iCloud even if your phone is locked), then put the phone into "recovery" mode (http://support.apple.com/kb/HT1808). Then restore the factory settings; basically a clean install of iOS7 (http://support.apple.com/kb/HT1414). Then finally, I restore from the backup you made (http://support.apple.com/kb/ht1766). The phone does not make me enter the passcode I had set (which was of course set when the backup was made), but it does prompt me to create a new one. I declined :-) I will try setting up a new passcode at some point, but I'm just glad to have my phone back for now. -
Like to know the code for the installed programs
Hi,
I am a newbie to JSP programming. I need to know the list of installed executables in the system to a list box in UI form. How could it be possible. Please suggest me.there would be two vendor codes and for each vendor code there will be separe schema for locan and import
Maybe you are looking for
-
I can't find a way to adust the font size when I am in itunes on my pc. I know how to adjust the display setting, but that seems to be an overkill. I don't need to use the largest font size all the time. Surely there must be a simple way to just adus
-
Question,Get data from ALV to internal table
Hi, friends I currently need to get the data displayed on ALV. But the original internal table is local. It means it has already been deleted. Do you know which method I shoud use? After that, I will move the records to other internal table. 3Q Mingh
-
Apple Mail search feature?
Is there a concise list anyplace that explains how to do boolean searches in Apple Mail, and all the various options? Have found information scattered here & there, and help file offers general instructions but no information on how to actually make
-
Pre-sales question for IPOD (file extensions)
I would like to buy my mother a IPOD Nano 2gb for her upcoming birthday, but have a quick question on the way it formats the files on my PC. Do I HAVE to have Itunes or any other software on my pc in order to place .mp3's on the IPOD? If I have to ha
-
Working with a BB in Hungary with Pannon provider
Since a couple of month I am trying to connect my BB 8900 to our server at Vredestein company in Enschede, Netherlands. All of my colleagues all over Europe are using BB phones and it took them a few minutes to activate the entire services.My BB has