Spawning multiple instances of a sprite (firing bullets).  Help needed.

Hello there.  I'm currently trying to make a game in director 11.5 for a University project.  I've decided to make a scrolling space shooter but I've run into a problem.  Any tutorial I've found has created a limited 'bank' of bullets to fire, only allowing a certain number on the stage at any given time.  What I need to do is to leave a single bullet sprite off the boundaries of the page and essentially copy it and it's lingo behaviors to spawn another instance of the bullet on the stage when the player fires (using the left mouse button in this case).  I also need this copy to be deleted entirely when it collides with an enemy or leaves the boundaries of the stage, otherwise the game will just run slower and slower as more shots are fired.
I have heard that this is possible using the puppetSprite() method but the API doesn't shine much light on the issue and neither has literally hours of google searches.  If anyone can let me know any method of doing this, I'd be very grateful.
On a related issue, when fired the bullet will need to intsect the location of where the mouse cursor was when the bullet was fired and then continue on a linear path.  I've worked out a method of doing this but it isn't very effective or efficient (the speed of the bullets would be determined by how far away the mouse cursor is from the players ship and I think there's probably a less calculation intensive method for doing this) and as I can't spawn the bullets as of now, I really don't know if it will even work.  If anyone has any advice on how to better implement this mechanic, again I'd welcome your input.  Thanks in advance.

You want to work with objects not numbers which means using Points for locs and Sprite references and not sprite numbers.
I feel that using a object manager object would make programming this a lot easier, cleaner, and more efficient. Rather than give a lecture on OOP and OOD, I took some of Josh's ideas like using a timeout object and wrote some scripts in my style to give you something else to boggle your brain.
I tested these scripts but not thoroughly and I left plenty for you to do.
I separated out the creation and control of "bullets" from the movement of the bullets. So, there is a behavior that does nothing more than move the bullet sprites and the control object handles everything else using a single timeout object.
I suggest creating a new project to play with these scripts. Throw a bunch of sprites on the stage and attach the "Hitable Sprite" behavior to them, make sure you have a sprite named "bullet", and a " go the frame" behavior to loop on and you should be good to go.
Note that where I set the velocity of the bullet sprites, that I use "100.0" instead of 20.  20 would be a very fast speed.
Here's the Parent script for the control:
-- Bullet Control parent script
property  pUpdateTimer  -- timeout object for doing updates
property  pBullets  -- list of bullet sprites
property  pGunLoc  -- location of the gun, ie the location where your bullets start at.
property  pRightBounds  -- right edge of the stage
property  pBottomBounds  -- bottom edge of the state
property  pZeroRect  -- used for intersection hit detection
on new me
  pUpdateTimer = timeout().new("BulletCntrl", 25, #update, me)  -- 25 milleseconds = 40 updates per second
  pBullets = []
  pGunLoc = point(300,550)  -- *** SET THIS to where you want your bullets to start at.
  pZeroRect = rect(0,0,0,0)
  -- store stage bounds for later use
  pRightBounds = _movie.stage.rect.width
  pBottomBounds = _movie.stage.rect.height
  return me
end new
on fire me
  NewBullet = script("Bullet behavior").new(pGunLoc)  -- create new bullet sprite
  if ilk(NewBullet, #sprite) then pBullets.add(NewBullet)  -- store sprite reference
end fire
on update me, timeob
  if pBullets.count = 0 then exit  -- no bullets to update
  -- update bullet positions
  call(#update, pBullets)
  -- get list of sprites to test for hits/collisions
  HitSprites = []
  sendAllSprites(#areHitable, HitSprites)  -- the list "HitSprites" is populated by each hitable sprite.
  BulletsToDelete = []  -- list of bullet sprites to delete
  -- check if any bullet has hit a hitable sprite
  repeat with Bullet in pBullets
    repeat with HitSprite in HitSprites
      if Bullet.rect.intersect(HitSprite.rect) <> pZeroRect then
        HitSprite.explode()
        BulletsToDelete.add(bullet)
        exit repeat  -- leave inner loop
      end if
    end repeat
  end repeat
  -- check if bullet is out of bounds
  repeat with Bullet in pBullets
    Die = false
    if Bullet.right < 0 then Die = true
    if Bullet.left > pRightBounds then Die = true
    if Bullet.top > pBottomBounds then Die = true
    if Bullet.bottom < 0 then Die = true
    if Die then BulletsToDelete.add(Bullet)
  end repeat
  -- remove any sprites that hit something or went off the screen
  repeat with Bullet in BulletsToDelete
    Bullet.die()
    pBullets.deleteOne(Bullet)  -- remove bullet from list of active bullets
  end repeat
end update
on stopMovie
  -- end of app cleanup
  if pUpdateTimer.objectP then
    pUpdateTimer.forget()
    pUpdateTimer = void
  end if
end
The behavior for the bullets is:
-- Bullet behavior
property  pMe
property  pVelocity
property  pCurLoc
on new me, StartLoc
  -- get a sprite
  pMe = me.getSprite()
  if pMe.voidP then return void  -- if not a sprite then give up
  -- setup this bullet sprite
  pMe.puppet = true
  pMe.member = member("bullet")
  pMe.loc = StartLoc
  pMe.scriptInstanceList.add(me)  -- add this behavior to this sprite
  -- set velocity
  pVelocity = ( _mouse.mouseLoc - StartLoc) / 100.0  -- Note: magic number "20.0"
  updateStage()  -- need to update pMe.rect values
  pCurLoc = pMe.loc -- store current location
  return pMe  -- Note: returning "pMe" not "me"
end new
on getSprite me
  repeat with CurChannel = 1 to the lastchannel
    if sprite(CurChannel).member = (member 0 of castLib 0) AND sprite(CurChannel).puppet = false then
      return sprite(CurChannel)
    end if
  end repeat
  return void
end getSprite
on update me
  -- move bullet. 
  pCurLoc = pCurLoc + pVelocity  -- add velocity to pCurLoc to maintain floating point accuracy
  pMe.loc = pCurLoc 
end update
on die me
  pMe.scriptInstanceList = []  -- must manually clear this property
  pMe.puppet = false
end
We setup everything in a Movie script:
-- Movie Script
global gBulletCntrl
on prepareMovie
  gBulletCntrl = script("Bullet Control").new()
  the mouseDownScript = "gBulletCntrl.fire()"  -- route mouseDown events to the global object gBulletCntrl.
end prepareMovie
on stopMovie
  the mouseDownScript = ""
end stopMovie
Finally since we are shooting at other sprites we need a script on them to interact with the bullets.
--  Hitable Sprite Behavior
property  pMe
on beginSprite me
  pMe = sprite(me.spriteNum)
end beginSprite
on enterFrame me
  -- movie sprite
end enterFrame
on areHitable me, HitList
  HitList.add(pMe)
end areHitable
on explode me
  put "Boom"
end explode

Similar Messages

  • Multiple ethernet network adaptors + MySQL/php5: configuration help needed

    I would be grateful if someone could give me some advice on how to configure multiple ethernet adapters under OS X 10.5.6
    I have set up my system to work nicely with two ethernet network adapters, each with its own fixed IP. This bit works just fine. The machine supports two separate servers - a mail server and the OS X Apache2 server. I have configured the mail server to only listen to one of the IPs, and the Apache2 server to listen to the other (via httpd.conf). The system also has MySQL and php5 installed / enabled, and these services are only used by the Apache2 server.
    The problem I have is that when I start the machine, initially the php5 system cannot connect reliably to the MySQL database system. The fix I have found is to temporarily make the ethernet adapter connected to the mail server 'inactive'. While this is so, the php5/MySQL connection to Apache2 works. Curiously, once an initial connection between php5 and MySQL has been made, subsequently I can make the mail server's ethernet adapter active again without further problems.
    I initially thought this might be due to 'service order' issues - but changing the service order (e.g. putting the Apache adapter 'above' the mail adapter in the service order does not help. The fix only works by making the mail adapter inactive temporarily.
    I suspect that there is some configuration change I can make to clarify the setup I have. The MySQL and Apache installations only need to talk to the Apache server - but I am not sure how to record this configuration in the OS X system.
    Thanks in advance for any assistance that you can provide.
    Message was edited by: Gavin Lawrie

    Hi Stepehen,
    Did the configuration as per your advice  but i am getting the below mentioned error which i have highlighted it in red. Please advice what needs to be done.
    Home
    Re: 1941W configuration help needed
    created by Stephen Rodriguez in Getting     Started with Wireless - View the full discussion
    conf t
    interface     Dot11Radio0
    no ssid     Cisco_Kamran_BGN
    no encryption mode     ciphers aes-ccm
    exit
    interface     Dot11Radio1
    no encryption mode     ciphers aes-ccm
    no ssid     Cisco_Kamran_A
    exit
    dot11 ssid     Cisco_Kamran_A
    vlan 10
    dot11 ssid     Cisco_Kamran_BGN
    vlan 11
    exit
    interface     Dot11Radio0
    encryption vlan 11     mode ciphers aes
    ssid     Cisco_Kamran_BGN
    exit
    interface     dot11radio0.1
    encapsulation     dot1q 1 native
    bridge-group 1
    interface     dot11radio 0.11
    encapsulation     dot1q 11
    bridge-group 11
    Configuration of     subinterfaces and main interface
    within the same bridge     group is not permitted
    exit
    interface     Dot11Radio1
    encryption vlan 10     mode ciphers aes-ccm
    ssid     Cisco_Kamran_A
    interface     dot11radio1.1
    encapsulation     dot1q 1 native
    bridge-group 1
    interface     dot11radio1.10
    encapuslation     dot1q 10
    bridge-group 10
    Configuration of subinterfaces and main     interface
    within the same bridge     group is not permitted
    end
    wr
    Reply to this message by going to Home
    Start a new discussion in Getting Started with Wireless at Home

  • Multiple Instances of RWServlet. - Oracle Support help.

    Hi,
    I am noticing that the RWServlet doesnt send request for second report untill the previous one (first one) has run by the report server.
    Is it true? Is there anyway we can avoid this?
    And also, If the browser from where the report request is fired gets closed, what happens to the request...does the report request job still run?
    We are commited to using RWServlet for making the reports available over web, but this problem will spoil our plans.
    I appreciate your help.

    hello,
    try background=YES this might solve the problem.
    regards,
    the oracle reports team

  • Creating Symbol Instances containing a dynamically set image - Help Needed

    I'm working on a site prototype that has many rollover images in the navigation. Each image is unique, but the rollover and rollout code is identical. I'm trying to create a single symbol that can be used for all of the rollovers, but need some help figuring this out, as it will significantly speed up my work.
    I think the pseudocode would work like this:
    Create a symbol that contains a default rollover image.
    In the symbol, add the rollover and rollout code. This adjusts transparency from 0 -> 100 and back.
    Create instances of the symbol over each item in the nav.
    For each instance, set a variable containing the name of the rollover image to be used.
    In that symbol instance, get the variable value.
    In that symbol instance, use the image name in the variable to replace the default image.
    Question: How do I make step 4-6 work? I have 1-3 working smoothly.P.S. My last dev work was waaaaay back with Director, PHP and ColdFusion. I still get basic principles such as using functions, objects, instances, inheritance etc, but the language has changed. And I have very very little experience with the DOM.
    Appendix: How I'm Doing This Manually
    There's a background image of the nav showing all of the unselected states
    Each item in the nav has a corresponding rollover image, in a series of elements layered on top of nav element. Each rollover has opacity initially set to 0%.
    Each image element has rollover, rollout and click triggers. Rollover and rollout triggers are identical for each. There's also a little more code with rollout that provides a quick fade. This means lots of copying identical code. I hate to think about having to change any part of that code.
    Thanks! Chassy

    Hi there,
    Perhaps a more simple solution would be to set up 1 global function that handles over/out states for all your buttons. On mouseenter/mouseleave of each button you would call this function to fade in/out your rollover graphic.
    Example:
    http://www.timjaramillo.com/code/edge/rollover4_multiple_btns
    Source:
    http://www.timjaramillo.com/code/edge/_source/rollover4_multiple_btns.zip
    Code on Stage.compositionReady (note there are btn symbols called btn_1, btn_2, btn_3, and all have an over state called "over" in them):
    var array_btns = ["btn_1", "btn_2", "btn_3"];// array to hold all your btns
    function setup_btns()
              // iterate through array_btns, add "mouseenter" and "mouseleave" for all
              for (var i=0; i<array_btns.length; i++){
                        // hide "over" state initially
                        sym.getSymbol( array_btns[i] ).$("over").hide();
                        sym.$( array_btns[i] ).mouseenter({obj:array_btns[i]}, function(e){
                                  var btn = e.data.obj;
                                  sym.getSymbol(btn).$("over").fadeIn(500);// show "over" graphic
                        sym.$( array_btns[i] ).mouseleave({obj:array_btns[i]}, function(e){
                                  var btn = e.data.obj;
                                  sym.getSymbol(btn).$("over").fadeOut(200);// hide "over" graphic
    setup_btns();

  • Conky - multiple instances, eating up CPU like candy

    I run a desktop composed of xmonad, dzen2, and conky. I recently modified my conky config, and whereas previously my cpu monitor showed 0% at idle, it now shows 14% at idle. I checked htop and found that the top processes for cpu% were three instances of conky. Can anyone explain why there are multiple conkys spawned, even though my xmonad.hs file only specifies one? And which line in my conky config is taking up so much processing power?
    Here is my conkrc:
    out_to_x no
    background yes
    out_to_console yes
    update_interval 0.7
    short_units yes
    TEXT
    {${time %a %b %d %Y} - ${time %H:%M:%S}} \
    | ${scroll 12 6 $moc_artist - $moc_song} | \
    [RAM: $memperc%] \
    [CPU: $cpu%] \
    [disk I/O: ${diskio /dev/sda}] \
    [HDD: ${fs_used /}/${fs_free /} (${fs_used_perc /}%)] \
    ${if_existing /proc/net/route wlp3s0} [network: ${wireless_essid wlp3s0} (${wireless_link_qual_perc wlp3s0}%)] $else [network: -- ]$endif \
    ${if_existing /sys/class/power_supply/BAT1} [battery: ${battery_percent BAT1}%] $else [battery: -- ]$endif
    my previous config was more or less the same, except that it was all on one line and it didn't have the fancy decision-making stuff thrown in. It also did not have the lovely scrolling bit for the currently playing song.
    EDIT:
    That lovely scrolling bit was the culprit. Removed it. Maybe I'll put it back when I get a machine with a bigger processor. I'm all about minimizing the system's use of resources, so it might not make it back into the config, even with a better processor.
    Conky is still spawning multiple instances, and I can't for the life of me figure out why.
    Last edited by ParanoidAndroid (2013-05-15 18:56:12)

    Yes it does. And it appears that other things, such as pulseaudio --start, dbus, and a dozen other processes are running duplicates with different pids. I'm checking with atop to see if htop is to blame, but I don't think it's the program.

  • Multiple instances spawned after daylight savings time change

    This is a known issue and there is an SAP Knowledge Base Article created on this issue:
    1448881 - Multiple instances spawned after daylight savings time change
    Below is the information from the SAP Knowledge Base Article:
    Symptom
    Scheduled reports that are supposed to run once a day, run multiple times.
    Duplicate instances are being created.
    Environment
    BusinessObjects Enterprise XIR2 SP5
    BusinessObjects Enterprise XIR2 SP5 + FP5.x
    Reproducing the Issue
    A report is scheduled to be run on a daily basis - this is a Recurring schedule.
    Normally the report runs once a day, at a particular time.
    After Daylight Savings Time change, the report runs at the specified time, but immediately after the successful instance, another instance is spawned.
    Many more instances spawn after each instance completes.
    Cause
    This is a known issue: ADAPT01318487. This issue is because of DST and how our code handles this change.
    Resolution
    There is currently no known fix for this issue. There is however a script that can quickly resolve the problem.
    The issue it seems is related to Daily recurring schedules.
    What this script will do:
    it will run a query to display all your DAILY Recurring jobs
    you will have the option to choose your jobs and reschedule them by 1 hour
    you will then highlight the same job and change them back by 1 hour
    by modifying the schedule times, you are modifying the schedule itself and this will keep the issue of duplicate instances from occurring.
    Exact Steps to Complete:
    Stop the Job Servers.
    Double click on the .hta file.
    Change the System Name to that of your CMS name.
    Add the Administrator's password.
    Click Logon.
    Click List All Recurring Instances.
    Select All.
    Make note of what it says in: Schedule Selected Recurring Instances: Should be 1 hr earlier.
    Click Reschedule Selected Recurring Instances.
    Choose All instances again and change Schedule Selected Recurring Instances to 1 hour Later.
    Click Reschedule Selected Recurring Instances.
    Now start your Job Servers.
    The issue should not occur again.
    The Script is attached here, but please review the SAP Knowledge Base article 1448881 as well

    Hi Nicola,
    - The multiple spawned instances issue ONLY affects XI3 SP3+ only.  For XI3 SP1 and SP2 all Fix Pack levels this is not an issue as it was introduced as a problem in SP3.
    - 1568239 notes the Java version and can apply to all O/S environments and is updated to reflect that.
    If you are located in Europe you can also apply the patches in advance of the DST change to avoid the problem.  If you are in Americas at this point utilizing the clean up scripts for this year is the approach needed to clean up the spawned instances and reschedule the existing schedules.
    Thanks,
    Chris

  • Can I create multiple instances of  realplayer plug-in in one jsp page?

    I want to play meny video files in one jsp web page, these video files are to be played with the embeded plug-in of realplayer, each plug-in was linked(use its SRC property) a different video file. But, to my surprise, when I press the play button, every player played the same video file,not its specified file.
    I have no idea why it did so and what can I do?
    Whether can I create multiple instances of realplayer plug-in in one jsp page, that is to say, each instance is independent of others?
    thanks in advance!

    Generally speaking, Internet Explorer tries not to launch multiple versions of a plug-in. So what's happening is that you load the first video clip, and then before it has a chance to play, you load the second video clip into the same window. (It's like changing songs in WMA.)
    In some cases - this may not work for Real Player, but it's worth trying - if you spawn a new window through a hypertext link and then launch the plug-in in that window, IE will treat it separately. Otherwise, you could not, for example, run two Macromedia Flash applications from different web sites at the same time.
    Keep in mind that only one program can access the soundcard at a time, so Real Player may purposely "pause" or "cancel" other video streams until the active one finishes. If you were using the desktop version, selecting another video by any means aborts the currently running video (i.e., RP won't let you create a separate instance of it).
    The easiest solution is to create a wrapper JSP file that takes the name of the video clip, and plays it. Call that JSP and specify that it should be opened in a new window via the TARGET keyword in the anchor tag. Then hopefully RP itself won't block a second window from running.

  • Drag and drop between multiple instances of an executable

    I want to know if there is a special way (not using Windows API) to drag and drop data between multiple instances of a same executable. 
    I have an application built in LabVIEW, where the main window can open a child window. Each window has a plot control. Between the two windows, a plot data of main window can be copied by drag and drop. 
    And I open another instance of the same executable. Now there are two executables(A and B).
    I want to drag and drop a plot data from the main window of B to the child window of A. But in this case, Drag Enter Event is not fired. I think that the event seems to be fired only inside an executable.
    http://digital.ni.com/public.nsf/allkb/AB268878693EF4B586257037004A6725 says that Queue or Semaphore is working only inside an executable. Is drag operation also valid only inside a process?

    Hi,
    Placed images (as opposed to pasted images) in Indesign are by their very nature pointers to an external image file, so there is no way to slim down the size of your exported PDF other than by playing with the export settings. Other than that, ensure that your file is placed in Indesign at 100% and at the correct resolution for your desired output. If you open the PDF in Acrobat, you can also save as a reduced size PDF which may help.
    Good luck!
    Malcolm

  • Multiple Instance of HSODBC.EXE

    Hi,
    I'm using Oracle 8.1.7.4 (W2K) with heterogeneous services to connect via dblink to DB2/400.
    I can read successfully several tables from AS400; but a multiple instance of 'hsodbc.exe' ( i.e. one task for one interrogation) are created on task manager.
    If I try to end a hsodbc I can't.
    After several interrogation, I can't use again hsodbc and the system returns the following error:
    ORA-28500 [Generic Connectivity Using ODBC] a dynamic link library (DLL) initialization routine failed; at FIND_IMAGE_SYMBOL
    cannot connect to shareable nvdbodbc. Using dummy function
    Initialization function ODBC not found.
    ORA-02063
    Is there any particular configuration of heterogeneous services that avoid a multiple instance of 'hsodbc.exe' ?
    This is a serious problem for us.
    Regards
    Andrea

    Andrea,
    this normally indicates, that an established session is not correctly ended.
    In general you need to close database links after you do not need them anymore.
    A SQL*Plus session for example querying from the remote database will normally close the db link automatically while ending the SQL*Plus session.
    Sometimes it could happen, that you end SQLÜPlus during long runnning queries; in this situaotion it might happen, that hsodbc will stay in the mmory. To get rid of those hsodbc processes, you may use pskill from www.sysinternals.com.
    If the hsodbc processes are spawned by frequentyl running job systems, you need to close the database link manually afterwards.
    alter session close database link <db link name>;

  • Validation Multiple Instance of Entity

    I have created multiple instance of an entity and there is a regular expression attahced with one attribute of entity.
    I want validation of regular expression should be fired for only one instance, but it is getting fired for all instance.
    Can you all please give me solution for this.

    When you say it is fired for all instances, when is it being fired?
    How are you creating the entity instances?
    Davin.

  • Multiple instances of nilm.exe zombies causing laptop to crash

    Symptom:
    My laptop was recently disabled by multiple instances of nilm.exe.
    The computer became sluggish and eventually could only be shutdown by removing the battery.
    The task manager reported that the amount of memory being using was over 1 Gig and growing. Task manager processes showed pages of nilm.exe, presumably zombies.
    And of course the critial error pop-up - "nilm.exe could not initialize." that was always in top and could not be cleared.
    Extreme measure taken:
    Because of the sluggish performance I could not get to the service menu to shutdown the parent NI service. Instead I renamed the file nilm.exe to killnilm.exe thus inhibiting spawning yet another copy of nilm.exe.
    At this point I re-booted and set the parent NI license management service to start manually.
    Complaint:
    The NI knowledge base lists this as a known problem and that only one copy of nilm.exe should be running. The knowledge base also states the root cause is that TCP/IP is incorrectly configured. I do not agree this root cause statement. The root cause is poor programming practice that allows the lack of a computer resource (TCP/IP sockets connection) to completely crash a computer.

    Hi jwillis172,
    I guess that you are referring to the following KnowledgeBase:
    Multiple NILM Processes after Installing LabVIEW and the NI License Manager
    Did the solution/workaround in the KB resolve your issue? If not, please let me know.
    I'm not a developer, but I see your point in the statement that a
    missing computer resource should not result in a crash. Please make
    sure to submit your feedback to the KB through the option on the bottom
    of the page. This will bring your feedback to the responsible person
    for the KB.
    Thanks!
    - Philip Courtois, Thinkbot Solutions

  • Can Java Spawn multiple processes?

    I see that Directory proxy server is spawning multiple processes. Is this really possible? How should one shut down this process? kill -15 did not kill child process
    Operation System is Solaris 10.
    -bash-3.00$ ptree 27450
    27450 /usr/jdk/instances/jdk1.6.0/bin/java -Xss128k -Xmx1400M -Xms1400M -XX:NewSize=1
    27789 /usr/jdk/instances/jdk1.6.0/bin/java -Xss128k -Xmx1400M -Xms1400M -XX:NewSize=1
    27790 /usr/jdk/instances/jdk1.6.0/bin/java -Xss128k -Xmx1400M -Xms1400M -XX:NewSize=1
    Thanks!

    Because on linux threads are implemented as standard processes but on other
    platform like windows and solaris they are not processes.

  • Need Multiple Instance of MDI Form, Possible ?

    Hi,
    I have a button in outlook,  that when clicked runs an Winforms application as addin.  The app has main MDI window and uses lots of .xsd files (Typed Datasets) for database activity.
    I have a situation where we want to shift all 2014 data into and as OLD database and only 2015 onwards records with be in current database.  But we also want users to view old data.  
    The immediate thought with minimum changes is that if we can create two instance of MDI Window (Running separately from each other in process ) then both can have different connection strings  and program will run as usual getting data
    from respective database.  
    Note: Connection strings are defined in and as global::AppName.Properties.Settings.Default.cnn and same is used everywhere in the code including .xsd files (Typed Datasets)
    Any Guidance or Better Thoughts to achieve the task.
    Regards

    Thanks Phill for the response.
    But in both of the techniques I will have to modify the code (SQL) at many places and do round of testing.
    Its a 4yr old code and not everything is in stored procedures, some are dynamic sql coming from code etc etc.
    Another factor which I forgot to mention was that we want to Re-numbering/Restart of all AutoIncrement Fields.
    This might be in conflict with either of your suggestions.
    if it was just WinForms application, I think it would be easy to run multiple instance.  but in my case its an outlook addin. My view is somehow if it is possible to manipulate and spawn two instance running as different process, that it would be awesome.   
    Any thoughts ?
    Regards
    Hello,
    a. >>But in both of the techniques I will have to modify the code (SQL) at many places and do round of testing.
    b. >>Its a 4yr old code and not everything is in stored procedures, some are dynamic sql coming from code etc etc. 
    c. >>Another factor which I forgot to mention was that we want to Re-numbering/Restart of all AutoIncrement Fields.
    From these words above, it seems that you didn't want to edit the current form, and want to copy that and edit it to display the old data, and do some other modifications, right?
    We could create another form and copy all controls and code from the main form, and edit them to display the old data by changing the connection string, but it still needs us modify the code at many places.
    We could create another instance of the main form, and get that displayed, but it will still display the same data unless we changing the connection string and query.
    To sum up, no matter which way we selected, it still needs us to edit the code include query and connections strings at many places.
    >>if it was just WinForms application, I think it would be easy to run multiple instance.  but in my case its an outlook addin. My view is somehow if it is possible to manipulate and spawn two instance running as different process, that it would
    be awesome.   
    The key issue is that where did you display these data, you want to display them inside the form, right?
    Inside the button click event of that add-in, you could show multiple window forms, one for old data, the other for 2015 data, they will not disturb each other.
    Regards,
    Carl
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Multiple instances of Mail.app must be possible

    I've seen many questions regarding the possibility of running multiple instances of Mail.app as separate processes. There seems to be much good reason to be able to do so, i.e. separating work and private mail, and very little bad reason to do so (maybe some problems when doing upgrades or backups, but I'm not yet sure of this). It also seems that it should not be so hard to do.
    So far, using some web acquired wisdom, I've done the following:
    1. Duplicate mail.app:
    sudo ditto Mail.app WorkMail.app
    2. Rename the executable:
    mv /Applications/WorkMail.app/Contents/MacOS/Mail /Applications/WorkMail.app/Contents/MacOS/WorkMail
    3. Use Property List Editor to set the following values in/Applications/WorkMail.app/Contents/Info.plist (Apple-S to Save changes!):
    Root/CFBundleExecutable=WorkMail
    Root/CFBundleIdentifier=com.apple.workmail
    Root/CFBundleName=WorkMail
    Root/NSServices/0/NSPortName=WorkMail
    Root/NSServices/1/NSPortName=WorkMail
    Root/NSServices/2/NSPortName=WorkMail
    Root/UTExportedTypeDeclarations/0/UTTypeIdentifier=com.apple.workmail.emlx
    Root/UTExportedTypeDeclarations/1/UTTypeIdentifier=com.apple.workmail.emlx.part
    4. Create the following directories:
    mkdir ~/Library/WorkMail Downloads
    mkdir ~/Library/WorkMail
    4. Launch the 'new' application 'WorkMail'.
    5. Create mail accounts using the application's 'wizard'.
    Here is where the first problem is encountered. The new account directories and files are still created at ~/Library/Mail. Navigating to Mail->Preferences->Accounts->[account_name]->Advanced seems to offer the option to change the mail store account directory, but nothing can actually be changed here. So...
    6. Quit WorkMail.
    7. Move newly created account(s) directories (where [newaccountdirectory] is a directory named with the format: [mail_type]-[user]@[domain].[tld]@[pop].[domain].[tld]]) to the correct location:
    sudo mv ~/Library/Mail/[newaccountdirectory] ~/Library/WorkMail/
    8. Use Property List Editor to set the following values in ~/Library/Preferences/com.apple.workmail.plist (Apple-S to Save changes!):
    /Root/ActiveViewers/0/AttachedMailboxListExpandedItems/[0to_#_ofaccounts]/=~/Library/WorkMail/Mailboxes/...
    /Root/CurrentTransferMailboxPath=~/Library/WorkMail/Mailboxes/...
    /Root/MailAccounts/[0to_#_of_accounts]/AccountPath=~/Library/WorkMail/[new_accountdirectory]
    /Root/MailDownloadsPath=~/Library/WorkMail Downloads
    9. Relaunch WorkMail.
    Everything at this point seems to work okay, **BUT** when I launch Mail while WorkMail is launched, I find that I cannot navigate into any mail folders within Mail. I receive an error message indicating that a necessary directory is locked. It seems that the locking mechanism used by the application may be hard-coded to lock ~/Library/Mail, and both instances of the application continue to take this action when launched, making it impossible for both to work harmoniously at the same time. I will conduct more testing and experimentation, but I am not yet capable of editing the application itself. If anyone can take us this last step, I'm sure there are many who would also like to be able to take advantage of the potential functionality.
    Thanks for any input!
    Steven Stromer

    Hopefully, there is someone with a programming background who
    can take me and other who have posted similar questions through
    the final mile on this...
    Well, I do have a programming background, and I must say that it amazes me that someone might want to do what you did to “solve” a problem that IMO doesn’t exist.
    What exactly is it that you expect to accomplish by running multiple instances of Mail, and for which neither (1) organizing your mail using multiple mail accounts, custom mailboxes, rules, and/or smart mailboxes, nor (2) setting up separate user accounts, are acceptable solutions? I just don’t get it.
    I've seen many questions regarding the possibility of running multiple
    instances of Mail.app as separate processes.
    I haven’t. Could you please provide a link for such a question, preferably one asked by someone who knew how Mail and Mac OS X work, i.e. a link for a case where there really was such a need?
    There seems to be much good reason to be able to do so
    I know of no such reasons, neither good nor bad.
    i.e. separating work and private mail
    I don’t see how that’s a reason to want to run multiple instances of Mail. Could you please elaborate?
    Maybe if you tell us what exactly is the problem that you’re trying to solve, instead of focusing on a convoluted “solution” that doesn’t work, we could propose a solution that does...
    and very little bad reason to do so
    Well, if the fact that it’s so convoluted and doesn’t even work aren’t bad enough reasons, I don’t know what it is...
    It also seems that it should not be so hard to do.
    I wonder what makes you think so. It does certainly seem hard to me, so hard that I don’t even think it can be done without breaking something, if at all...

  • What is the best way to load multiple instances of a button into master index page?. I have looked a

    I have successfully created an animated button that opens to reveal a quotation with a nested clickable link to the source. What I would like to do is have several of these with different quotes inside them, scattered on the page. I have looked at the composition loader available via Edge Commons, and it seems that would require some sort of Edge animate Stage 'frame' to load the instances into? Is there any way to place them directly into the master page - as div elements...?
    The outer of the buttons is the same, on hover they open partialy on click fully, to reveal  their particular text - which I thought about loading it at runtime with json, or maybe handlebars...?
    I would also like to make the buttons only take the necessary space. ie. before they expand they are only buttons. ( I have set the stage to hidden but it still takes up space). To acheive this, I think perhaps I will have to target the inner components css, and set them as display:none until the button is hovered over, then set :hover and :active pseudo classes inside edge. Is this feasible?
    Thanks in advance for any ideas/suggestions...

    Hello, Thanks for your helpful input. Based on that, and the tutorial 'http://tv.adobe.com/watch/learn-edge-animate-cc/ingesting-external-data-dc/' - I have written code to drive my button's behaviour.  (copied below...)
    var textArray =new Array();
    var currentHead = 0;
    var currentText = 0;
    var currentFoot = 0;
    var s = sym.getSymbol("textContainer");
    sym.$("textContainer")$.("text").html("");
    var sh = sym.getSymbol("headContainer");
    sym.$("headContainer")$.("head").html("");
    var sf = sym.getSymbol("footContainer");
    sym.$("footContainer")$.("footer").html("");
    $.getJSON("assets/sources1.json", function(data){
              for (var i=0; i<data.length; i++){
                        textArray.push({"head":data[i].heading,
                                  "text":data[i].text,
                                  "footer":data[i].foot,
                                  "link":data[i].link});
              sym.$("headContainer")$.("head").html(textArray[currentHead]).heading;
              sym.$("textContainer")$.("text").html(textArray[currentText]).text;
              sym.$("footContainer")$.("foot").html(textArray[currentFoot]).foot;
              sym.$("footContainer")$.("link").html(textArray[currentLink]).link;
    But there is an error I don't understand at line 7...
    Also - as you can see, at present I have several symbols in parallel. Would I be better off nesting the text containers inside the outer button container? and would I be better off creating styled mini- pages of text data, and then loading them - instead of loading them as symbols? I have had to create seperate symbols because I cannot adequately stle the text - so some is bold, some is italic etc. within one text field. Or can I? I guess I could nest several text fields inside one symbol...?
    I remain unsure how to load the finished animation button instances. In your example you were still loading into an animation But from yor example, I guess I would need to place all my examples inside an outer edge composition... but then I think positioning them accurately with css, making adjustments etc. will be fairly tricky. Is there any way to place multiple instances directly into divs in index.html? Could I simply repeat the class...? I may be answering my own questions here.

Maybe you are looking for