Whose the smartest can figure this brain teaser of AS 3.0 problem?

Spent all afternoon trying to figure out the following AS 3.0 problem in Flash CS4.  I can load an image using a custom class (called "BitmapExample") inside a unnamed package by placing the class name in Class field in the Properties panel inside of Flash, everything works fine.  The image and the .as file are in the same folder as Flash file.
The following is the code that reside in the "BitmapExample.as" file:
package {
       import flash.display.Loader;
       import flash.display.Sprite;
       import flash.net.URLRequest;
       public class BitmapExample extends Sprite {
                  private var url:String = "Image.gif";
                  public function BitmapExample() {
                        var loader:Loader = new Loader();
                        var request:URLRequest = new URLRequest(url);
                        loader.load(request);
                        addChild(loader);
BUT!!  If I try to access the class file by 1) removing the name from the Class field in the Properties panel 2) Using the main Actions panel (F9) in Flash instead (in frame 1) and use the command:
var testLoad:BitmapExample = new BitmapExample();
I can access the class (I placed trace statements to double-check), but I CANNOT get the image to load using this method.  Trust me, it's not a typing error (even if above is mistyped), I played around with it all afternoon.  I could even take the applicable code from the *.as class and place inside the Flash ActionScript panel and get it to work.   Anyone should be able to take the above code and rename a gif file to duplicate the problem.
So bottomline: Why is that I can run an AS 3.0 class (that loads a picture) using the classname in the Properties - Document field, but NOT be able to load the same picture(though I can access the class) by creating an instance of the class in the Flash Actionst panel (F9) (you have to remove the class name in Properties - Document field for this method).
Trust me on this one, you'll have to run the code to probably know what I'm talking about.

Turns out you were right!  Thanks so much......
So for those viewing this question, it is actually quite helpful, the point is:
When you enter a class name via the Properties panel - Class field in Flash CS4, it turns out Flash will not only access the class but will instantiate an instance of the object of that class AND add that object to the Stage as a display object.    On the other hand, if you use the Actions Panel (F9) you must manually 1) create an instance of that class 2) and add it to the Stage as a display object if you are going to use code and see any visible results on the Stage
var testbat:BitmapExample = new BitmapExample();
addChild(testbat);

