Access a button from outside the service

I created a few buttons (which are really the movieClips) who all instances named button1, button2, etc..  So, I created a loop For and put an addEventListener inside for a roll over.  The problem is the function called in the listener indicates the key to access the frame 2, but there is no way to tot Hat specific call button.  Here is the code:

for (k = 1; k < 17; k ++)

{

This ['button_' + k] .addEventListener (MouseEvent.ROLL_OVER, buttonRollOver);

}

function buttonRollOver(event:MouseEvent)

{

XXXXXXXXX.gotoAndStop (2);

}

Where is said "XXXXXXXX" is my problem.  How to identify the button that is put in place at the course?

use:

for (k = 1; k<17;>

{

This ['button_' + k] .addEventListener (MouseEvent.ROLL_OVER, buttonRollOver);

}

function buttonRollOver(event:MouseEvent)

{

MovieClip (event.currentTarget) .gotoAndStop (2);

}

Tags: Adobe Animate

Similar Questions

  • Cancellation enterFrame from outside the service

    OK, I learned AS3 so some of the ways I have some things to put in place are a bit complicated I agree.  I have a lack of extreme weather if so set the best rather than the best method is probably what I'm looking for (although the best method would be appreciated as well for learning purposes).

    I have a function that is running on ENTER_FRAME inside another function that is called once in COMPLETE.  I need to stop this ENTER_FRAME later in the timeline.  Here's the Basic code:

    myLoader.contentLoaderInfo.addEventListener (Event.COMPLETE, startListener);

    function startListener(e:Event):void

    {

    var mySprite = new Sprite();

    mySprite.addEventListener (Event.ENTER_FRAME, playerBarPos);

    addChild (mySprite);

    int playerBarPos(event:Event)

         {

    trace ("This keeps going and going");

    }

    }

    So you see when myLoader is COMPLETE, it creates mySprite is an ENTER_FRAME, which continues to run the playerBarPos function.  The playerBarPos function and then draw over and repeatedly "this continues and will."  How do I later in the timeline doesn't stop this?

    And for my own personal education, I am doing this in a crazy way?

    I didn't know you nesting functions named.  never do this.  and do not have local mySprite:

    var mySprite:Sprite;

    myLoader.contentLoaderInfo.addEventListener (Event.COMPLETE, startListener);

    function startListener(e:Event):void

    {

    mySprite = new Sprite();

    mySprite.addEventListener (Event.ENTER_FRAME, playerBarPos);

    addChild (mySprite);

    }

    function playerBarPos(event:Event)

    {

    trace ("This keeps going and going");

    }

  • RE: iOS iPhone 6 s 10 how l remove or disable the slippery camera from outside the locked screen? This feature is a security and threat privacy for me.

    RE: iOS iPhone 6 s 10 how l remove or disable the slippery camera from outside the locked screen? This feature is a security and threat privacy for me.

    You can not. However, I'm not sure why you think it's a privacy or security threat. The only thing that can be accessed without unlocking the phone is the camera to take pictures. No one can access your data already on the phone.

    You can send feedback to Apple here:

    http://www.Apple.com/feedback

  • Join the URI from outside the network

    Hello

    I have a problem to make a call from outside the network of phones internal using URI.

    If I test a call from outside (with Jabber video) to my URI ([email protected] / * /), highway E logs show:

    TVCS: event = "Call rejected" Service = "SIP" Src - ip = "IP address" Src-port = '5060' type-aliases-Src = Src-alias "SIP" = "sip:[email protected] / * /" Dst-alias-type = "SIP" Dst-alias = "sip:[email protected] / * /="Call-serial-number="aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeee" Tag "zzzzzz-Davis-0000-1234-xxxxxxxxx" detail = 'Not found' Protocol = "TCP" response code "404" = Level = '1' elements UTCTime = "2015-06-15 13:26:03, 214"

    If I check the call history, I see that my test call is not crossed:

    Source: sip:[email protected] / * /

    Destination: sip:[email protected] / * /

    Type: Non-traversal

    Protocol: SIP H323<->

    Status: 404 not found

    Step 1
    Area band bandwidth default node
    Alias 1 SIP of source:[email protected] / * / (Url)
    Target alias 1 sip:[email protected] / * / (Url)
    SIP protocol
    Address AAA. ABM CC. DD:5060
    TCP transport
    Not found a reason
    Cause 404

    Step 2
    Crossed bandwidth of Zone node (server)
    Target alias 1 sip:[email protected] / * / (Url)
    SIP protocol
    Address AAA. BBB. CCC. D:25793
    TLS transport

    Step 3
    Crossed bandwidth of Zone node (server)
    Alias target 1 [email protected] / * / (H323Id)
    H323 Protocol
    Address AAA. BBB. CCC. D:1719
    Unsaved pattern
    Destination not found cause

    My configuration:

    * X VLAN: CUCM 10.5 10.5 unit, 10.5 CUPS, ExpressWay C X8.5.1, highway E X8.5.1 (1 of 2 network adapter), DNS server, ad server

    * VLAN DMZ: highway E (the second network card)

    * Outside: External DNS

    (1) ExpC

    (a) areas

    Name Type Calls Bandwidth used Status of H323 SIP status Status of search rule
    DefaultZone Default zone 0 0 kbps On On  
    CEtcp-[CUCM_PUB_IP] Neighbor 0 0 kbps Off Assets The search rules permit: 1
    CEtcp-[CYCM_SUB_IP] Neighbor 0 0 kbps Off Assets The search rules permit: 1
    Neighbor CUCM Neighbor 0 0 kbps Off Assets The search rules permit: 1
    Covered area (client) Customer journey 0 0 kbps Assets Assets The search rules permit: 2
    Covered area (UC) Unified Communications crossing 0 0 kbps Off Assets No rule search configured

    Jabber works both inside and outside.

    Details

    Name: Nearby CUCM
    Type: neighbor
    Hop count: 15
    H.323 Mode: Off
    SIP mode: on
    Port: 5062
    Transport: TCP
    Accept records submitted by proxy: enable
    Media encryption mode: Auto
    Support of ice: Off
    Authentication policy: do not check the credentials
    Trust of SIP authentication mode: Off
    Peer 1 address: CUCM_PUB_IP (-online green)
    Address of the peer 2: CUCM_SUB_IP (-online green)
    Profile area: custom
    Monitor the status of peers: Yes
    Call signalling routed mode: always
    Automatically respond to the H.323 research: Off
    Automatically respond to the SIP research: Off
    Send empty INVITATION of interoperability calls: on
    The poison SIP mode: Off
    Encryption of SIP mode: Auto
    Mode SIP REFER: forward
    Limit mode line SIP SDP attribute: Off
    Length limit of SIP SDP attribute line: 130
    Band MIME multipart SIP mode: Off
    Band of SIP UPDATE mode: Off
    Interworking SIP research strategy: Options
    SIP UDP/BFCP filter mode: Off
    SIP UDP/IX filter mode: Off
    Duo SIP video filter mode: Off
    Address record SIP road type: IP
    Proxy SIP-require header band list: white

    Name: Covered area (client)
    Type: Customer journey
    Hop count: 15
    H.323 mode: on
    Protocol: enforcement
    Port: 6001
    SIP mode: on
    Port: 7003
    Transport: TLS
    TLS check mode: Off
    Accept records submitted by proxy: enable
    Media encryption mode: Auto
    Support of ice: Off
    The poison SIP mode: Off
    Authentication policy: do not check the credentials
    Customer settings stimulus interval: 120
    Peer 1 address: ExpE_IP (-online green)
    Address of the peer 2: expe.mydomain.fr (-online green)

    Name: Trasversal area (UC)
    Type: Course Unified Communications
    Hop count: 15
    User name: qwerty
    Password: *.
    SIP port: 7001
    Accept records submitted by proxy: enable
    Support of ice: Off
    The poison SIP mode: Off
    Authentication policy: do not check the credentials
    Customer settings stimulus interval: 120
    Peer 1 address: expe.mydomain.fr (-online green)

    (b) research rules

    Priority Name of the rule Protocol Source Authentication required Mode Type of rehearsal Pattern string Behavior model On match Goal
    45 CEtcp-CUCM_SUB_IP FT3 Any NO. Alias matching Prefix CUCM_SUB_IP; Transport = TCP Leave Stop CEtcp-CUCM_SUB_IP
    45 CEtcp-CUCM_PUB_IP FT3 Any NO. Alias matching Prefix CUCM_PUB_IP; Transport = TCP     CEtcp-CUCM_PUB_IP
    50 LocalZoneMatch Any Any NO. Any alias       Continue LocalZone.GetDaylightChanges
    100   Any Any NO. Any alias       Continue Covered area (client)
    100   Any Any NO. Any IP address       Continue Covered area (client)
    100   Any Any NO. Alias matching Regex (3\d{3})@mydomain.fr(.*) Leave Stop Neighbor CUCM

    (c) changes of

    Change the destination to the URI format alias
    ([^@]*)
    Replace
    ------[email protected] / * /

    CUCM IP to the domain
    Regex
    (. *) @(AAA\.) BBB\. CCC\. D | AAA\. BBB\. CCC\. D)((:|;).*)?
    Replace
    ------[email protected] / * /\2

    Convert domain Unified CM provided until highway information
    Regex
    (4\d{3})@expc.mydomain.fr(:.*)?
    Replace
    ------[email protected] / * /

    (2) experience

    (a) areas

    Name Type Calls Bandwidth used Status of H323 SIP status Status of search rule
    DefaultZone Default zone 0 0 kbps On On  
    DNSZone DNS 0 0 kbps On On The search rules permit: 1
    Covered area (server) Crossing Server 0 0 kbps Assets (Connections noactive) The search rules permit: 1
    Covered area (UC) Unified Communications crossing 0 0 kbps Off Assets No rule search configured

    Details

    Name: Area covered (server)
    Type: Server covered
    Hop count: 15
    User name: qwerty
    H.232 Mode: on
    Port: 7003
    Transport: TLS
    TLS check mode: Off
    Accept records submitted by proxy: enable
    Media encryption mode: Auto
    Support of ice: Off
    The poison SIP mode: Off
    Authentication policy: do not check the credentials
    UDP retry interval: 2
    Number of UDP attempts: 5
    UDP keep alive interval: 20
    TCP retry interval: 2
    Number of attempts TCP: 5
    TCP keep alive interval: 20

    Name: Covered area (UC)
    Type: Course Unified Communications
    Hop count: 15
    User name: qwerty
    SIP port: 7001
    TLS check the name of the object: expc.mydomain.fr
    Accept records submitted by proxy: enable
    Support of ice: Off
    The poison SIP mode: Off
    Authentication policy: do not check the credentials
    UDP retry interval: 2
    Number of UDP attempts: 5
    UDP keep alive interval: 20
    TCP retry interval: 2
    Number of attempts TCP: 5
    TCP keep alive interval: 20

    (b) research rules

    Priority Name of the rule Protocol Source Authentication required Mode Type of rehearsal Pattern string Behavior model On match Goal
    50 LocalZoneMatch Any Any NO. Any alias       Continue LocalZone.GetDaylightChanges
    100 Search of covered area rule Any Any NO. Any alias       Continue Covered area (server)
    150 Search for DNS zone rule Any All areas NO. Alias matching Regex (?. *@%localdomains%.*$).*) Leave Continue DNSZone

    (c) changes of

    Change the destination to the URI format alias
    Prefix
    ([^@]*)
    Replace
    ------[email protected] / * /

    Hey Denis,

    It seems that you might have some problems.

    • VCS - C you have a search rule that targets CUCM, but it does not perhaps not for you for 2 reasons.
    1. It's the same priority as your rule of research area of course which may cause routing loops. Change the rule for targeting priority CUCM 100 to something between 50 and 100.
    2. It will only forward calls to CUCM which begin with a 3 and are followed by 3 numbers ending by mydomain.fr(.*). If you are URI calls that do not match this pattern, they will not be sent to CUCM. Make sure to set your match of regex to include your models DN so that your schemas URI incase they are figure not URI.

    Make these changes, and you may have more luck. Make sure also that your CUCM is configured to allow the composition of the URI. Ensure that the device that you are calling has a URI configured on the line.

    Once you make these changes to retest a call. If that fails, send the history research of the failure of the attempt. You can find it on the VCS under status > Search History.

    -Chad

  • Is it possible to call a sub procedure event from outside the process?

    Hi all

    I was wandering if it is possible to activate a sub-process of event (started by an event message that is implemented by a 'set interface') by calling interface that seems exposed as a service?

    Or the sub-process of event can be triggered only by an activity that is executed in the same process, where is the event sub-process?

    Hi Clarec,

    If you expose your subprocess of event with an event of boot Message and you have to use a correlation set in the main part of the process, you can call it from outside the process by using the correlation key.

    Dan

  • How to choose a listItem from outside the list!

    Hello guys! I'm developing an application on the meetings, and I am experiencing a small problem. The thing is: in the application I need a list to respond to music. Explain better: I want the list to automatically change the selection when the music reaches a predetermined point. As in its stars, the first element should be selected and then when it gets to 10 seconds, It shoud jump to the next, and so. To do the checks on the position of the music, I use OnPositionChanged. It's the portion of code:

    onPositionChanged: {}
    > console.log ("BBBBBBBBBB")
    > >
    > var i = myModel.data (myModel.find(["topic1","1"]))
    > If (mediaPlayer.position > = {i.startTime})
    > listView.select (i, true)
    > console.log ("AAAAAAAAAAAAAAAAAAAAAAAAAAAA")
    > >
    > > }

    In this case, the list takes the data of the dataModel, and the first has the title Topic1 and a property named startTime which in this case, that I set to 1. If I launch the app, when the stars of the music and the first signal from the position has changed is sent, the console displays "BATH", then the check is effective, because the console displays "ADRAR", but nothing happens on the list and the point is not to get selected. I thought it might be an error in the "var I = myModel.data (myModel.find(["topic1","1"]))" part, but then I called console.log ("i.startTime") and the console.displays 1... so the only thing left is the listView.select part... Someone knows how to call a selection of items from outside the component list view?

    Welcome on the support forums.
    I suggest you re-read the API ListView/DataModel carefully.
    to call select, you need the path of the index.
    Data() returns the list item associated with the path of the index.
    Find() returns the index path, you must call select.

    Use a var to store the row, and then use that data() and select().

    and if I can offer a unrelated suggestion, 'i' use only for counter variables, use speaking names for others, for example "row".

  • Why my code does not perform outside the service?

    I have unfinished code, I'm getting. There is a listener and a function. I noticed when I put the loop outside the service (it would be less than the last line) it is not running. Why does not run the code as I type outside the service? I need to know for future reference

    Here's a piece of it

    function onLoaded(e:Event):void {}
    trace (e.Target.Data.Files);
    trace (e.Target.Data.images);

    fileData = e.target.data.Files;
    imgData = e.target.data.images;

    imgArray = imgData.split ('.jpg'), Table of images
    trace (FileData);
    trace (imgArray);
    for (var i: Number = 0; i < 15; i ++) {}
    trace (insArray [i] .source = path + "/" + imgArray [i] + "_tn.jpg");
    }

    }

    myTextLoader.load (new URLRequest ("info.txt"));

    Here are 2 examples:

    example 1:

    Import 12345678910111213import;
    var url: String = "Image.jpg";
    var bm:Bitmap;
    var loader: Loader = new Loader();
    loader.contentLoaderInfo.addEventListener (Event.COMPLETE, completeHandler);
    var request: URLRequest = new URLRequest (url);
    Loader.Load (request);

    function completeHandler(event:Event):void
    {
    BM = bitmap (Event.Target.Content);
    trace (WB);    //<-  you="" get="" :="" [object="">
    }

    example 2: (just change the location of trace (bm)

    Import 12345678910111213import;
    var url: String = "Image.jpg";
    var bm:Bitmap;
    var loader: Loader = new Loader();
    loader.contentLoaderInfo.addEventListener (Event.COMPLETE, completeHandler);
    var request: URLRequest = new URLRequest (url);
    Loader.Load (request);

    trace (WB);    //<-  you="" get="" :="">

    function completeHandler(event:Event):void
    {
    BM = bitmap (Event.Target.Content);
    }

    same code as an example 2:

    Import 12345678910111213import;
    var url: String = "Image.jpg";
    var bm:Bitmap;
    var loader: Loader = new Loader();
    loader.contentLoaderInfo.addEventListener (Event.COMPLETE, completeHandler);
    var request: URLRequest = new URLRequest (url);
    Loader.Load (request);

    function completeHandler(event:Event):void
    {
    BM = bitmap (Event.Target.Content);
    }

    trace (WB);    //<-  you="" get="" :="">

    as you can see it's okay where the function is written. That the function runs only after the load event is over. If the layout in the sample 2 and 3 line will result as null because at that time the loading process has just begun...

  • How to delete a selected line using a button located outside the datagrid in flex4 mxml application

    Hi friends,

    I'm new to flex, I use flex4 mxml application, I have my doubts... Help, please.

    My requirement is that I use a grid.i of data data should this datagrid from another window contextual and recorded the details datagrid now, too, I want to remove a record from a data grid

    I use a datagrid. a save button and remove the two buttons are placed outside the grid of data. so once I click on a row of the data grid and click on remove the medium button this record should delete data grid.


    All codes suggession and extract are welcome.

    Thanks in advance,

    B.Venkatesan

    Hello

    This code can help you:

    http://www.Adobe.com/2006/mxml"layout ="absolute"viewSourceURL =" srcview/index.html">"

    Import mx.controls.CheckBox;

    Import mx.collections.ArrayCollection;

    Import mx.controls.Alert;

    public var dp:ArrayCollection = new ArrayCollection();

    public void addRow (): void

    {

    var tmp:Object = new Object();

    tmp ["amount"] = 100;

    dp.addItem (tmp);

    }

    public function delRow (): void

    {

    If (dgFee.selectedIndex! = - 1).

    dp.removeItemAt (dgFee.selectedIndex);

    }

    ]]>

    Thank you and best regards,

    -----------------------------------------------------------------------------------------

    Vibhuti Gosavi . [email protected] | www.infocepts.com

    -----------------------------------------------------------------------------------------

  • Can the iPad reset my new email password from outside the material?

    I used my mini iPad more than 2 years. A day ago I had to change my password main e-mail through my office due to some strange events in my account. My Android phone has stopped receiving emails after that; I have to reset the password in it. I thought I have to reset my iPad, too, but it seems that the emails always get through, as if nothing had happened. Is this normal? How could the iPad reset my password by email directly from the e-mail box, to outside the material? Is it considered normal?

    I've never been through this. To change the email password, you will need to go into settings, messages, contacts and calendars and manually change them

  • Change the folder of default reports from outside the sequence editor

    Hello

    I want to set the path to the folder of the regular reports of TS (xml) outside the sequence editor, i.e. in a txt file. I would like to load this value in the sequence or the performance of model sequential (to read this file). Play with what I achieved only copy reports to different my folder both outside. No one knows how to correctly do this operation?

    See you soon,.

    K

    I have accomplished this setting the path of the report dynamically, using the ReportOptions reminder in my process model.

    I had set the following report options:

    Parameters.ReportOptions.DirectoryType = "SpecificDirectory".

    Parameters.ReportOptions.Directory = 'C:\\Program Files\\Functional Test\\Reports\\' + Parameters.UUT_PN

    Parameters.ReportOptions.BaseName = 'report '.

    Parameters.ReportOptions.UseFormatForExtension = TRUE

    Parameters.ReportOptions.Extension = «»

    Parameters.ReportOptions.ReportFilePath = «»

    Parameters.ReportOptions.NewFileNameForEachUUT = TRUE

    Parameters.ReportOptions.AddTimeAndDateToFileName = TRUE

    Parameters.ReportOptions.GeneratePath = TRUE

    arameters. ReportOptions.Format = "html".

    The second entry above, I set the directory based on the number of game USE which is analyzed by the operator.  So in your case, you will need to set the "Parameters.ReportOptions.Directory" item based on a path read you a text file.   According to the structure of your text, file, get the path of the report (from file) could be done in a few differnet ways...

    Thank you

    Paul Holzrichter

  • OE will not open emails from outside the application

    I use XP and OE. Suddenly, I started having Live Mail instead of open emails from OE I copied files outside the mail store.

    THUS, instead of simply getting rid of Live (I never use it) I changed the 'open with' back to EO. But he did open OE, not real email. It has been the opposite - I could open the email regardless.

    Now that I've removed the Live, I'm stuck with the change I made. DOH.

    Can someone tell me how to make an email open with OE again. Addition to the line of command after .exe or something?

    Thank you

    'S done it by gremlins. Happy that you fixed it.

  • Toolbox for CreateJS: how to control the main timeline from outside the canvas.

    Hey everybody,

    I'm currently doing something simple, but my animation film breaks whenever I try to change my code. I created a basic animation in Flash where an object moves from the left side of the canvas, to the right and then loops of the last frame of the first image. Nothing else. The animation is simply placed on the main timeline. I exported the animation with the Toolbox for CreateJS through the extension of the Flash and animation series as it should. I'm trying to start and stop (reboot of the first image) the animation with the mouse on and off mouse events. I want that the events to fire when wriggling over/stop a div outside the animation canvas tag. Is this possible with CreateJS? I'm trying to find a way to control the main timeline without being inside the canvas tag.

    HTML example:

    http://www.thephotoncore.com/testing/example_test.html

    Example Code:

    < id article 'container' = >

    < canvas id = "canvas" width = "550" height = "400" style = "background-color: #cccccc" > < / canvas >

    < section id = "animation_control" >

    < p > hover over to start and stop animation. < /p >

    < / section >

    < / section >

    Thanks again for the help!

    -DJ

    Hi DjPhantasy5,

    All the clips on the scene are children of the scene,

    So now the "mouseover" all clips on the stage could be stopped with stop and on the "mouseout/mouseouthandler()" all the children could be restarted with gotoAndPlay like this:

    function Stop()

    {

    If (stage & stage.children)

    {

    var t = stage.children.length;

    for (i = 0; i< l;="">

    {

    child var = stage.children [i];

    If ('stop' in child)

    Child.Stop ();

    }

    }

    }

    function Restart()

    {

    If (stage & stage.children)

    {

    var t = stage.children.length;

    for (i = 0; i< l;="">

    {

    child var = stage.children [i];

    If ("gotoAndPlay" children)

    child.gotoAndPlay (0);

    }

    }

    }

    See http://www.liauw.nl/forums/adobe/djfantasy5/index.html

    But it is also possible to expose "ball1", for example, by adding it to the document.

    This can be done by adding the code for "ball1" as follows:

    / * js

    document.ball1 = this;

    */

    Then stop the animation would look like:

    function Stop()

    {

    If ('ball1' in the document)

    document.ball1.stop ();

    }

    etc.

    Have fun!

    Ronald

  • Lightbox Gallery, move the prev/next buttons to outside the area of the Gallery

    Hello

    I want to change the appearance of the buttons 'next' and 'prev' to simple arrows and move them outside the big picture that opens when you click the thumbnail, so that no part of the big picture is covered by these buttons.  Creating images of the arrow are easy, but I still have a lot to learn when it come to dealing with scripts.

    What part of the script that I have to change to move the location of the place where he buttons to the top?

    Julie726 wrote:

    In fact, I have always a problem getting these buttons to display before I worry about moving their positions.

    They were transferred to the correct locations.  I can't understand why they are not displayed.

    They are not displayed because the link to these buttons points to a 'pictures' folder (lowercase I) but they are stored on the server in the folder 'Images' (capital I).

    http://www.julieappelt.com/images/lightbox/lightbox-BTN-close.gif does not work

    http://www.julieappelt.com/images/lightbox/lightbox-BTN-close.gif work

    It is generally best to avoid mixing cases when naming files and folders to avoid these problems, esp on Linux servers. Stick to all lowercase.

  • Rebound from outside the screen area.

    I have three image controls that I use as buttons.  Complete creating the application, I want to use the rebound effect to raise these buttons at the bottom of the screen - outside the screen area.  When I put my starting position to keep it outside the screen area, the page displays scroll bars and once images bounce in place, they disappear.


    This is not an attractive effect.  How can I bounce these controls with a starting outside the area of the screen position and avoid the scroll bars?

    Try setting includeInLayout = false on the buttons until they hit their final

    position.

    If that doesn't work, try to put the buttons in a Web and set the

    width/height of the canvas before you place and animate buttons.  You

    perhaps also the minHeight value = 0 on the canvas.

  • Array.push outside the service?

    I use the new beta of Flash Builder to set up a quick proof of concept. You see problems with the code below?

    < fx:Script >

    <! [CDATA]

    private var contentArray:Array = new Array();

    contentArray.push("content/1.mov");

    contentArray.push("content/2.mov");

    contentArray.push("content/3.mov");

    []] >

    < / fx:Script >

    This returns with 1120: access of undefined property contentArray on all 3 lines where I use .push.

    It works if I complete the table inside a function, but I don't really understand why or what would be the difference. All the help you can give would be appreciated.

    Thank you

    Brian

    You're only really supposed to declare (and optionally initialize) variables outside the function.

    The code outside of functions is used to define the class.  It does not run "up and down" as the code inside functions.

    Sorry, I wish I had a better explanation than "your just not allowed to do it"... "

Maybe you are looking for