Another snow question

I'd like to stop each flake using hittest (I think) so that
when the flakes hit another mc, it appears to land and collect into
a pile. Will this code work for that effect? As you can see, I've
tried a couple different things but neither work.
Here's what I've found:

Amy,
> I'd like to stop each flake using hittest (I think) so
that when
> the flakes hit another mc, it appears to land and
collect into
> a pile.
I think MovieClip.hitTest() is a good way to go, here, so
you're in the
right track.
> /////////////////////
> this.onEnterFrame = function(){
> if (tag_mc.hitTest(this["snowflake_mc"+i])) {
> trace("hit");
> }
> };
> ////////
In this bit of code, you're assigning a function to the
MovieClip.onEnterFrame event of ... whatever "this" points to
(possibly the
_root, in this context). Since you're already assigning a
function to the
onEnterFrame event of each snowflake itself, why not try
something like
this?
> snow_mc.onEnterFrame = function() {
> var angle = Math.atan2(_root._xmouse-(width/2),
> _root._ymouse)+1.5707963267949;
// sin/cosin functions, etc., etc.
> if (this._y>height+10) {
> this._y = -10;
> } else if (this._y<0-10) {
> this._y = height+10;
> }
if (this.hitTest(mcObjectToCollideWith) {
delete this.onEnterFrame;
> };
> }
>
\David Stiller
Adobe Community Expert
Dev blog,
http://www.quip.net/blog/
"Luck is the residue of good design."

Similar Messages

  • Another newb question: multiple virtual servers

    Hi, I have yet another ignorant question. I have several unrelated web projects that I am working on, and I would like to be able to set up a virtual server for each one for testing purposes, such as: http://project1, http://project2, http://project3. Can someone tell me if this is doable, and if there are any tutorials/resources on this for someone who has 0 experience running a web serer? Sorry for being so ignorant!

    Yes, it is doable.
    You can setup virtual server either by IP or by name.
    If you have one IP, and want to set them up by name (ex. http://project1, http://project2, http://project3) you can do so easily with this type of configuration:
    <virtual-server>
        <name>mydomain</name>
        <http-listener-name>http-listener-1</http-listener-name>
        <host>*.mydomain.com</host>
        <document-root>/www/domain</document-root>
      </virtual-server>
      <virtual-server>
        <name>myotherdomain</name>
        <http-listener-name>http-listener-1</http-listener-name>
        <host>*.myotherdomain.com</host>
        <document-root>/www/myotherdomain</document-root>
      </virtual-server>
    ....The important part here is that
    a) all virtual servers share the same HTTP listener
    b) which virtual server serves the request depends on the $HOST request header send by the client. Sun Web Server does the matching for you. It will match $HOST vs. the virtual server's host attribute. Depending on which site you connect to the right virtual server will be used.
    c) if the $HOST request header does not match any of the virtual servers, then the default virtual server defined in the HTTP listener will be used.
    To create a virtual server, use the Admin GUI, access the configuration, and then add new virtual server. Or use the following CLI command.
    wadm> create-virtual-server --config=myconfig --http-listener-name=http-listener-1 --document-root=/www/docs/myserver.com --host-pattern=myserver.com --log-file=../logs/myserver.com-error_logs myserverHost pattern will be used for matching. Some of this elements might be optional.
    Hope that helps. And keep the questions coming :D
    Edit: Also check the documentation
    Using Virtual Servers in SJS Web Server 7.0

  • Another simple questions

    Hello friends:
    Another simple question: I need to learn things about Oracle on my desktop.
    My machine runs Windows 98. Oracle has some desktop product of its Database Line?
    For example: Oracle Personal?
    And Oracle Lite? What's the main difference between Oracle Personal and
    Oracle Lite?
    Thank You
    Gracias
    Ing. Pablo Romero
    CORDOBA ARGENTINA

    1. I didn't know the answer to your first question, but I googled it and it says the item is the in-call audio boost.
    http://forums.crackberry.com/f71/flag-icon-47659/
    2. isn't this setting determined by the carrier? So it's not a setting in the phone, but when you call in to your voicemail you can change your options?

  • Another Snow Leopard question.

    I currently run 10.5.6 on my iMac, having been deterred from upgrading by some of the comments about 10.5.7 and further deterred by the reaction to 10.5.8. I will buy Snow Leopard but I'm wondering if it will require me to install 10.5.7 and 8 beforehand or if anyone knows if Snow Leopard is likely to incorporate these upgrades as a matter of course. If it does, I'll wait a while to see the market reaction though I have learnt from experience that posts in these columns should not be viewed as negatively as they are sometimes presented.

    seventy one:
    (Good age, that is )
    I got to 10.5.6 by a blind leap of faith
    To a certain extent much of what we do involve an element of blind leaps of faith, even in the realm of computer technology. All computer systems are not identical, even with the same make and model, and the same version of software. However, there are certain practices which can help smooth the leap, or assure a softer landing. My recommendation is that you go ahead install 10.5.8. I suggest that you download the Mac OS X 10.5.8 Combo Update. Make sure you have a recent and reliable backup/clone. Then, to be sure you are not installing to a problem volume, boot from the install disk and Repair Disk. Once that is done, Repair Disk Permissions, install the update and Repair Disk Permissions, again.
    That will give you a little breathing time before Snow Leopard. In addition, with the release of a new version of OS X it takes a little while for some of the initial wrinkles to be ironed out. With an updated version of Leopard you can wait that out comfortably.
    Good luck.
    cornelius
    PS: Thank you for leaving feedback in Apple Discussions by marking the "helpful" and "solved" posts.

  • Yes, another Airport question

    I am having a common problem (as I have seen from numerous google searches) with my airport card in my Macbook. I am running 10.4.11 on the white macbooks that came out about 3 years ago...My Macbook has been awesome for almost the entire period of time, however, I keep losing my connection with my apple airport wireless router. I tested the connection with another computer and the signal is strong all over the house....I, however, have to be about 5 or 6 feet away from the router in order to receive a strong signal, and even then it fluctuates between 3 and 2 bars.
    From searching literally hundreds of posts, I cannot quite find an answer/solution to my problem...I have deduced that I either have a wireless network in the area that is interfering with my network or I just need a new wireless card in my macbook.
    I looked up wireless cards on ebay and it seems like I can get one pretty cheap, but I would be very apprehensive to open up the computer and install it, for I would probably screw it up somehow. If I were to buy the card on ebay and schedule an appt. with a genius, do you think they would install it for me...I don't mind paying. My appleCare warrantee has expired long ago...so, I am not sure if they would even consider helping me.
    Also, I have seen that I could update my OS from Tiger to Snow Leopard, but I don't want to do that if it is not necessary. I have made sure that I have the latest firmware updates and everything and it seems all up to date.
    If anyone has any suggestions, please let me know.
    Thanks, in advance, for even reading this rambling diatribe...
    Message was edited by: neworder72

    Welcome to the discussions!
    If you take your laptop to the coffee place or other location and can connect with no problems, your wireless card is fine. If you continue to have connection problems, it may be that wireless card is in need of replacement.
    Have you downloaded a utility like iStumbler, www.istumbler.net to get a look at the signal strength and noise on your network? The bars at the top of the screen are not a very good indicator of the actual signal on your network and tell you nothing about the quality of the signal.
    Look for other networks in your vicinity and note in particular what channel your wireless is operating on. There may be other networks on the same channel or adjacent channels that are interfering with your network. Cordless phones and security systems at the neighbors can also cause problems with any wireless network. Most modern routers allow their users to create "hidden" networks that can't be seen but cause problems nonetheless. Not much you do about that.
    AirPort Utility will allow you to change the channel on your wireless network if you suspect this may help matters. You may need to experiment with a number of different settings to find the best compromise, particularly if you are in an area with a number of networks.

  • Another BW question about filter in the query definition

    Hi ,
    I have another question about filter in the query definition.
    <u>Question:</u>
    Which of the following objects can be filtered in the query definition?
    A. characteristic
    B. Key figure
    C. Structure
    D. Units
    E. Hierarchy
    My answer is A,B,D,E.
    The answer in the book is A,B,D
    Can anybody tell me which one is wrong?
    Thanks in advance,
    Liu Jia

    HI
    1.The answer could be A,B,D.you can not apply filters on hierarchies
    2.Whenever there is a change in Attribute data(like Location,Num etc...)that has to be reflected in all aggregates of the cube.Thsi can be done by running "ATTRIBUTE CHANGE RUN".
    sri

  • Yet another standby question...

    Hi gurus,
    Please help to resolve the quiz. I have completed manual physical standby installation. It is up and running. I then decided to install Grid Control and to use Data Guard for the standby creation. I've successfully installed GC, deployed all agents, I can see my previous standbys, life is good in short. Now, when I am trying to create the second standby for my production database using the Data Guard I stuck on a logical question:
    On the step 3 of Data Guard standby creation, there is a note, saying:
    The instance name (also referred to as the SID) must be unique on the standby host.
    Yeah, fair enough. But i can't understand what should I do next? I have:
    db_name YELLOW - primary prod
    db_name YELLOW - standby prod 1st
    and i need db_name YELLOW - standby 2nd
    But I can't create it on the same server where the first standby resides.. What options do I have? Do I need to create the second standby on another server? Do I need to kill 1st standby? Is there any way to avoid this conflict? I am confused. I have no equipment for TWO standby servers... I thought I can install there up to 9 standbys.. But it seems to be a problem.. And definitely, I cannot give my second standby other name than YELLOW as all my applications are strongly tied on db_name...
    Friends, please clarify this if you can. I am kinda lost in here..
    Thanks as usual,
    Maria

    well, that's a good question! :)
    because I don't have spare server for the standby. the question is not about: 'should I or should not put more than one standbys in one server' , but more about: 'is there any way to put two standbys with the identical db_names in one server'. I know that I probably sound unprofessional, but I just wanna know.. If the answer is 'no way', I will kill the first standby then and recreate the second one using DG with the correct name.
    Thanks for writing to me,
    M.

  • Re: another build question! (sorry lol)

    Hi all
    right, after days and days of researching all the excellent articles on here ive had to write a post! So apologies for going over old ground
    Im going to build a new CS5.5 rig (having had a guts full of Apple and their FCPX fiasco its back to pc!)
    so although i appreciate the 990x o'c is prob best option, bang for  buck is leading me down the sandybridge i7 2600k o'c option on p67 mobo with 16gb of ram (option to take to 32 down the line when the chips are out)
    anyway, im sorted on chip mobo (msi big bang marshal p67), nivida 570 etc , its the drives im struggling on!! Im edit avchd video and some after effects, small amount of 3d, and in FCP i always transcoded everything to prores. Now on cs5.5 it looks like real time performance is possible with high end hardwear.
    So mobo, ram, and chip aside, my HDD config im unsure on, ive not really got the cash to go crazy with raid controllors etc, but understand need for seperate drives, etc and tbh might even go downt he cineform route as a prores alternative (prob avoiding hassles of drive speed with avchd)
    im thinking as the SSD's are now dropping in price and the ocz are producing these 500 mb r/w speed sata 6 120gb drives for a reasonable price, would 3 of these drives (one for os, one for media , one for scracth disk ) be a good set up or is it a waste of cash and should i raid 0 from bios/mobo?
    I appreicate that 120 gb drives for media etc are small, but i would take project media from another much large backup drive and just use the 3x ssd set up as working disks for editing & os? once project over, clear out drives to larger back up and start new project!
    Its either that or i go SSD as bootdrive, but some sort of cheap raid set up for my scratch disk, media drives? prob is if i do that, from what ive read (brain dead now) i would be best off with 2 x raid 0 as scratch disk and orginal media respectively when workign with avchd
    HOWEVER, on my mobo there are only 4 sata 6 ports, so if i use one for ssd boot drive, and then im left with 3 x sata 6 ports and another 4 x sata 3 ports to raid on? how does this work? any point in getting the sata 6 drives as one would be stripped with a sata 6 drive plugged into a sata 3 port (this was my reasoning behind using 3 small sata 6 ssd's plugged to the sata 6 ports  and rest of sata 3 ports as storage and backups!
    confused lol!! I just want the overclocked sandybridge system with decent gpu card, as much ram as possible at present, but im thinking my bottleneck will be in the HDD config! any suggestions are much appreicated! im not that techy so whilst have read all the articles am more confused now (plus normally a mac user, so its out of the box configuration usually!) for what its worth looking to purchase something from scan uk in terms of parts! total build cost including a reasonable screen £2,000
    many thanks

    You have a limited budget, especially in the UK, but then don't we all?
    Going for the 980X will triple the cost of the CPU, but even when editing AVCHD material the gains are not sizable enough IMO to justify that cost differential. Add to that you will need 24 GB instead of 16 GB and that carries an additional price tag. Both factors will easily move you out of budget range if you want to have a number of disks and possibly a raid controller.
    Did you read my article To Raid or not to Raid, that is the question. It can be found under the Overview tab at the top of the page? (Currently responding from abroad on my notebook and not having the bookmarks available for easy linking). http://forums.adobe.com/thread/525263
    With media and projects I would advise against a raid0, because of the lack of redundancy. For pagefile, media cache and previews (scratch disks) raid0 is quite OK. They will be recreated if needed. The performance gain from a raid0 for media and projects over a parity raid is easily offset by the time spent on making backups. For parity raids do not use WD Caviar Blacks, but look at the Hitachi 7K3000 line of disks.
    The question of Sandy Bridge versus the old X58 platform is essentially one of 'which limitations are acceptable to me'.
    The Sandy Bridge is a great processor and at least the equal to the old i7-9xx quad cores. However, the platform, the chipset, has its shortcomings in terms of PCIe lanes. Whether that is relevant to you, only you can decide. But hey, we would be in serious trouble if Intel did not manage some progress in two years time from the i7-920 to the i7-2600K. So of course the i7-2600K shows much more potential than the almost retired 920, it is the chipset for the Sandy Bridge that is 'flawed' in comparison to the X58, but that is no surprise, since the Sandy Bridge is a 'middle-of-the-road' platform and the X58 was a 'high performance' platform.
    BFTB-wise I think that within your budget limits, you should look at the i7-2600K, but with the best disk setup you can afford.

  • Another Noobie question - readLine()

    Hi all
    This is another one of the extreme noob questions. I wrote a small program to read form a text file
        String NetworkLine = new String();
        try{
            FileReader inputFile = new FileReader("Test.txt");  //
            BufferedReader in = new BufferedReader(inputFile);
           try{
               while (in.readLine() != null){
                NetworkLine = in.readLine();
                System.out.println(NetworkLine);
           }catch (IOException e){
                System.err.println("Error in reading the file");
        }catch (FileNotFoundException e){
            e.printStackTrace();
        }My Test.txt is
    One
    Two
    Three
    Four
    Five
    Six
    without the *
    The output I get is
    Two
    Four
    Six
    I cannot figure out why only even no. lines are being read. I inserted a breakpoint at the line
              System.out.println(NetworkLine);This shows me that only even no. lines are being read by readLine(). Any help will be appreaciated.
    Thanks
    Ayesha

        String NetworkLine = new String();
        try{
            FileReader inputFile = new FileReader("Test.txt");  //
            BufferedReader in = new BufferedReader(inputFile);
           try{
               while (in.readLine() != null){  // <-- This reads a line, checks it for null ,and drops it
                NetworkLine = in.readLine(); // <-- this reads the next line
                System.out.println(NetworkLine);
           }catch (IOException e){
                System.err.println("Error in reading the file");
        }catch (FileNotFoundException e){
            e.printStackTrace();
        }So the upshot is that you print every other line.
    Corrected:
        String networkLine = new String();
        try{
            FileReader inputFile = new FileReader("Test.txt");  //
            BufferedReader in = new BufferedReader(inputFile);
           try{
               while ((networkLine = in.readLine()) != null){
                System.out.println(networkLine);
           }catch (IOException e){
                System.err.println("Error in reading the file");
        }catch (FileNotFoundException e){
            e.printStackTrace();
        }

  • Is it possible..another RAM question

    I was at OWC site and wanted to upgrade my RAM for my iMac 24" (2007 model). I initially thought that my iMac (2007 iMac 7,1) maximum RAM was 4GB. However, to my surprise, OWC listed as 6GB as max. Curious, I went to my local Fry's electronic and picked with a 4GB stick and wow...it worked!! My iMac is now showing 6GB! I do see a faster response. I'm running Snow Leopard 10.6.4. So here are my questions: First, is it really true that my Mac is actually seeing 6GB and using all 6GB or is it just showing 6GB but using only 4GB? Also, if one slot can recognized the 4GB, what about upgrading the other slot to 4GB and getting a total of 8GB? Will this work?
    Every where I read, even at crucial and apple tech support site indicated that my Mac can only use max of 4GB...but apparently I'm only 6GB now and hope to push the envelope to 8GB. Will this be possible or is my Mac showing 6GB but I'm actually using 4GB and the effect I'm seeing is only a placebo effect? Thanks for all the help guys!

    Welcome to the Apple Discussions!
    Apple says 4 GB, but it has long been established that both of the Mid 2007 models can use 6GB. It cannot use 8 GB, so do not waste your money.
    Dah•veed

  • Another beginner question about targeting functions

    I've read what I thought was an excellent thread about scope in EA, but I'm still not getting some of the basics (btw the thread was http://forums.adobe.com/message/5287753#5287753).
    I have "slides" in the symbol library and in the main composition compositionReady script I've set up a generic script for playing back sound. That script works fine when I bind it within the compositionReady script to a symbol and click, so I know the funciton itself is fine. My question, I'm programmatically loading the slides from the library as I go along and want to use the generic function I created in the compositionReady script, but I can't seem to create the proper syntax to call the script. Here's some that I have tried. What is the correct syntax? The script is on frame inside the slide symbol.
    //sym.getComposition().getStage().playSound();
    //sym.getComposition().playSound();
    //Edge.getComposition("CER_1").playSound();

    Thanks for having a look. Yea, it's getting to the script fine but it doesn't like the syntax. Console always indicates javascript error, which is what happens when Edge throws an exception because it doesn't know what to do. The article that Elaine posted on above gives me the sense that it might be best to change the function to a variable, then it would be in scope to call but I have parameters I'd like to pass with it and I don't think  I can pass a parameter with to a variabalized (word?) function. I know it's just me moving from ActionScript to Edge JavaScript and scope. Whereas I could always find a homebase in ActionScript with the stage, it seems that the stage in Edge is just another symbol and calling a function within the stage is never getting there. Elaine hints at putting outside the stage closure and it would be accessible, which, of course, has led me to start readying JavaScript books and learning more about scope etc. It seems like that is life as a developer. I  dont' get that, oh, better take a day or two to  understand that concept, oh, that function works now, next problem. ;-)

  • Another keyboard questions

    I know this question may have been ask a lot. But, I can't seem to get my garageband to recognize my yamaha YPG-225 keyboard. Any ideas?
    thanks

    I think the experts here will be asking you for more information, such as what interface you are using, etc.
    I had a similar problem with getting my Roland FP3 to speak to my iMAC using Cakewalk MIDI-interface. It turns out that the driver software that came with Cakewalk does not support Snow Leopard so had to go to Roland's website to download the appropriate software. Worked perfectly after that.

  • Another excel question

    hi,
    I read an excel file like this:
      CREATE OBJECT gv_excel 'Excel.Application'.
      SET PROPERTY OF gv_excel 'VISIBLE' = 0.
      CALL METHOD OF gv_excel 'Workbooks' = gv_books.
      CALL METHOD OF gv_books 'Open'
        EXPORTING
          #1 = p_file
          #2 = 1.
      FREE OBJECT gv_cell.
      FREE OBJECT gv_excel.
      FREE OBJECT gv_books.
      FREE OBJECT gv_sheet.
      CALL METHOD OF gv_excel 'QUIT'.
    the question is, why the excel process is not kill in the task manager?
    joseph

    Hi ,
    i think Rich is right.
    another problem could be if you've used an object to
    save your data:
    like :
    CALL METHOD  OF H_EXCEL 'Save' = h_save.     
    so you've to free this too:
    FREE OBJECT H_save.    
    regards Andreas

  • Windows 7 Another Preorder Question :)

    Ok bestbuy.com has taken out the 108$ deposit and now the order is confirmed so does
    bestbuy.com hold the Funds and use them when it ships or can i use the 108$ for something
    else now since the order is done and i Can just put another 108$ in there for them to take it 
    out on 10/22/09 the release date or when it ships
    i need to know if i can do this thanks 

    Well you can purchase either an upgrade or a full copy. Difference is, one has to be upgraded from a previous operating system (XP or Vista) and the other can do a clean install without the need to have a previous operating system. The Windows 7 Upgrade program provides you with an upgrade copy of Windows 7.
    Adam
    Best Buy Community - Retail, Americas
    Forum Guidelines | Terms & Conditions | Community Guidelines | Blogging Guidelines
    *Remember to mark your questions solved and click the star under the user's name to show your thanks!

  • ANOTHER formats question...

    I've been using Streamclip to convert mpeg2's to Quicktime. I've experimented with Apple MPEG4 and Sorenson 3. Not the jpeg format so much.
    My question: which is the best format for keeping the file size about the same and losing the least video quality? These files are for multiple purposes. Some will be used on the internet and others will find their way onto dvds.
    Is the option from streamclip to DV good for Final Cut and Quicktime?
    I realize the short answer to my question is that it totally depends on what I want the file for. But what I'm really looking for is a primer on the diff between Sorenson, MP4, JPEG-A(B)....etc.
    I'm moving toward using h.264 for everything, but not everyone has qt7 - you know?

    My question: which is the best format for keeping the file size about the same and losing the least video quality? These files are for multiple purposes. Some will be used on the internet and others will find their way onto dvds.
    Everybody has their own picks. However, you might also want to consider the fact that not everybody has upgraded to latest QuickTime Player.
    My general pick would be Sorenson Video 3 for general purposes. Sorenson Video 3 performed better (in terms of quality) then MPEG 4 when you limit the bitrate to some small number (i.e. small filesize). As for DVDs, you might want to export in another format for it.
    Is the option from streamclip to DV good for Final Cut and Quicktime?
    It is, assume the original file is good quality.
    But what I'm really looking for is a primer on the diff between Sorenson, MP4, JPEG-A(B)....etc.
    I made this page awhile back, you might find it useful.
    http://mac.sillydog.org/qt/compare.php
    Hope this helps.
    <small>disclaimer: I am not selling any products, but there are Google Ads in that page.</small>

Maybe you are looking for