Similar Messages

  • We can figure this standard access list

    We can figure this standard access list that's important remember that we use a standard access list  want to block all traffic or permit all traffic from a particular
    source or destination let's take a look at this machine right here   that  is IP address say
    640-554 we want to stop him from going into the Ethernet interface I'm the ad man he made me midsummer block callers traffic he can get out anymore maybe this is even the internet out
    here we know people like their Internet access so to get back at them I'm a block it what I can do is I can use deny statement in my access list access list
    one did not .
    http://640-554cisco.com/

    Hi Suresh,
    ad 1) according to the documentation ( http://docs.oracle.com/cd/E28280_01/doc.1111/e26692/securityacls.htm#BEIIHJAH )
    "At least one of the following must be true for a user to be granted a particular permission:
    The user's name appears in the xClbraUserList metadata field with the appropriate permission.
    The user belongs to a group that appears in the xClbraAliasList metadata field with the appropriate permission.
    The user is part of an Enterprise role that appears in the xClbraRoleList metadata field with the appropriate permission."
    meaning that OOTB a user will be granted both Read permission as per user-granted permissions and RWD as per group-granted permissions (resulting into RWD because at the same level a union operation is used).
    I'd say that conceptually, the group assignment should not be used in your use-case, because you don't want to assign permissions to group's users, do you? You could create new groups, or use assignment of permissions per user.
    ad 2) check this: http://docs.oracle.com/cd/E28280_01/doc.1111/e26692/securityacls.htm#BEIIDCGD
    Using ACLs, regardless User or Group Access Lists, always impacts the performance. And, it is difficult to maintain. From the information at the link you may understand how it is implemented - basically, the execution of the query will be affected by: a) how many items have to be evaluated b) the length of strings (xClbraUserList, xClbraAliasList) to be evaluated.

  • When I updated my Iphone my naviogon app was erased, and I can't figure which one I had purchased. Does anyone have any ideals how I can figure this out.

    When I updated my Iphone my naviogon app was erased, and I can't figure which one I had purchased. Does anyone have any ideals how I can figure this out.

    App Store > Updates > Purchased > Not On This iPhone.
    Should be in the list.
    tt2

  • Hello  I have a problem with Mac Pro, iPhoto does not want to stay open and close as I can figure this out?  thanks

    Hello  I have a problem with Mac Pro, iPhoto does not want to stay open and close as I can figure this out?  thanks

    Refer below link once
    App doesn’t open | Progress wheel spins continually

  • Invitation Error: Only the Organizer can change this event

    After doing a clean install of Snow Leopard on my MacBook Pro, I was getting the following error when trying to edit some iCal events:
    Invitation Error: Only the Organizer can change this event
    The iCal events that I couldn't edit had all been ones where I had sent invitations to someone else. When I double clicked them to attempt to edit them, I received a popup that would allow me to accept/decline the event, but not edit it. I noticed in the popup that it had the email address of the original invitee plus my own email address. I'm sure that my own email address wasn't there before.
    I took a look at "My Card" in address book and it only had my name and no email addresses.
    After the install I had synced iCal and Address Book with MobileMe. The sync said there was a conflict with my Address Book entry and I accepted the one from MobileMe, thinking I hadn't put anything in the one on my laptop yet anyway. I ended up with the original of my Address book entry, but not marked as "my card" and an entry with just my name marked as "my card".
    When I merged the two cards and made sure the resulting card was marked as my card, I could then edit the iCal events. I think it was the fact that "my card" now had my MobileMe / .Mac email address in it that allowed me to edit the iCal events.
    So if you're having this problem editing events, check your My Card in Address Book and make sure it has the appropriate email addresses in it.
    - David
    PS - There was an earlier post with this topic, but it didn't mention this solution. I would've replied to that post but it had been archived and replies were not allowed.

    I have found a way around this. If you drag the event to your desktop, it will create an .ics file. If you open this file in TextEdit, you can delete the line that begins with ORGANIZER:. Save the file and bring it back into iCal. iCal will now assume you are the organizer, allowing you to edit. You may also want to delete the other attendees in TextEdit, as iCal will also want to send updates if you make changes to the file (because it thinks you're the organizer making changes to your own calendar event).
    This isn't an ideal solution, but it lets you make the edits. Hopefully Apple will change this in a future Leopard update or in Snow Leopard.

  • HT3042 Please show us the video tutorial for this because i am having so much problem with my iphone5 bluetooth and can not send any file . So plz plz help me

    Please show us the video tutorial for this because i am having so much problem with my iphone5 bluetooth and can not send any file . So plz plz help me

    You have to use airdrop which is on iOS 7

  • If you can figure this out, I will pay $100,000,000!!!

    If anyone can figure out how to stream videos between itunes using the "shared library", I WILL PAY YOU 100,000,000!!!!! Any videos, even video podcasts. Stream between two itunes from mac to windows

    aapl.up wrote:
    If anyone can figure out how to stream videos between itunes using the "shared library", I WILL PAY YOU 100,000,000!!!!! Any videos, even video podcasts. Stream between two itunes from mac to windows
    The answer is both easy and frustrating.
    First the easy part.
    1. Add the videos to iTunes on the Mac (you did say from Mac to PC)
    2. If the video is a Music video, set the flag appropriately
    3. Tell iTunes on the Mac to share its iTunes library over the network
    4. Make sure either you share the entire library, or a playlist that includes the video(s)
    5. Set the PC to look for shared libraries on the network
    The above is probably obvious and you have probably done this. The next bit is to address the cause of the problem.
    First, I have various music videos acquired from different sources. Some from the iTunes Store before they started charging for them, some from other sites on the Internet. All are in QuickTime compatible format and hence all play locally in iTunes. However most of them do not work when I try and access them via iTunes Sharing.
    Now I had a strong idea what the cause was but here are possible causes that could be considered
    1. Its the wrong format (even if it can be played locally), i.e. not MPEG4 or H.264
    2. Its the wrong pixel size or bit rate
    3. It did not have the "Music Video" flag set
    4. Its too long in duration or file size
    5. It has not been prepared for streaming
    To put you out of your misery it appears to be number 5. Now I had already suspected this because I had previously seen reports that FrontRow (on a Mac) had problems playing videos from another Mac if the video had not been prepared for streaming.
    I have found two reasonably easy ways to convert videos so they are prepared for streaming.
    1. If you have QuickTime Pro (for Mac or Windows) you can export the video using the QuickTime Player and in options in the export dialog box, set it to enable the streaming option.
    2. If you select the video in iTunes itself, you can tell iTunes to convert it to iPod or AppleTV format, this will at the same time also set the streaming option
    I tested both methods using a video that previously would not work between Mac and Windows iTunes sharing and both these solutions worked. This was tested using iTunes 7.4.2 on Mac OS X 10.4.10 and iTunes 7.4.2 on Windows XP Pro.
    I look forward to receiving your cheque for $100,000,000

  • $5 to anyone that can figure this out

    Under Podcasts in Front Row - it shows ones that I deleted YEARS ago from an older Mac that I migrated to this one. I have searched through Spotlight and everywhere else to find the file with no luck. THe only thing I can figure is it is pulling from an old playlist but can't find that either. Please help!!

    Front Row, of course, is totally dependent on your iTunes library. Take a look at the following support article. You may want to try rebuilding your iTunes library and see if that fixes your issue.
    http://support.apple.com/kb/HT1451

  • Stacks - I don't know if anyone can figure this one out?

    Okay I just got a new MacBook Pro and it had the stack folders on the bottom of the dock (pre-installed) Download and Documents. Here's the problem, I hit and moved the Documents stack out of the area of the dock and it removed the stack. I know this seems simple but check this out. I tried to look up the files that were in the Document Stack and it wasn't on my computer at all. I used Spotlight and it didn't help at all. Here's something else, my VMware Fusion program had an error after I moved the Stack Folder. I had Windows Vista on the Virtual Machine before this happened with the Stack Folder. Now there's no Vista on record or ON MY COMPUTER! I had to re-install all programs..
    I didn't have time machine setup because I didn't think I needed it so soon.
    Can anyone help me find out where my files are in the Stack Folder that was removed from the dock....?
    Thanks!

    *Hi ruhig, Welcome* to Apple's Users Help Users Forums.
    It takes a while to figure out how the Apple Forums are organized.
    You have asked a technical question in an inappropriate place. You are forgiven as a newcomer.
    At the top of this page, or the topics list page one layer back, click on the "discussions" page. It will give you a list of Categories, including "Leopard." Click on it and you will see a set of files for various forums. Click on the most appropriate one and a Forum page similar to the one that got you here will open. As here, at the top left will be a button to "post new topic" or similar.
    In this forum you will find lots of threads re frustration with forum organization so don't feel bad it you didn't get it right the 1st time. Explore a bit and it will come to you.
    There is a wealth of knowledge in the forums. Come often, browse, read threads and learn. 99% of the threads I read I don't post on. On those for maybe 5~10 % I learn something. Now if half vast, see below, could just remember it.
    Enjoy, JP
    Good Luck, JP

  • What is the program can run this flash

    hi all, I download some flash from this funny site
    http://www.funny-pictures.com/
    but i can't run it in my computer , means my computer not my
    browser , i run it only into flash programs as flash editor or
    macromedia flash 6 (open it and click file menu and choce open and
    search it), I want to open it directly , just click it to open
    without any program

    If you know the job name, than you can find out the associated program name.
    Go to SM37.
    Select your job from the list
    Select "Step" ... here it will show you the program name
    Put cursor on the program name and Go to > Variant to know what was the input to run this job.
    Regards,
    Naimesh Patel

  • If you can figure this one out your a Saint

    O.K. I installed the os 10.4 and am currently upgraded to 10.4.4. I started working on a video project in final cut. imported into idvd, burned it. Idvd quits unexpectedly. My dual g4 1mhz 1 gig ram Quick silver mac wont read dvd just burned but my 17" powerbook and any other dvd player I put it in plays fine. ..............Burns it but wont play it....just doesn't make any sense to me. My computer is 3 years old

    when you burn it, do you click burn in iDVD, or do you save it as a disk image, and then burn that?
    if you save it as a disk image, see if the powermac can read the disk image.
    if you do burn it in iDVD, save it as a disk image, mount the disk image, and drag the video_TS folder onto DVD player, or go into dvd player and say "File > open VIDEO_TS folder" navigate to the VIDEO_TS folder and say open, you can test your DVD that way.
    to burn the disk image, go into Disk Utility (Apps > Utilities > Disk Utility) press burn, navigate to the disk image, click Burn, set your settings (speed, ect) and it will burn and than varify the data, you can cancel it at this stage if you wish.

  • I Paid For 3 Years Of Apple Care And Nobody Can Figure This Out...

    http://vimeo.com/10417687
    This is what my monitor started doing within a few weeks of owning it. I'm going on 2.5 years now. Just had a tech come to my house for about 4 hours trying to figure it out. Apple wants nothing to do with it. I've called them many times and have always been told to call them back and never get beyond that. Apple looked at this video I posted and maybe got scared? lol. I have no idea. I think they should just get rid of the problem already as I work at home and have lost allot of $ because of this issue.
    Why can't anything be done?

    Hey, Apple.
    Please do the right thing here and help out. 2.5years of this! With Apple "Care". Why do you keep talking with me on the phone telling me you'll look into it and then never getting back to me? Every time I call you guys tell me the exact same thing and nothing gets done.
    I have the calls recorded on Skype. Do I have to make them public on youtube along with this situation in order to get anywhere?
    Please give me the service I paid for.

  • See if you can figure this one out...

    First off, I use FireFox, not Safari (Safari is great, but FF works better for me)...
    So here's the deal: I use MySpace as means of making some important contacts. I have a Power Mac G5 connected to a Linksys router (Model# RT41-BU) which is behind a Motorola SB-5100 cable modem. I also have three Windows XP machines on the same network.
    I have no problem with any other website except MySpace. As soon as I log in, I can usually get to 2-3 pages fine. As soon as I click to access probably the 4th page, I start timing out. My computer will stall for up to 1-2 minutes. Eventually the page will either load (usually just partially at this point) or I will get a time-out error (btw, by "stalling" I mean I just sit there and wait, and wait, and wait for a page to load...NOT that the actual computer has frozen and is not responding).
    If, after getting the time-out error, I then click “Try Again” the page will usually then IMMEDIATELY load w/ no problem (occasionally I will get the timeout page again after a few minutes).
    If I choose to QUIT Firefox during the stalling, but BEFORE I get the time out error, and immediately open it back up, I start stalling again (at this point it’s merely trying to load my homepage, which, of course is apple.com/startpage).
    If I try to go to the EXACT same pages on my Windows XP machine using Firefox I have absolutely NO problem loading any pages whatsoever…UNLESS:
    If I, again QUIT Firefox on my Mac BEFORE getting the timeout error…walk 5 feet over to my Windows machine and try to load my home page (Yahoo.com), it will stall. I usually have to then wait about 1-2 minutes, and it will start back up again, and I then have no problems.
    Here’s where it gets REALLY interesting:
    If I DISCONNECT my Linksys router, and plug my Mac DIRECTLY into the back of my cable modem (in other words, disassemble the network, and have the modem shooting stright to the mac), I DON’T have this problem. I can log into MySpace hit any page, just as I can with my Windows machine.
    Because the problem DOES NOT occur to my Windows machine while it’s ON the network, and DOES NOT occur with my Mac when it’s OFF the network, all signs point to some sort of issue with certain Macs running on certain Linksys routers. There must be some sort of conflict between the two, but I IMAGINE that there HAS to be either some sort of tweak or some sort of patch that will fix this issue.
    I have had this issue from day one of owning this computer (about 4 months). It has never worked on the router properly.
    I have tried reformatting the machine and reinstalling everything. No change.
    I have tried lowering the MTU on both my router configuration and mac network config anywhere from 1400 to 750, with no noticable change.
    I have tried several different browsers (Firefox, Safari, IE for Mac & even Opera) but still have the same results.
    I’ve gone into the “about:config” page of Firfox and turned on network.http.proxy.pipelining and set the max requests to 16, with no new results.
    I have tried disabling javascripting…nothing.
    I have also tried contacting Linksys, and the only thing they can suggest is lowring my MTU again (It’s obvious by talking to them that English is also not their first language)
    Here’s something weird as well:
    WHILE the page is stalling to load, I can open the Network Utility and run a continuous ping to the page I’m trying to hit and get a consistent response on EACH ping, even though the page won’t load.
    My cable modem and router BOTH operate on DHCP (IP address and DNS servers are assigned automatically – NOTHING that I know of is entered in statically).
    The only thing I haven’t tried is upgrading the firmware on my router. I’d really like to use this as a LAST resort – HP ruined a DVD writer I had once with a firmware upgrade that went wrong.
    I’d really like to get this fixed. I have friends in a band that are out on the road right now, and with the exception of wasting valuable minutes on my cell phone, this is the only way I have of keeping contact with them. It’s really irritating that I have to use my Windows machine…despite the fact that it’s only a few feet away, I SHOULDN”T HAVE to.
    Anyone want to try and tackle this one?
    Much appreciated,
    --Jbj

    Hi bmb,
    So here's the deal: I use MySpace as means of making some important contacts. I have a Power Mac G5 connected to a Linksys router (Model# RT41-BU) which is behind a Motorola SB-5100 cable modem. I also have three Windows XP machines on the same network.
    Does this happen only when you try to access MySpace website? Any other website works fine?
    If I DISCONNECT my Linksys router, and plug my Mac DIRECTLY into the back of my cable modem (in other words, disassemble the network, and have the modem shooting stright to the mac), I DON’T have this problem. I can log into MySpace hit any page, just as I can with my Windows machine.
    Smells like DHCP spaghetification...
    I have tried reformatting the machine and reinstalling everything. No change.
    No good, unless you tried anything funny when installing MacOS X, networking issues have are not magically fixed by re-installing the OS. This is a habit coming from the Windows world...
    My cable modem and router BOTH operate on DHCP (IP address and DNS servers are assigned automatically – NOTHING that I know of is entered in statically)
    What about your Mac (and the rest of your PCs)? How do they get their TCP/IP settings (manually or via DHCP)?
    Your issue(s) smell DHCP big time, go to System Preferences-->Network-->Ethernet/AirPort (whatever you use to connect) and click on the TCP/IP tab. Set Configure IPv4 to Manually and post back.
    How are your computers connected to the Linksys box (wired/wirelessly)?
    Macs running 9.x, Macs running 10.4.x and SGI workstations running Irix 6.5.x

  • ?!?! See who can figure this one out first...

    ok, so this has been happening on and off for the past 3 months, just curious if anyone else has had this happen as well.
    so im working in Logic (this happened in 7 and now 8 as well) and i get done with my session and im going to close logic for a bit. so i quit the program. the logic screens go away and its still thinking for a sec before it completely quits out. as soon as it completely quits, they grey screen of death starts making its way down my monitor. it ONLY happens when quitting logic, and not all the time, just whenever it feels like it i guess.
    any thoughts?
    just for the record, ive RTFM and it says nothing about this
    thanks
    c

    I used to get this with Digital Performer a few years ago every time I quit on my G5. I ended up reinstalling the OS and all programs from scratch and the problem NEVER came back. My assumption was that somehow a combination of drivers/libraries must have become corrupt. I did try repairing permissions and nothing seemed to fix it.
    I know it's a lot of work, but maybe you could test by using an external drive to boot off of that has a clean install with logic and trying running it for awhile with the same projects and see if it ever happens again.

  • Blue Screen After Load, No Safe Boot, No Reinstall possible. Think you can figure this one out??

    MacBook Pro "Core i7" 2.2 15" Early 2011
    2.2 GHz Core i7 (I7-2720QM)
    Intro.
    February 24, 2011
    Disc.
    October 24, 2011
    Order
    MC723LL/A
    Model
    A1286 (EMC 2353-1*)
    Family
    Early 2011 15"
    ID
    MacBookPro8,2
    RAM
    4 GB
    VRAM
    1 GB*
    Storage
    750 GB (5400 RPM)
    Optical
    8X DL "SuperDrive"
    Ok so i got this laptop in a few days ago here are the problems and the things i have tried. This laptop when it came to me did not have a hard drive, so obviously no OS. Upon installing a hard drive then trying to load Yosemite from a USB stick, I turn mac on, sleep light will blink 5 times then boot, Will come to normal gray screen then apple logo, will then load the OS install, but go straight to a blue screen with vertical lines. Tried different hard drive, tried different RAM sizes and speeds, tried different OS, tried CD instead. Have done numerous PRAM and SMC resets. trying Safe mode gets me a panic cpu 4 caller error then restarts. I have tried using a hard drive that had an OS already installed and will go straight to blue screen after loading. I have tried fsck -fy in single user mode. I do get that disk2s3 is write protected in single user mode, but im pretty sure that its the OS disk. I do not see a second hard drive in single user mode but i believe that because its not partitioned yet. Any ideas community?

    Tried doing OS X lion by CD now, and will only get half way through load bar before the apple logo and loading bar disappears and then it will sit at a gray screen.

Maybe you are looking for

  • Speakers no longer working on Mac- weird symbol won't let me change volume

    Hello First off, I am not super computer savy! My mac's internal speakers are no longer working. The volume control has faded in color, and when I try to press the volume buttons on the keyboard, it won't let me change the volume and there is a weird

  • Some of your QuickTime software is out of date. You can fix this problem...

    I keep getting this error every time I start itunes or anything that uses QuickTime: Some of your QuickTime software is out of date. You can fix this problem by updating to the latest version. 'Cancel' 'Do It Now' If I click 'Cancel', the program see

  • Apple TV to display iMac?

    Can I use appleTV to display the screen contents of my iMac on my TV screen?

  • Saturation Differences in LR

    I just discovered yesterday that the adjustment brush in 100% saturation mode affects an image differently than using the saturation control alone: Case 1: All adjustments default, Adjustment brush, custom mode, saturation 100, everything else 0 Case

  • Observing poor performance on the execution of the quereis

    I am executing a relatively simple query which is rougly taking about 48-50 seconds to execute. Can someone suggest an alternate way to query the semantic model where we can achieve response time of a second or under. Here is the query PREFIX bp:<htt