Problem using string to store evt.target.data and apply property filters

I have about 9 buttons on my stage and I want to write code for the rollover and rollout effects, I only want to write the code once so I am trying to pass the button info into a string via evt.target.data and it pass the info properly into my string variable but when I try to set my filter to that variable, setting my movieclip instance name to that variable, I get 2 errors:
1119: Access of possibly undefined property filters through a reference with static type String.
Warning: 1072: Migration issue: String is not a dynamic class.  Instances cannot have members added to them dynamically.
My code is:
import fl.transitions.Tween;
import fl.transitions.easing.*;
var thumbArray:Array=new Array();
var movieClipLoader:Loader;
var movieClipsStage:Array=new Array(mc0,mc1,mc2,mc3,mc4,mc5,mc6,mc7,mc8);
toolTip_mc.alpha=0;
var lumRd:Number=.2127;
var lumGr:Number=.7152;
var lumBl:Number=.0722;
//grayscale
var grayscale:ColorMatrixFilter = new ColorMatrixFilter([lumRd, lumGr, lumBl, 0, 0,
lumRd, lumGr, lumBl, 0, 0,
lumRd, lumGr, lumBl, 0, 0,
0, 0, 0, 1, 0]);
//drop shadow
var ds:DropShadowFilter = new DropShadowFilter();
ds.distance=5;
ds.blurX=10;
ds.blurY=10;
ds.alpha=.7;
//varialbe to store movieclips based on rollover
var whichThumb:String;
var myXMLInfo:XML;
var thumbList:XMLList;
var toolNameList:XMLList;
var myXMLLoader:URLLoader=new URLLoader  ;
myXMLLoader.load(new URLRequest("stars.xml"));
myXMLLoader.addEventListener(Event.COMPLETE, loadComplete);
function loadComplete(evt:Event):void {
myXMLLoader.removeEventListener(Event.COMPLETE, loadComplete);
myXMLInfo=XML(evt.target.data);
thumbList= new XMLList();
toolNameList=myXMLInfo.star.@toolname;
thumbList=myXMLInfo.star.@thumbimage;
for (var n:int=0; n<movieClipsStage.length; n++) {
movieClipLoader=new Loader();
movieClipLoader.load(new URLRequest(thumbList[n]));
movieClipsStage[n].addChild(movieClipLoader);
mc0.filters=mc1.filters=mc2.filters=mc3.filters=mc4.filters=mc5.filters=mc6.filters=mc7.fi lters=mc8.filters=[ds,grayscale];
mc0_bu.addEventListener(MouseEvent.ROLL_OVER, thumbRollEffect);
function thumbRollEffect(evt:MouseEvent):void {
whichThumb = evt.target.name;
whichThumb.filters=[ds];
Thank you for your help!

kglad, thanks for helping.
basically, i am a newbie and i'm not clear on your answer . if evt.currentTarget is better, I would like to use the best method, so thanks. i'm trying to get my head around what's going on here in the code. i get that actionscript is storing a "reference" to the object but I don't get why I can't put that reference (which is the name of the movieclip on the stage I wish to apply filters to, i.e. mc0) into a string variable (whichThumb) and then use that string variable to apply the filter (whichThumb.filters=[ds];)
on one hand, i'm getting error that says "possibly undefined property filters thru a ref with string" which I don't get because the filters are defined outside of the function and are called intially in the load function with no problem. and on the other hand, i am getting another error saying there is a "migraiton issue" with my string not being a dynamic class. do i need to make the var whichThumb another type other than string? if so, what type. maybe that will also solve the "undefined property" issue as well.
still learning, Thanks for help!

Similar Messages

  • Can I use ICloud to store all my data and use it seamlessly with my devices and Mac?

    Can I use ICloud to store all my data and use it seamlessly with my devices and Mac.  I.E. I want to use it as I use my time capsule and get rid of all this stuff I have in my office.

    Yes.
    Apple - iCloud - Learn how to set up iCloud on all your devices

  • Convert XML string into an abap format date and time

    Hi,
    Does anyone know of a method or a function module in ABAP which converts XML string into an abap format date and time.
    Here is a part of the xml that I want to convert.
    <ns2:EventDateTime>2009-07-02T10:13:45+10:00</ns2:EventDateTime>
    <ns2:EventMessageTransmissionDateTime>2009-07-02T10:13:45.987+10:00</ns2:EventMessageTransmissionDateTime>
    Currently EventDateTime and EventMessageTransmissionDateTime are type XSDDATETIME_Z and these are converted to proper dates and times. We will be changing these fields to a STRING instead of XSDDATETIME_Z. The reason for this is to make the field more versatile. The customer would be receiving dates with Zulu (2009-09-23T12:00:00Z), with offsets (2009-09-23T12:00:00+10:00/-10:00) and just local timestamp (2009-09-23T12:00:00). With this, we need to make the date fields as string
    to be able to accept the various date formats (esp. the local timestamp).
    I am looking for a standard function module or method that will convert the xml string to a proper date and time abap format.
    Would appreciate anyone's help!
    Thanks.
    Edited by: eunice ocson on Jul 13, 2009 1:49 AM
    Edited by: eunice ocson on Jul 13, 2009 1:50 AM
    Edited by: eunice ocson on Jul 13, 2009 1:51 AM
    Edited by: eunice ocson on Jul 13, 2009 1:51 AM

    Hi Eunice
    Use the FM 'SMUM_XML_PARSE'
    for more info
    [Convert XML string to ABAP|XML String to ABAP or GUI]
    hope it helps you.
    Thanks!!

  • Silent print a PDF from a web page using Flex. We are targeting Windows and Mac with Arcobat reader installed

    We are planning to Silent print a PDF from a web page using Flex. We are targeting Windows and Mac with Arcobat reader installed. I have tried using the AIR appliaction and it worked, But our requirement is NO INSTALL to the user machine for the silent printing. It is just from web page and silent printing to the default printer to the desktop/Laptop. Can anyone share your thoughts and experience with us. It will be very helpful..
    For AIR : I tried the thread Re: AIR and PDF showing/silent printing

    Hey CodeMonkey & Ross,
    Did you either of you ever find a solution? I'm stuck too, it seems I can get remote printing on all these PDFs to work but it just prints a blank page since I've been using Javascript in the browser, not Adobe's (they are Engineering drawings that I do not have permission to edit so I can't just insert code into them but I need to make work instructions). I've been scouring the internet for hours now, it seems that this thread is the only relevant/useful one at this point. No one else was trying to achieve this for similar reasons to mine.
    Thanks guys,
    Lox

  • My iPhone 4S has a problem. The App Store is in Spanish and will not go back to English. Help someone!

    My iPhone 4S has a problem. The App Store is in Spanish and will not go back to English. Help someone!

    I tried turning the computer off and then back on. The alerts don't show the notice to update as resolved. Hopefully this is not a problem or an indicator or another problem. Should I ignore or reload 10.10.1 from the app store to trigger a resolved check in a green circle?
    Interesting that I had to buy server software after my free Yosemite download. I would have hoped that the two pieces of software would have gone together without any complication. It is not positive to end up buying a problem. Ah well, time to move on.

  • HT204053 I am trying to use the app store on my iphone5 and it says my apple id had been disabled

    I am trying to use the app store on my iphone5 and it says my apple id had been disabled

    Apple ID security issues -
    Account security issues almost always require you to speak directly to an Apple representative to securely establish your identity as the account holder. You can set it up so that Apple calls you, either immediately or at a time convenient to you.
    1. Go to www.apple.com/support
    2. Choose Contact Support and click Contact Us
    3. Choose Other Apple ID Topics and choose the appropriate topic for your issue
    4. Follow the onscreen instructions

  • Take FFT data and apply a hand arm weighting filter

    I have taken some vibration data and converted it to an FFT then saved this data to a csv file (Freq versus m/s^2). There are three axis of vibration so the file contains four columns: Frequency, X vib, Y vib, Z vib. There are about 1600 lines with frequencies starting at around 25 HZ up to about 19,999 HZ.
    Can I take this file, read in the FFT data, and apply a hand-arm weight to the data using the weighting VI or one of my "home made" weighting VIs?
    I would like to convert the FFT data to a 1/3 octave spectrum, then weight the spectrum according to ISO-5349 (hand arm vibration). 
    I know how to do all of this with the raw (time domain) data but this is saved FFT data.
    Not sure if the question makes sense, but basically I screwed up and took some vibration numbers, saved the FFT but forgot to apply the 1/3 octave hand arm vibration weight. Just wondering if it can be done later.
    Jeff

    Hi ykhalil,
    Here's a pretty detailed explanation of signal processing in LabVIEW:
    https://decibel.ni.com/content/docs/DOC-3022/version/1
    Also, are you using the NI Sound and Vibration Toolkit?
    Regards,
    Lindsey W. | Applications Engineer | National Instruments

  • Design of Cube to Store SEM Target Data - for HR

    Hello,
    I am in the process of completing a Scorecard and Management Cockpit for the HR function at my company.  Currently, the most perplexing piece is how to handle targets.  I know they can be entered via BPS, have to be stored in a BW InfoProvider, etc.  However, the actual design and requirements of the cube seem daunting at this point. 
    Given the way that HR data is sliced and diced, it looks like we'd have to maintain millions of targets...
    These are 6 of the ways we look at enrollment numbers: 
        Sub-Business Unit   A, B, C, D, E, F..
        Function            A, B, C, D, E, F..
        Band                A, B, C, D, E, F..
        Rating              A, B, C, D
        Gender              A, B, C
        Country             A, B, C, D, E, F..
    etc.
    Having to define a target for each slice of these, across each possibility of characteristic combinations (and this is a partial listing) is probably not feasible...
    Am I looking at this correctly?
    Is there something I'm missing, or perhaps a better way to do this?
    EXAMPLE:
    For financial data, if you want to store targets, the table needn't be very large -- the measures you want to track against, by the level of detail you want to see...  (i.e. cost center, etc.)  Let's say there are 100 cost centers in the company, and you want to see Net Sales.  You'd end up with 100 target values:  Net Sales for each cost center.  If you want to also see Gross Sales and Revenues, then it adds another line for each cost center/site.  In this example, that would be 300 entries -- 100 cost center values for Net Sales, 100 for Gross Sales, and 100 for Revenues.  (So it's A * 3.) 
    However, with HR data, say we want to track the Number of Employees.  If we want to see the Number of Employees by Country, then it's basically flat.  For the sake of simplicity, let's say we have 100 countries.  Recording target values for Number of Employees by Country would result in 100 fields for entry.  However, if we wanted to add dimensions for Band/Position Level (10), and Employee Rating (4), the number of possibilities grows practically exponentially.  These dimensions are related - there are instances where we would want to see the Number of Employees in the US, for a Band of 4, and Employee Rating of 3.  It's no longer A + B + C.  Rather, it becomes A * B * C.  In this simple example, the total is 100 x 10 x 4 = 4000.
    The comparison to the financial example is that you wouldn't want to see Gross Sales by Net Sales.  It doesn't make sense.  However, in the master data intensive world of HR, you do want to slice and dice within/across dimensions.  The cube would be the same size as the existing one for actuals - and we would have to populate it at the most granular level for each "piece" or possible way we would want to slice and dice the data, correct?
    Does this make sense?
    Is there an easier way to do this?
    Is there some sort of Aggregate way to store these kinds of targets?
    Any insight would be greatly appreciated.
    Thanks,
      Erica

    kglad, thanks for helping.
    basically, i am a newbie and i'm not clear on your answer . if evt.currentTarget is better, I would like to use the best method, so thanks. i'm trying to get my head around what's going on here in the code. i get that actionscript is storing a "reference" to the object but I don't get why I can't put that reference (which is the name of the movieclip on the stage I wish to apply filters to, i.e. mc0) into a string variable (whichThumb) and then use that string variable to apply the filter (whichThumb.filters=[ds];)
    on one hand, i'm getting error that says "possibly undefined property filters thru a ref with string" which I don't get because the filters are defined outside of the function and are called intially in the load function with no problem. and on the other hand, i am getting another error saying there is a "migraiton issue" with my string not being a dynamic class. do i need to make the var whichThumb another type other than string? if so, what type. maybe that will also solve the "undefined property" issue as well.
    still learning, Thanks for help!

  • Using singleton to store rows of data

    Hello,
    I'm working on a web project involving struts.
    I have a jsp page, action class, action form, and a session ejb.
    I'm getting rows from database.
    What I would like to do is to use SIngleton approach to store rows of data for users.
    Does anyone know how to implement that approach?
    Thank you.

    Hello,
    I'm working on a web project involving struts.
    I have a jsp page, action class, action form, and a
    session ejb.
    I'm getting rows from database.
    What I would like to do is to use SIngleton approach
    to store rows of data for users.
    Does anyone know how to implement that approach?
    This would be a very very very bad design since the singleton would be shared between ALL users of the JSP and they would therefore interfere with each other.

  • Problems Using the iTunes store from AppleTV

    Over the last month I've had large problems downloading content from the iTunes store using my AppleTV. For instance 3 weeks ago it took several attempts to rent a movie. Ever since Saturday I've been trying to purchase a season pass for Season 3 of Robot Chicken. Every time it would say "This content is being modified, please try again later." Got that again 10 minutes ago, got fed up and I went and pulled on the iTunes store on my computer and tried and it went right through, just like it should. I wanted to go this route, because if I buy it on AppleTV new episodes will be downloaded to it (I've found a way to download season pass shows I bought on AppleTV to my computer first, but not a way to do the reverse).
    More importantly, I've had just numerous problems and errors purchasing content from AppleTV. As iTunes on a computer doesn't have these issues, the only thing I can figure out is that the software still isn't right.
    Andy

    I posted a similar problem last week about the inability to move past "See All" in Podcasts. What was happening to me was that I would click "See All" and I'd get a message saying the request could not be completed. After getting no response here, I called up an Apple Expert about the problem. When I described the problem, the Expert tried it on her Touch and ran into the same problem. She called up the iTunes folks and reported that there was a problem and they were working on getting it fixed.
    A couple of days later, instead of getting the "Your response could not be completed" it went to the default Music section as you describe. They must be working on it, but don't know why it hasn't been fixed yet. The Apple Expert said to call back if the problem persists, but I haven't had the time yet.

  • Help!!! - Problem using the app store

    We have deployed a small number of iphones to test the admin effort required with them vs Blackberries. We redeployed a 16GB iPhone from person A to person B. When person B went to download an application, the apple store userd id of person A was filled in and person B can't change the field to their user id. Help!

    Hold your finger on the app icon on the screen until an x appears in the corner and the icons wiggle. Click the X to delete. Press the home button to stop the wiggle.
    You should have the user sync with itunes, and in the left pane select the iPhone, and go to the restore tab and "set up as new". This will wipe out old data and associations to user A. It will delete all data as well.
    My guess is that you just passed the iPhone around but did not wipe it clean.

  • Any problems using the app store over seas?

    When setting up my friends ipod it asked for the region. She frequently visits America but goes to school in greece, and will be spending most of her time there (as well as using the touch and itunes store). When I skimmed the terms it said it was prohibited to use the store outside of the USA territory. Does it matter what region is put down? Can she still download apps in greece using the store? Or should I put Greece as the region? Do the apps differ from region to region? Please help! Thanks!

    You can only use apps with the US app store.
    As far as I know, you can't use the App Store from other countries.
    Might work if you leave it as US and don't change it.
    Sorry, not sure though.

  • Using Flex/PHP to Display MYSQL data and Images

    Does anyone have any good examples of using Flex 3 in conjunction with PHP to display data and images from a mysql database? I've searched a lot and it seems hard to find this combination. I have manged to create a login system using this which allows users to login via usernames and passwords that are stored in my mysql database (Grizzz helped me out a lot with this).
    But I now want to create a product selection in the site with the categories down the left hand side and the products related to these categories displayed in the other panel once each of these products are clicked. The guy I'm making it for wants to be able to add and delete categories as well as add and delete products so obviously it needs to be done using php and mysql. I'm looking for something similar to the way the online shop is laid out in the following example:-
    https://www.whitestonecheese.co.nz/Radshop/bin/Whitestone.html
    Thanks for any suggestions.

    To solve this problem I had to use labelFunction.  The working line was this:
    <mx:DataGridColumn headerText="Description" labelFunction="dataGrid_labelFunc"  dataField="messageDetail"/>
    The function looks like this:
    private function dataGrid_labelFunc(item:XML, col:DataGridColumn):String {
         var qN:QName = new QName(vm, col.dataField);
         return item[qN].text();

  • IPad 1 is recognized by iTunes running on Windows XP but will not sync (new problem, used to work fine).  The iPad and all its contents displayed but warning box says the iPad is not connected.  Tried soft reboot.  All software versions current.

    iPad 1 connects to iTunes and displays in the left column.  All elements on iPad displayed.  However, it will not sync.  Displays message that the iPad is not connected.  This is a new issue.  Used to work fine.  All iTines and iPad software up to date.  Ran HELP diagnotsic in iTunes with iPad connected - no issues noted.  Attempted soft reboot of iPad.  No help.

    Issue hopefully resolved.  Required Apple store to delete all info from iPad and reinstall operating system.  Had to reload all data, but it seems to be working fine.  Cause unknown. 

  • How do I use the App store with macbook pro and mac pro

    I currently use the app store with the mac book, but want to buy (share?) apps and music with the mac pro.
    I can't find anything that specifically outlines how this works.
    I use SplashID with the macbook and an iPhone, and want to use it (and sync it) on the mac pro as well.
    If you buy apps for a macbook, can you use them on a second machine, or do you need to buy it a second time?

    Your license from the MAS allows you to download and install the apps on as many Macs as you own or have under your control (institutional or employer supplied Macs.) The Mac should to be running Mac OS X 10.6.8 Snow Leopard or Mac OS X 10.7.2 Lion. Open the MAS app on the Mac Pro and sign into your account to have access to download all of your previous purchases in the Purchased pane.
    Simple apps can also be dragged & dropped over a network connection from the MacBook to the Mac Pro.

Maybe you are looking for