TellTarget

Hi to All,
I am new to flash lite. I prepared a small game in flash
lite. I randomly generate some duplicate movie clips (they are
moving from to down for example: bullets are dropping). I am
controlling the ship through arrow keys. I am unable to target the
ship with bullets.
Here i'am sending the arrow keys code.

Hi eeswardelihi,
Where in your code are you trying to target the bullets
hitting the ship?
The code you supply for the arrow keys looks fine, but there
is no reference of the bullets?
Please supply more information about the bullets movieclips.
Regards

Similar Messages

  • TellTarget to play a movie clip within a movie clip

    I currently have two movie clips in my scene with a button
    that lies inside one of the movie clips. We will call this movie
    clip for the sake of this post "ph." The button inside of ph has a
    rollOver/rollOut movie clip called "Buick_rollOut" attached to it
    as a parked movie clip through tellTarget. Currently Buick_rollOut
    only works if I put the parked movie clip on the same level as ph.
    I want Buick_rollOut to be within the movie clip, ph, that contains
    the button. I want that button be able to tellTarget the location
    of Buick_rollOut within ph. I hope this makes sense. Here is my
    code for the button that lies within ph. (this code only works when
    Buick_rollOut is located outside of ph on the same level).

    Is this code running on the button? What's the name of the
    button?
    Things would be a little clearer if you replaced tellTarget
    with dot notation:
    Buick_rollOut.gotoAndPlay("rollOver");

  • TellTarget how does it work?

    Hello:
    I'm looing in the Director help form Telltarget to control
    flash movie in
    the example
    -- Lingo syntax
    sprite(1).tellTarget("\myMovieClip")
    I don't understand "\myMovieClip" . I write the name of my
    flash movie in
    the cast and an error happens, so I can't communicate wih my
    flash movie.
    Can you help me?
    Thans

    Thank you very much.
    I have a little animation of a roll dice in swf format that a
    designer made
    me long time ago, and I don't have the original Flash file.
    Is there any
    command lingo that tell me the name of the movieclip?
    Thanks again.
    "Chunick" <[email protected]>
    escribi� en el mensaje
    news:e9nrgk$st1$[email protected]..
    > \myMovieClip would be the name of your movieClip in the
    Flash sprite. So,
    > let's
    > say you imported a flash .swf file into your cast and
    then dragged that
    > member
    > onto the stage, finally, in some code you wanted to
    control the flash
    > sprite...
    > but what you really wanted to control was the movieClip
    in the sprite...
    > you
    > could use the tellTarget() command to communicate with
    the movieClip in
    > the
    > Flash sprite directly. Let's say my movieClip was called
    mc_ManWalkCycle,
    > it's
    > in the root timeline, and my flash sprite has a behavior
    attached to it,
    > it
    > might look something like this:
    >
    > property pState
    >
    > on beginSprite me
    > pState = 0
    > sprite(me.spriteNum).tellTarget(\mc_ManWalkCycle)
    > end
    >
    > -- starts and stops the flash movieClip's walk animation
    cycle
    > on mouseUp me
    > pState = not pState
    > if pState then
    > sprite(me.spriteNum).play()
    > else
    > sprite(me.spriteNum).stop()
    > end if
    > end
    >
    > on endSprite me
    > sprite(me.spriteNum).endTellTarget()
    > end
    >
    > ** Important Note: I've never used this particular
    command so I really
    > don't
    > know if it will work as described in the help docs
    (knowing how error
    > prone
    > they are), so take what I've explained with a grain of
    salk, but I hope it
    > helps, at any rate.
    >

  • Translating tellTarget from AS2 to AS3

    Hi all!
    I am truely a beginner and here is my problem.
    I have been working on a Flash website in coded in AS3. Now, I have found a stright-forward turorial on adding a Sound ON/OFF button coded i AS2!
    What I want to do is to translate the piece of AS2 code below to AS3:
    on (release) {
    tellTarget ("supernovastar.mp3") {
    stopAllSounds();
    on (release) {
    nextFrame();
    I am aware of the on (release) has been changes to EventListners in AS3 but I cannot figure the rest out.
    I am greatful for any advice and help!
    Thanks!

    tellTarget is AS1, not AS2, and is replaced with dot notation coding (aka OOP).  But since the command in this case is to stop all sounds, targeting an object doesn't seem necessary since it is a global command.  The replacement for it would be to import the SoundMixer class (early on) and call its stopAll() method.
    import flash.media.SoundMixer;
    SoundMixer.stopAll();
    For the second on(release) section, nextFrame is still valid in AS3

  • PHP Check box in Flash

    Hello all,
    I have a flash form that has three checkboxes and some input
    text boxes. My form uses a PHP script that works perfect for the
    text but not the Check boxes. I'm not using the checkbox component,
    I'm using a check box i got from flash kit. Below is the code for
    the checkbox movie and my php code. What do I have to declare in
    the my php file to have the check box work?
    on (press) {
    if (Number(CB_1) == 0) {
    tellTarget ("checkbox1") {
    gotoAndStop(2);
    CB_1 = 1;
    showstate1 = "yes";
    } else {
    tellTarget ("checkbox1") {
    gotoAndStop(1);
    CB_1 = 0;
    showstate1 = "no";
    This is my php code
    <?
    // Enter your contact email address here
    $adminaddress = "[email protected]";
    // Enter the address of your website here include
    http://www.
    $siteaddress ="www.mysite.com";
    // Enter your company name or site name here
    $sitename = "my site";
    No need to change anything below unless you want to add or
    subtract functions or change the wording of things sent back to the
    flash file ...
    // Gets the date and time from your server
    $date = date("m/d/Y H:i:s");
    // Gets the IP Address
    if ($REMOTE_ADDR == "") $ip = "no ip";
    else $ip = getHostByAddr($REMOTE_ADDR);
    //Process the form data!
    // and send the information collected in the Flash form to
    Your nominated email address
    if ($action != ""):
    mail("$adminaddress","New User has Registered",
    "A visitor at $sitename registered!\n
    Personal Info
    Name: $fname
    Last Name: $lname
    Address: $add
    City: $city1
    State: $state
    Zip: $zip
    Telephone: $tele
    E-mail: $email
    Recieve Free Book: $showstate1
    Invitation to Seminar: $showstate2
    Schedule Free Visit: $showstate3
    Comments
    $comment
    Logged Info :
    Using: $HTTP_USER_AGENT
    Hostname: $ip
    IP address: $REMOTE_ADDR
    Date/Time: $date","FROM:$adminaddress");
    //This sends a confirmation to your visitor
    mail("$email","Thank You for visiting $sitename",
    "Hi $fname,\n
    We will process your request and send you a user name and
    password within 48hrs.
    Thank you for your registering at $sitename!\n
    $sitename
    $siteaddress","FROM:$adminaddress");
    //Confirmation is sent back to the Flash form that the
    process is complete
    $sendresult = "Thank you for comments and questions. You will
    receive a confirmation email shortly.";
    $send_answer = "answer=";
    $send_answer .= rawurlencode($sendresult);
    echo "$send_answer";

    1. You have not posting anything to show how Flash is
    communicating wit the
    server PHP script and it a guess that the variable in the
    checkbox is not
    getting sent.
    2. Code with tellTarget is old and will be completely
    obsolete as you want
    to migrate this to newer and newer features in Flash for the
    future.
    Lon Hosford
    www.lonhosford.com
    Flash, Actionscript and Flash Media Server examples:
    http://flashexamples.hosfordusa.com
    May many happy bits flow your way!
    "Asesino" <[email protected]> wrote in
    message
    news:[email protected]...
    > Hello all,
    > I have a flash form that has three checkboxes and some
    input text boxes.
    > My
    > form uses a PHP script that works perfect for the text
    but not the Check
    > boxes.
    > I'm not using the checkbox component, I'm using a check
    box i got from
    > flash
    > kit. Below is the code for the checkbox movie and my php
    code. What do I
    > have
    > to declare in the my php file to have the check box
    work?
    >
    > on (press) {
    > if (Number(CB_1) == 0) {
    > tellTarget ("checkbox1") {
    > gotoAndStop(2);
    > }
    > CB_1 = 1;
    > showstate1 = "yes";
    > } else {
    > tellTarget ("checkbox1") {
    > gotoAndStop(1);
    > }
    > CB_1 = 0;
    > showstate1 = "no";
    > }
    > }
    >
    >
    > This is my php code
    >
    > <?
    >
    > // Enter your contact email address here
    > $adminaddress = "[email protected]";
    >
    > // Enter the address of your website here include
    http://www.
    > $siteaddress ="www.mysite.com";
    >
    > // Enter your company name or site name here
    > $sitename = "my site";
    >
    > /*******************************************************
    >
    > No need to change anything below unless you want to add
    or subtract
    > functions
    > or change the wording of things sent back to the flash
    file ...
    >
    > *******************************************************/
    >
    > // Gets the date and time from your server
    > $date = date("m/d/Y H:i:s");
    >
    > // Gets the IP Address
    > if ($REMOTE_ADDR == "") $ip = "no ip";
    > else $ip = getHostByAddr($REMOTE_ADDR);
    >
    > //Process the form data!
    > // and send the information collected in the Flash form
    to Your nominated
    > email address
    > if ($action != ""):
    > mail("$adminaddress","New User has Registered",
    > "A visitor at $sitename registered!\n
    > ---------------------------------------------
    > Personal Info
    > Name: $fname
    > Last Name: $lname
    > Address: $add
    > City: $city1
    > State: $state
    > Zip: $zip
    > Telephone: $tele
    > E-mail: $email
    > ---------------------------------------------
    > Recieve Free Book: $showstate1
    > Invitation to Seminar: $showstate2
    > Schedule Free Visit: $showstate3
    > ---------------------------------------------
    > Comments
    > $comment
    >
    > ------------------------------
    >
    > Logged Info :
    > ------------------------------
    > Using: $HTTP_USER_AGENT
    > Hostname: $ip
    > IP address: $REMOTE_ADDR
    > Date/Time: $date","FROM:$adminaddress");
    >
    > //This sends a confirmation to your visitor
    > mail("$email","Thank You for visiting $sitename",
    > "Hi $fname,\n
    > We will process your request and send you a user name
    and password within
    > 48hrs.
    > Thank you for your registering at $sitename!\n
    >
    > $sitename
    > $siteaddress","FROM:$adminaddress");
    >
    > //Confirmation is sent back to the Flash form that the
    process is complete
    > $sendresult = "Thank you for comments and questions. You
    will receive a
    > confirmation email shortly.";
    > $send_answer = "answer=";
    > $send_answer .= rawurlencode($sendresult);
    > echo "$send_answer";
    >
    >
    >
    >

  • Adding submenus to an xml driven main menu

    Hi there folks,
    I have been following and bastardising a computer arts tutorial for a dynamic flash site, its a really good tutorial and I'd like to keep going with that format/style, but I'm pretty new to the whole scripting thing and am finding it a bit of a headache, so was wondering if any kind souls would help me work out how to add submenus to the code below. the main menu button is a movie file(btn_projects_main) consisting of a button (button) and a text box(txt) and is 3 frames long to allow for the different states:
    What I'm looking for is a set of sub menus which load horizontally below the main menu buttons, here is the code which has been altered slightly (thanks to Ned Murphy for his help and patience with that) any help would be hugely appreciated :
    // Setup some initial variables
    // Hide the button that will display a web link
    _root.theUrl._visible = 0;
    // Hide the image icons in the project loader
    // The image icons are simply there to make it easier for you to
    // select the movieClip from the main timeline.
    _root.img_project.photo_icon._visible = 0;
    _root.img_project.img_holder.photo_icon2._visible = 0;
    // name of the folder for all thumbs and swf files
    _root.imageFolder = "project_files/";
    // Create arrays ready for the xml data
    namesArray = new Array();
    linksArray = new Array();
    descriptionsArray = new Array();
    filesArray = new Array();
    // Load XML doc
    objXML = new XML();
    objXML.onLoad = loadXML;
    objXML.ignoreWhite = true;
    // The name of your XML file
    objXML.load("ss_flash_testing.xml");
    // onLoad XML function
    function loadXML(success) {
    if (success) {
    // If the XML loads successfully, count how many projects there are in the file.
    _root.projectCount = this.firstChild.childNodes.length; // PROJECT node in XML file
    // Then run a function that builds arrays out of the XML data.
    SS_Arrays();
    } else {
    // If the xml data did not load, show message on stage by populating the description field.
    _root.description = "Error: Could not load XML";
    function SS_Arrays() {
    for (var count = 0; count < _root.projectCount; count++) {
    var nodeObj = objXML.firstChild.childNodes[count];
    namesArray[count] = nodeObj.attributes.name;
    descriptionsArray[count] = nodeObj.attributes.description;
    linksArray[count] = nodeObj.attributes.link;
    filesArray[count] = nodeObj.attributes.file;
    // run the function to create the thumbnail and list view buttons
    SS_createButtons();
    var spaceBetween = 60; // space between buttons
    function SS_createButtons() {
    btn_projects_main._visible = 0;
    btn_xPos = _root.btn_projects_main._x;
    btn_yPos = _root.btn_projects_main._y;
    for (count = 0; count < namesArray.length; count++) {
    duplicateMovieClip(btn_projects_main, "btn_projects" + count, count);
    this["btn_projects" + count]._x = btn_xPos;
    this["btn_projects" + count]._y = btn_yPos;
    this["btn_projects" + count].txt.autoSize = "left";
    this["btn_projects" + count].txt.text = namesArray[count];
    //set the button width
    this["btn_projects" + count].btn._width = this["btn_projects" + count].txt._width;
    // determine the new x placement value based on the current button's width
    btn_xPos = btn_xPos + this["btn_projects" + count]._width + spaceBetween;
    // anything from here down I have no idea if it's needed, so I left it
    SS_load_project(0);
    tellTarget(_root.btn_projects0){
    gotoAndPlay(3);
    _root.curButton = "0";
    SS_createButtons(); // to kick off the function
    function SS_load_project(arrayNumber){
    // Progress bar stuff: This creates a new movie clip on the stage
    // and shows the progress of the image or file being loaded
    _root.createEmptyMovieClip("progressBar_mc", 1000);
    progressBar_mc.createEmptyMovieClip("bar_mc", 1001);
    // Using the flash drawing method, draw a box 550px wide by 2px deep
    // with a fill of red (FF0000)
    with (progressBar_mc.bar_mc) {
    beginFill(0xFF0000, 100);
    moveTo(0, 0);
    lineTo(660, 0);
    lineTo(660, 2);
    lineTo(0, 2);
    lineTo(0, 0);
    endFill();
    _xscale = 0;
    // set the X & Y positions of the progress bar manually
    //progressBar_mc._x = 160;
    //progressBar_mc._y = 218;
    // Or set them to be the same X & Y as the project file/image.
    progressBar_mc._x = img_project._x;
    progressBar_mc._y = img_project._y;
    // set the initial width of the bar to zero
    var mclListener:Object = new Object();
    mclListener.onLoadStart = function(target_mc:MovieClip) {
    progressBar_mc.bar_mc._xscale = 0;
    // increase the width (xscale) of the bar as the file loads
    mclListener.onLoadProgress = function(target_mc:MovieClip, bytesLoaded:Number, bytesTotal:Number) {
    progressBar_mc.bar_mc._xscale = Math.round(bytesLoaded/bytesTotal*100);
    // Make sure the clip being loaded doesn't play until it is fully loaded.
    // If you want content to stream as it loads remove the following 3 lines
    tellTarget(_root.img_project.img_holder){
    stop();
    // once the file has loaded, remove the progress bar from the stage
    mclListener.onLoadComplete = function(target_mc:MovieClip) {
    progressBar_mc.removeMovieClip();
    // Plays the loaded clip once it's fully loaded.
    // If you want content to stream as it loads remove the following 3 lines
    tellTarget(_root.img_project.img_holder){
    play();
    // Load the project file onto the stage by loading it into a movieClip (which in this case
    // is inside another one img_project > img_holder.
    var image_mcl:MovieClipLoader = new MovieClipLoader();
    image_mcl.addListener(mclListener);
    // load the clip onto the stage into a movieClip
    image_mcl.loadClip(_root.imageFolder + _root.filesArray[arrayNumber], img_project.img_holder);
    // Populate the dynamic text fields on the main stage with the project title & description
    _root.prj_name = _root.namesArray[arrayNumber];     
    _root.prj_description = _root.descriptionsArray[arrayNumber];
    // if the URL is present for this project, populate & show the link
    if(_root.linksArray[arrayNumber] != "") {
    _root.btn_link.webAddress = _root.linksArray[arrayNumber];
    _root.btn_link._visible = 1;
    } else {
    _root.btn_link._visible = 0;
    // Reset the last button
    tellTarget("_root.btn_projects" + _root.curButton){
    gotoAndPlay(1);
    // Replace the current button variable with this projects id/number     
    _root.curButton = arrayNumber;
    stop();

    No ideas at al guys?
    I just need a couple of pointers as in what to code needs adding and where, I've created a new movie clip with the name subs (instance sub1), surely its now just a matter of connecting that instance to the sub_projects node in the xml - I guess it also needs to be linked to a parent project button + told to only run when that parent is clicked. I've downloaded loads of different code from various sources, but as there seem to be lots of different ways to write the same commands, its feeling really confusing.
    Any help or feed back would be massively appriciated

  • Need help with drag and drop game, Urgent!

    Hi I have created a drag and drop game, the drag and drop is
    working alright however once the right word has been placed in the
    box, and moves on to the next question the previous correct answer
    stays where it was placed, how can i get it to snap back to its
    original location? Also when the right word is draged in to the the
    white box i want it to snap into place in that box so it fits in
    there.
    Also if you have any other thoughts and advice on how i can
    improve on this please email me thanx
    Can someone please help, my .fla file can be found here:
    http://www.freshlemon.co.uk/timeline.fla
    http://www.freshlemon.co.uk/timeline.fla.zip
    thanx

    tellTarget is ancient
    I forget what it even used to do??? hahaha
    seriously, just put in the instance name and what you want it
    to do:
    tellTarget("movieclip"){
    play();
    is now just
    movieclip.play();

  • How do you make the down state last a few seconds?

    I have an assignment due next week where you click something and a little text box pops up telling you what that item is. I also made it so the item changes colour.
    However, right now I've just got it so that you hover your cursor over it, it fades a bit, then you click it and it changes colour and the textbox shows up. The textbox and colour doesn't stay for a few seconds; you need to hold your mouse over it to make it stay.
    So, in short, I want it so the down state stays for a few seconds and then goes back to normal.
    I downloaded and installed the Flash CS6 trial to complete this, and I'm not sure if it's limited.
    At College they only have CS5.5, so I can't use any tools that go beyond CS5.5.
    I 'have' Flash CS5.5 but that was on my old computer (Which broke) and I'm waiting for my new one to come.

    How I would do it...
    1) make 2 seperate MC, one is the buttonMC (convert it to button symbol and just leave the hit spot)  and another is the buttongraphic (a movieclip) itself
    2) animate the buttongraphic (the MC), lets say frame one is its original state, frame two is how the hit/click would look like and frame ten is how it would look like when hover. that give you 10 frames for animation for each action
    3) name the button instance "button" and the graphic "gaphic"
    4) on the button, give it this code:
    on(press) {tellTarget("graphic") {gotoAndPlay(2);}}
    on(rollOver) {tellTarget("graphic") {gotoAndPlay(10);}}
    Hopefully this will help you out.

  • Need graphic to load when door opens

    I had this working at one time but having a problem with
    adding a graphic display when the door starts to open. A button
    initiates the door to open, here is the script. the second part is
    where it fails, anyone help please.
    on (release) {
    tellTarget ("/doors") {
    play();
    // function to show graphic when door opens
    on (release) {
    tellTarget ("/girlsroommovie") {
    play();

    i offer free help via this website. if you want to hire me,
    send an email via my website and i'll let you know how to send your
    fla for correction.

  • ActionScript 2 need to show graphic when doors open

    I had this working at one time but having a problem with
    adding a graphic display when the door starts to open. A button
    initiates the door to open, here is the script. the second part is
    where it fails, anyone help please. Can send fla if needed
    on (release) {
    tellTarget ("/doors") {
    play();
    // function to show graphic when door opens
    on (release) {
    tellTarget ("/girlsroommovie") {
    play();

    It is asking to set any error code. But I am not sure what error code returns if both Jboss servers are down.
    But URL returns 'Gateway Timed Out' when hitted during jboss down.
    Could you guide me in this situation with which code should I map this?
    Thanks in advance for sharing the link for 'error handling'.
    Regards
    --Amit.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Targeting Multiple Movie Clips

    Hi everyone,
    I'm fairly new to ActionScript so I would really appreciate
    any help I can receive.
    Right, I have a Flash file which contains a movie clip with
    an instance called, 'contentHold_mc'. Inside this movie clip are 4
    individual movie clips with instances entitled, 'content1_mc',
    'content2_mc', 'content3_mc' and 'content4_mc'. I know these are
    not the best names for instances, but this is just for simplicty's
    sake. At present all movie clips run at the same time. I want them
    to run sequentially. On the last frame of the instance,
    'content1_mc', I want to stop the instance from playing and start
    playing the instance, 'content2_mc'. On the final frame on
    'content3_mc', I want to stop the instance from playing and start
    playing the instance, 'content3_mc', and so on until 'content4_mc'
    finishes playing. I have tried to use the tellTarget function
    without success and anyway, I believe this is now deprecated.
    Would anybody be able to provide me some guidance please as
    to how I can achieve the previous using the 'dot' notation?
    I have tried the using the code found at the bottom of this
    message in the final frame of the movie clip instance that I want
    to play first ('content1_mc'), however get a compiler error because
    of the preceding two full stops '..'
    Thank you in advance for any help I may receive with this
    query.

    Put a stop(); command at the first frame of each of the
    clips. On the last frame of the first clip put:
    stop();
    _parent.contentHold_mc.content2_mc.play();
    repeat as needed for each movie clip.
    Tell the first clip to play.

  • Help needed to STOP xml loading

    Hi there,
    I'm pretty new to the action script side of things, have had some help on here already and have also been pulled up for asking for too much help.
    Well I'm kind of getting the hang of it now, but am having one major problem with the site I'm making, basically I've been following a tutorial for an xml based website, just about got my head round it but I need one line of code to stop the xml movie clip playing when I load a new one (eg when you navigate to a new page.
    this is the current code, if anyone can help I'd be massively thankful, this project has been doing my head in for weeks now - fingers crossed folks D
    // onLoad XML function
    function loadXML(success) {
    if (success) {
    // If the XML loads successfully, count how many projects there are in the file.
    _root.projectCount = this.firstChild.childNodes.length; // PROJECT node in XML file
    // Then run a function that builds arrays out of the XML data.
    SS_Arrays();
    } else {
    // If the xml data did not load, show message on stage by populating the description field.
    _root.description = "Error: Could not load XML";
    function SS_Arrays() {
    for (var count = 0; count < _root.projectCount; count++) {
    var nodeObj = objXML.firstChild.childNodes[count];
    namesArray[count] = nodeObj.attributes.name;
    descriptionsArray[count] = nodeObj.attributes.description;
    linksArray[count] = nodeObj.attributes.link;
    filesArray[count] = nodeObj.attributes.file;
    // run the function to create the thumbnail and list view buttons
    SS_createButtons();
    function SS_createButtons() {
    // First of all we want to hide the master button on the stage (btn_projects_main)
    // because we'll be making duplicates of it in the next part of the function
    _root.btn_projects_main._visible = 0;
    // Work out the X and Y positions of the main button so our new buttons start in the same place
    // (Which means where ever you position the main button is where the navigation will start).
    btn_xPos = _root.btn_projects_main._x;
    btn_yPos = _root.btn_projects_main._y;
    // Set the distances between your buttons and the number of rows
    btn_xDistance = 140;
    btn_yDistance = 19;
    btn_numOfRows = 5;
    // This figure is used to work out when to start a new column of buttons
    btn_yMax = btn_yPos + ((btn_numOfRows - 1) * btn_yDistance);
    // Loop through the projects array and create a button for each one by duplicating the original.
    for (count = 0; count < _root.projectCount; count++) {
    duplicateMovieClip(_root.btn_projects_main, "btn_projects" + count, count);
    // As the button is created, set it's X, Y & text properties
    _root["btn_projects" + count]._x = btn_xPos;
    _root["btn_projects" + count]._y = btn_yPos;
    _root["btn_projects" + count].text = namesArray[count];
    // set the X position for the next button
    if(btn_yPos == btn_yMax){
    // if the last buttons was the last row in the column (based on it's Y position) then start a new column
    // by resetting the Y position and adding 140px (btn_xDistance) to the the X position.
    btn_xPos = btn_xPos + btn_xDistance;
    btn_yPos = _root.btn_projects_main._y;
    } else {
    // if it's not the last one in a row, simply move it along the Y axis.
    btn_yPos = btn_yPos + btn_yDistance;
    // Load the first project (number 0) to avoid an empty screen
    SS_load_project(0);
    // Make the first project button highlighted
    tellTarget(_root.btn_projects0){
    gotoAndPlay(3);
    // Set the current button variable so we know which button to switch off when another one is pressed
    _root.curButton = "0";
    function SS_load_project(arrayNumber){

    Hi,
    In DBMS_JOBS_RUNNING you can find the sid of the session.
    Use this sid to identify the session in v$session and kill the session with:
    'alter system kill session 'sid,serial#';'
    Don't forget to mark the job as broken or remove it from the job queue.
    OR
    Before 10g, if you want to stop all jobs, you can simply set JOB_QUEUE_PROCESSES to zero.
    In 10g, Oracle intrduced scheduler_job with many advanced features.
    In this post I do not want to deal with different features of scheduler_jobs.
    In 10g, it is possible to schedule job either in dba_jobs or dba_scheduler_jobs.
    Setting JOB_QUEUE_PROCESSES to zero stops only jobs in dba_jobs which means that jobs in scheduler are still running .
    In order to disable jobs in dba_scheduler_job, the following script should be run for each job in scheduler.
    BEGIN
    sys.dbms_scheduler.disable( '"schema?"."job name?"' );
    END;
    Regards,
    Tom
    http://asktom.cz

  • Best practice for class communication

    Hi all,
    I'm trying to get my head around how to communicate through scope. I hope/think this is a pretty basic question but I'm pretty stuck in the AS2 mentality.
    To make a simple example, say I have 2 classes, ClassA and ClassB. ClassA loads an instance of ClassB:
    package
      public class ClassA
         private var _classB:ClassB;
         public function ClassA
             _classB:ClassB = new ClassB();
      class ClassB {} 
    Now I want ClassB to communicate with ClassA. It's easy for ClassA to invoke a method on ClassB, _classB.somePublicMethod();, but how does ClassB communicate back up to ClassA?
    I know one method is making a custom event and adding a listenor in ClassA that binds to ClassB while having ClassB dispatch that custom event. Is there any easier way I'm not aware of? Some kind of parent/super/etc method of talking to the class that instantiated ClassB?
    edit:
    Incase it matters or changes the approach someone would recommend, what I'm trying to do is make some touchscreen-esque scrolling functionality. The same stuff built into any smartphone. If you touch the screen and drag the touchscreen in certain contexts knows you want to scroll the information you're looking at. If you just tap something however it knows that you want to interact with what you tapped. That's what I'm trying to figure out how to do in as3.
    I have a touchscreen and I have navigation that doesn't fit all on the same screen. I'm trying to allow the user to scroll the navigation up/down to see all of the options but also let the user tap a nav item to let them select it. So I'm making a reusable class that's pretty abstract on the concept of allowing me to point to an object and say this object can be clicked, but if the user drags they intend to scroll a display.
    The actual end use of this is, as a personal learning exercise, I'm trying to duplicate a doodle/paint program my 3yr old son has in flash. He has a touchscreen laptop and he can scroll through a long list of artwork he can touch and it paints it on the screen. I'm trying to mimic that functionality where I try to determine if someone is trying to drag/scroll a list or select something in the list.
    That said, in that context ClassA is the painting app and ClassB is a reuable class that's applied to a navigation area whose job is to inform ClassA if the user intends to drag or select something. I make my nav items in ClassA and then instantiate ClassB. Because I need to 'wait' until ClassB tells ClassA what the user is doing, it's not a return value type of situation. I have to wait for ClassB to figure out if the person is trying to click or drag, then communicate that back to ClassA so it knows how to handle it.

    I will definitely use an event. I've never made a custom event but the top google search (always a blog) has good comments on the approach so I'm using this approach at it.
    Anyone think that approach is bad/outdated/refineable?
    edit:
    Man, it's just one of those days. This is all working fine and well but I can honestly say in no project have I ever needed to make a custom event and I've been using flash since the early 90s with nothing but telltarget.....
    I do have one question, because I (admittedly) spent a freaking hour (*sigh*) on trying to figure out why I'd dispatch an event and it wasn't picked up.
    A quick psuedo example:
    package{
      public class ClassA {
        private var _classB:ClassB = new ClassB();
        public function ClassA() {
            this.addEventListener(CustomEvent.WHATEVER, _doSomething);
        // _doSomething func......
      class ClassB {
        parent.dispatchEvent(CustomEvent(CustomEvent.WHATEVER, { foo:"bar" }));
      class CustomEvent extends Event
        public static const WHATEVER:String = "whatever";
        public function CustomEvent(type:String, params:Object, bubbles:Boolean = false, cancelable:Boolean = false)  {
                super(type, bubbles, cancelable);
                this.params = params;
         // clone/tostring overrides.....
    Is it better symantics to do it that way with parent.dispatchEvent() or should I have done _classB.addEventListener(...) and then in ClassB I this.dispatchEvent()?
    What screwed me up for an hour was I was just this.dispatchEvent() instead of parent.dispatchEvent() and the event was never seen in the parent. It (hindsight) makes obvious sense I need to dispatch the event in the scope of whatever is looking for the event but somehow that wasn't really explained to me in the tutorials (like I linked). Their examples made the event, listener and dispatcher in the same place. I'm dispatching the event from a separate class so it didn't occur to me I needed to send that event back to the scope the listener existed in... Oy.. vey....

  • Simple Action Script question

    This is probably a very basic question, but going through all
    my old Flash work didn't help me remember...
    I have my animation starting on the main stage with an image
    fading in. when that is done playing, at the end i want it to go to
    a movie clip on the stage and play it from frame 2. what is the
    action script for this?

    Doesn't seem to be working... your_mc is the instance name of
    the mc, correct? i placed this script in a frame - it's above where
    my mc first appears and the initial animation on the stage ends. is
    that correct?
    stop();
    tellTarget(mc_square-grid){
    gotoAndPlay(2);
    When I test the movie, the initial animation plays then
    stops, but the MC does not start playing. and the following error
    message appears:
    Target not found: Target="NaN" Base="_level0"
    quote:
    Originally posted by:
    ActionScripter1
    tellTarget(your_mc){
    gotoAndPlay(2);

  • Multiple click points for one button and movie clip

    I am trying to make a single button into a multiple click
    point. I have a movie clip on the stage and I have an invisible
    button over it. The movie clip consists of a single timeline that
    has an ambient animation running and looping intially. I have three
    more labeled sections of that timeline that each contain a
    different animated sequence as click point animations for that
    movie clip. I want the user to click on the button on the stage and
    the first labeled click point animation of that movie clip will
    play. I want that action to be stored so that when the user clicks
    again then the second labeled click point animation will play then
    they will click for the third in the same way. In between user
    clicks I want the ambient animation loop in the beginning of that
    movie clip timeline to play. When the user has clicked the 3rd and
    last animated sequence then the whole thing will reset and be
    available again. Can anyone let me know how that can be
    accomplished. I originally scripted it through tell target to play
    the first but I don't know how to move forward. Thanks!

    What version of Flash are you using? Telltarget is very
    old... try something like this:
    // array of the animations
    myAnims = ['firstAnim','secondAnim','thirdAnim']; // these
    are also frame labels
    // your current animation index in the array, arrays start at
    0,
    // so we start at -1 which is like before anything
    currAnim = -1;
    // function to play the next animation
    function nextAnim(){
    // add one to the current animation index
    currAnim++;
    // if you've reached the end of the array, start back at 0
    if(currAnim >= myAnims.length)currAnim = 0;
    // now tell the MovieClip to play based on the value of the
    current array index
    myMovieClip.gotoAndPlay(myAnims[currAnim]);
    Then on the button you just put:
    on(release){
    nextAnim();
    And at the end of each animation on the timeline, put:
    gotoAndPlay(1);
    And at the end of the ambient loop at the beginning I guess
    you have that, too, so it loops.
    Hope that helps

Maybe you are looking for

  • Due to my laptop screen failing i have to return to facory settings, can i reinstall adobe reader and adobe air afterwards?

    Due to my laptop screen failing I have to return it to factory settings, can I reinstall adobe reader and air afterwards?

  • Robocopy bug with /b switch

    Robocopy without /b is able to copy files which are currently open (e.g. a Word document open in Word). Robocopy with /b is not able to copy these same files. Steps to reproduce: Prerequisites: your user account is an administrator (in a domain, you

  • Itune.exe -Corrupt File message

    I have an Ipod Nano which has been working fine for a long while. Today for no apparent reason, I got I got the following error message when I attached the ipod to the usb wire: "itune.exe-corrupt file ipod_control/iTune/iTunesPrefs is corrupt and un

  • REG: Receiver Communication channel

    Hi All, What are different receiver communication channels used to send data to a SAP system? Thanks in advance, Siva.

  • CCMS_ONALERT_EMAIL client 000

    Good day all, I tryed to send an E-mail from the System by using the CCMS_ONALERT_EMAIL method in transaction [rz20]. I created a new method in [rz21] with the parameters: sender:              SAP* recipient:           .[email protected] recipient-ty