Applescript "go to" command or pull variables from script?

Is there a "go to line" command in Applescript?  I want to be able to create a dialog box to jump back to the previous box if a mistake was made.  I don't want to do a repeat because that will cause multipule chained repeats and it won't work.  I tried creating seperate scripts and that works fine for jumping around within the program.  But the variables get lost when a new script is ran.  is there a way to bring variables from other scripts into one script?

This is what I have right now.  as you can see there are 3 variables that carry the needed info.  U
ltimatley I'd like to have about 8 variables, all with different info. 
I can do a repeat for each one until something is entered, but I cant do a back command for each entry. 
That's the purpose for the "run 'script'" line in each section.  I'd have to do a repeat inside of a repeat and then overlapping repeats. 
It won't let me do overlapping repeats.  what's the solution?
run script fn
script fn
          set first_name to ""
          set fName to display dialog "first name" default answer "" buttons {"cancel", "next"} default button "next"
          set first_name to text returned of fName
          if first_name = "" then
  run fn
          end if
end script
-- Last Name
run script ln
script ln
          set last_name to ""
          set lName to display dialog "last name" default answer "" buttons {"back", "cancel", "next"} default button "next"
          if button returned of lName = "next" then
                    set last_name to text returned of lName
          else if button returned of lName = "back" then
  run fn
          end if
          if last_name = "" then
                    run ln
          end if
end script
-- street number
run script sn
script sn
          set s_num to ""
          set sNum to display dialog "street number" default answer "" buttons {"back", "cancel", "next"} default button "next"
          if button returned of sNum = "next" then
                    set s_num to text returned of sNum
          else if button returned of sNum = "back" then
                    run ln
          end if
          if s_num = "" then
                    run sn
          end if
end script
-- ready steady write!
display dialog first_name & last_name & s_num

Similar Messages

  • Scripting - Passing and Enterprise variable from script to script

    Hello all,
    We are using UCCX 7.0_SR5
    I am looking to be able to pass a captured variable from one script to another.
    We use a message in queue where a caller waiting in queue can choose to leave a message and then that message is queued back into the sytem for the next available agent. When that agent recieves the message in queue they basically call back out to the customer leaving the message.
    We capture a variable in the first script when they decide to leave a message. The variable holds the call back number that they enter into the system. There is a second script that presents these message in queue calls to the agents. We would like to pass that variable that holds the number enterend by the customer to the second script so that that number appears on CAD in the enterprise data fields. The reason behind this is so the agent has a number to call back in the event they don't reach anyone when the system calls back out and the message left by the customer does not contain a call back number.
    How can I pass that variable from one script to another so it can be presented in CAD for the agents?
    Thanks for any help and let me know if you need any further information.

    You would use a "Get Call Contact Info" step to set your callerID variable, where the "Calling Number" attribute is set to your callerID variable.

  • Insert variables from script into HTTPService url

    I'm trying to insert values from script into a HTTPService
    url. How do I go about doing this? I tried the code below, but it
    gives an error. Can anybody help?
    <mx:HTTPService
    id="httpCall"
    url="
    http://api.service.com/user/{userName}/list?count={apiCount}&offset={(apiOffset)}&sort={ap iSort}&appkey=1234"
    resultFormat="e4x"
    result="callHandler(event);"
    fault="httpFaultHandler(event);"
    showBusyCursor="true"
    />
    <mx:Script>
    <![CDATA[
    import mx.controls.Alert;
    import mx.rpc.events.FaultEvent;
    import mx.rpc.events.ResultEvent;
    [Bindable]
    private var userName:String = "myName";
    private var apiCount:uint = 10;
    private var apiOffset:uint = 0;
    private var apiSort:String = "desc";

    Set the HTTPService properties in an AS function.
    <mx:HTTPService id="httpCall" resultFormat="e4x" ...
    result="callHandler(event);" ...../>
    private function getUserData():void
    var sURL:String = "
    http://api.service.com/user/"
    _ userName + "/list:;
    var oRequest:Object = {count:apiCount,offset:apiOffset,
    sort:apiSort, appkey:"1234" }
    httpCall.url = sURL;
    httpCall.send(oRequest);
    Tracy

  • Pull variable from outside of OBIEE?

    Hi,
    say I have a .NET, Java or Javascript form which I embed in OBIEE simply by having the web form in a OBIEE portal as embedded content.
    Is it possible to get a report to 'see' the variables in the form??
    thanks for your time,
    Robert.

    Hi Joe,
    my 'requirement' is more that I have on a single OBIEE page;
    1. Non OBIEE web form which is dual purpose; -
    a. To act as parameters to restrict and remodel data in results of 2 below.
    b. On press of a button <Store Result> the web form stores the data and effects a mass data change based on paramters and modelling values
    2. A simple OBIEE report which has its data restricted cf 1a above and its data remodelled cf 1b above
    Ideally I would like to do it all in OBIEE but (I am in 10g - please tell me if you think 11g changes the picture significantly); -
    1. Prompts are okay, but not flexible enough for what I am trying to achieve
    2. Postback is okay, but I would like pre-database validation - I can do it via a trigger, but there is no way to propogate back error messages and I would rather prevent errors with the web form, than need to prevent them
    Hence my reason for considering this hybrid solution, BUT - please suggest if you think there is a vastly superior way to do this??
    thanks for your input,
    Robert.

  • What is command to format variables in script layout?

    Hi all,
    Can anybody let me know, What is the command we use to format the varialbles in script layouts?
    like if i want to delete leading or trailing spaces(condence) from a variable in the layout, there are some command like (c) for condence
    But, i dont remember how to use it exactly. Can anybody help me on this?
    thanks

    Space Compression
    The symbol value is viewed as a sequence of u2018wordsu2019, each separated from the next by either one or a string of space characters. The C option has the effect of replacing each string of space characters with a single space and shifting the u2018wordsu2019 to the left as necessary to close up the gaps. Leading spaces are completely removed. The results are the same as those of the ABAP command CONDENSE.
    Syntax:
    &symbol(C)&
    Assuming ' Albert Einstein ' is the symbol value,
    &symbol& -> Albert Einstein
    &symbol(C)& -> Albert Einstein
    Regards,
    Joy.

  • Passing variables from Applescript to bash

    Hello,
    I'm trying to pass variables from Applescript to bash using the following code
    #!/bin/bash
    osascript <<EOF
    tell application "SystemUIServer"
    set username to text returned of (display dialog "Enter your name" with icon caution default answer ""  buttons{"Continue"})
    set macname to text returned of (display dialog "Enter name of your Mac" with icon caution default answer ""  buttons{"Continue"})
    do shell script "export USERNAME=" & quoted form of username & " && export MACNAME=" & quoted form of macname
    end tell
    EOF
    echo "USERNAME is $USERNAME, MACNAME is $MACNAME"
    but no luck
    Mac-mini:Downloads admin$./new.command
    USERNAME is , MACNAME is
    Any help would be greatly appreciated.

    I just realized you are returning 2 variables.  That can still be handled by echoing/printing the values, you just have to parse the output, or use other tricks.
    VALUES=( $(osascript -e '...') )
    This would make VALUES an array, with each array element containing one space separate return value from osascript
    USERNAME=${VALUES[0]}
    MACNAME=${VALUES[1]}
    If USERNAME or MACNAME could have spaces in them, you would need to use some kind of separator character.  For example if you use @ as the separator you could do something like:
    VALUES=$(osascript -e '...')
    USERNAME=${VALUES%@*}
    MACNAME=${VALUES#*@}
    which will %@* will delete everything starting with the @ til the end of the string, and #*@ will delete everything from the beginning of the upto and including the @.
    Another trick is to have the return values be properly formed shell variable assignments such as
    print "USERNAME='your user name' MACNAME='Your Mac Name' " -- I'm making this up as I do not really know Applescript, so you will have to figure out how to get Applescript to print something that looks like
    USERNAME='your user name' MACNAME='Your Mac Name'
    In your shell script you have code that looks like:
    VALUES=$(osascript -e '...')
    eval $VALUES
    The eval will execute whatever is stored in $VALUES, and if that happens to look exactly like shell variable assignments, you get the variables created in the current shell context, where can use them.

  • Command DML in variables IN/OUT from in functions/procedures

    I Use function variables IN/OUT.
    Is possible command DML in variables IN/OUT?
    Example:
    Create Function status (v1 out number, v2 out char, v3 in number) return is varchar2
    begin
    select col1, col2 into v1, v2 from table where col3=v3;
    return 'Sucess'
    exception
    when others then
    return 'ERROR';
    end;
    is command:
    select v1, v2 from table(cast(status(v1,v2,2)));
    Tanks!!

    CREATE OR REPLACE TYPE debito_typ IS OBJECT
    (cod_status_debito number(3),
    dat_situacao date,
    log_saldo_zero char(1)
    CREATE OR REPLACE TYPE debito_tabletyp AS TABLE OF debito_typ;
    FUNCTION status_atual2 (p_seq_debito IN sisarr.debito.seq_debito%TYPE)
    RETURN debito_tabletyp PIPELINED IS
    BEGIN
    begin
    FOR rec IN (select his.cod_status_debito
    ,his.dat_situacao
    ,sta.log_saldo_zero
    from sisarr.historico_debito his
    ,sisarr.status_debito sta
    where his.cod_status_debito = sta.cod_status_debito
    and seq_debito = p_seq_debito
    and seq_historico_debito = (select max(seq_historico_debito)
    from sisarr.status_debito s
    ,sisarr.historico_debito h
    where h.seq_debito = p_seq_debito
    and (h.sit_cancelado = 'N'
    and h.seq_historico_finalizacao is null)
    and h.cod_status_debito = s.cod_status_debito
    and s.log_altera_status_debito ='S')) LOOP
    PIPE ROW(debito_typ(
    rec.cod_status_debito,
    rec.dat_situacao,
    rec.log_saldo_zero));
    END LOOP;
    return;
    exception
    when no_data_found then
    dbms_output.put_line('Dados não encontrados');
    when Others then
    dbms_output.put_line('ERRO: '|| SQLERRM);
    end;
    END status_atual2;
    select * from table(sisarr.pk_visao_debito.status_atual2(12))
    This Solution!!
    Tanks!!

  • StringTokenizer to read in 4 variables from the command point

    Hi,
    I need to set up the Java StringTokenizer to read in 4 variables
    from a command prompt. It should be in the following format:
    X variable1 variable2 variable3where
    (is the command prompt)X (is either +, -, *, /, c, or e)
    variable1 variable2 and variable3 are integers.
    I would appreciate any answers that would help me find the way!
    Thanks in advance.

    Thank you for the code snippet, but the program does not function that way. Ie, it does not accept
    arguments when the program is first run, only after the program has excecuted.
    The program is to enter a simple command prompt, and await instructions in the form X int1 int2 int3
    where X can be c (convert the number int3 from number base int1 to number base int2), e (exit the
    program), +,-,/,* (add, subtract, divide or mutilply int2 to/by int3 in number base int1). Here is an example
    of the what the program execution should look like:
    c:\programming\java nbc
    > + 10 23 45 // Add 23+45 in base10
    68 // Write the answer on a new line and prompt
    - 16 5A 2C // Subtract 5A-2C in base 162E // Write the answer on a new line and prompt
    c 15 7 2E // Convert 2E in base 15 to base 762
    e // End of programc:\programming\
    My problem is, I do not know how to convert the first token to a variable that can be used to carry out one of
    the above mentioned procedures. For example, the first token taken from the command c 15 7 2E is "c".
    As I understand it, "c" is simply a string, and this cannot be used in logical procedures such as:
    int procedure = 0;
    if(operator == "c")
         procedure = 0;  //then use this variable
    }else
    if(operator == "e")
        System.exit(0): //quit the program
    Also, how can I set up a while loop to continuesly
    prompt the user for an instruction until "e" is entered?import java.io.*;
    import java.util.*;
    import java.util.StringTokenizer;
    public class blerk
         public static void main(String[] args) throws IOException
              InputStreamReader stdin = new InputStreamReader(System.in);
              BufferedReader br = new BufferedReader(stdin);
              boolean e = true;
              String str = "";
              String symbol = "";
              int value0 = 0;
              int value1 = 0;
              int value2 = 0;
              System.out.print(">");
              str = br.readLine();
              StringTokenizer st = new StringTokenizer(str, " ");
              int i = 0;
              int option = 0;
              while (st.hasMoreTokens())
                   switch(i)
                        case 0:
                             symbol = st.nextToken();
                             // This part is obviously not correct. How can this be implemented to select and store the operating procedure the user enters?
                             if(symbol = "e")
                                  System.exit(0);
                             }else
                             if(symbol = "c")
                             }else
                             if(symbol = "+")
                                  option =
                        break;
                        case 1:
                             value0 = Integer.parseInt(st.nextToken());
                        break;
                        case 2:
                             value1 = Integer.parseInt(st.nextToken());
                        break;
                        case 3:
                             value2 = Integer.parseInt(st.nextToken());
                        break;
                        default:
                             System.out.println("format: >operator x y z");
                        break;
                   i++;
              System.out.println(symbol + value0 + value1 + value2); //test
    Any advice would be most appreciated.
    Benjamin.

  • Expanding %1 and other variables from a command

    Hi!
    I need a simple command to open a specific file (rasphone.pbk) with whatever is the default program for opening text files.
    What I have so far:
    (Get-ItemProperty -Path 'Registry::HKEY_CLASSES_ROOT\txtfile\shell\open\command').'(Default)'
    Which gives me this output:
    "C:\Program Files\Sublime Text 2\sublime_text.exe" "%1"
    It will be executed for different machines/users. Some may only have the default notepad.exe, others may have different editors.
    So I now need to replace the %1 with
    %AppData%\Microsoft\Network\Connections\Pbk\rasphone.pbk
    while also expanding %AppData%. The default command is
    %SystemRoot%\system32\NOTEPAD.EXE %1
    where I would need to expand %SystemRoot% as well.
    It should be a 1-liner if possible because the command is stored in a database. If I need a script file I have to find a way to distribute that file to each client as well... and for simply opening a file that would be a bit too much.
    If it's easy in CMD that would be even better, but I thought Powershell is a capable tool for doing stuff like that in a simple way. I just can't wrap my head around it...
    thanks for any help! :)

    Use Exanded string to  store variable reference in the registry.
    You can do the easily with Regedit. You can export the key and import it on any machine with a click of the file.
    Indeed I can replace just the %1 and let the other variables be replaced by cmd.
    I actually got it working now without a script file (I really want to avoid using a file). this is the UI I have to work with:
    (Remote Desktop Manager)
    This is what I use now:
    cmd /K powershell -Command "((Get-ItemProperty -Path 'Registry::HKEY_CLASSES_ROOT\txtfile\shell\open\command').'(Default)').replace('%1','%AppData%\Microsoft\Network\Connections\Pbk\rasphone.pbk')" | cmd
    It is not pretty... calling cmd to call PowerShell and piping the output back to cmd to execute the command.
    I just can't find a way to execute the command including the parameters from a single string in PowerShell.
    If you can think of a better way please let me know...
    Thanks for the help!

  • Setting a variable from the output of a shell script

    I would like to use the output of the shell script "pwd" to populate a variable that I will then use to concatenate the argument to another shell script.
    Below is what I tried, but that didn't work.
    Any help is greatly appreciated.
    set currentDir to do shell script "pwd"
    do shell script "open " & currentDir & "/somedir/somefile"

    Does an applescript always run from "/" or from the directory in which the applescript file is run?
    From: http://developer.apple.com/technotes/tn2002/tn2065.html :
    Q: What’s the default working directory for do shell script commands?
    A: do shell script inherits the working directory of its parent process. For most applications, such as Script Editor, this is /. For osascript, it’s the working directory of the shell when you launched osascript. You should not rely on the default working directory being anything in particular. If you need the working directory to be someplace specific, set it to that yourself.

  • Unable to connect to the server to pull data from mysql

    Hello,
    I am novice working with Flash Builder 4 and I just created a test application which runs well in my computer pulling data from Mysql using PHP and populating a datagrid. But when I transfered it to the my hosting provider failed. I have been doing some modifications to the gateway.php and amf.config.ini to solve some of the issues. Now the application try to run but doesn't populate the data in the datagrid. I included a tracking point in my data service file to read the connections variables, but they come up in blank. I highly appreciate any help. Here are my gateway.php, amf.config.ini and the data service.
    gateway.php
    <?php
    ini_set("display_errors", 1);
    $dir = dirname(__FILE__);
    $webroot = $_SERVER['DOCUMENT_ROOT'];
    $configfile = "$dir/amf_config.ini";
    $fp = fopen("tracking.txt", "a");
    fwrite($fp, "1-config file " . $configfile . "\r\n");
    //default zend install directory
    $zenddir = $webroot. '/ZendFramework/library';
    //-$zenddir = $webroot;
    fwrite($fp, "2-default zendir" . $zenddir . "\r\n");
    //Load ini file and locate zend directory
    if(file_exists($configfile)) {
         $arr=parse_ini_file($configfile,true);
         if(isset($arr['zend']['webroot'])){
              $webroot = $arr['zend']['webroot'];
              $zenddir = $webroot. '/ZendFramework/library';
         if(isset($arr['zend']['zend_path'])){
              $zenddir = $arr['zend']['zend_path'];
    fwrite($fp, "3-after zendir" . $zenddir . "\r\n");
    // Setup include path
    //add zend directory to include path
    set_include_path(get_include_path().PATH_SEPARATOR.$zenddir);
    // Initialize Zend Framework loader
    require_once 'Zend/Loader/Autoloader.php';
    //-require_once 'Autoloader.php';
    Zend_Loader_Autoloader::getInstance();
    // Load configuration
    $default_config = new Zend_Config(array("production" => false), true);
    $default_config->merge(new Zend_Config_Ini($configfile, 'zendamf'));
    $default_config->setReadOnly();
    $amf = $default_config->amf;
    fwrite($fp, "4- configfile" . $dafault_config["production"] . "\r\n");
    // Store configuration in the registry
    Zend_Registry::set("amf-config", $amf);
    // Initialize AMF Server
    $server = new Zend_Amf_Server();
    $server->setProduction($amf->production);
    if(isset($amf->directories)) {
         $dirs = $amf->directories->toArray();
         foreach($dirs as $dir) {
             // get the first character of the path.
             // If it does not start with slash then it implies that the path is relative to webroot. Else it will be treated as absolute path
             $length = strlen($dir);
             $firstChar = $dir;
             if($length >= 1)
                  $firstChar = $dir[0];
             if($firstChar != "/"){
                  // if the directory is ./ path then we add the webroot only.
                  if($dir == "./"){                  
                       $server->addDirectory($webroot);
                  }else{
                       $tempPath = $webroot . "/" . $dir;
                        $server->addDirectory($tempPath);
              }else{
                      $server->addDirectory($dir);             
    fwrite($fp, "5-temp path" . $tempPath . "=>" . "\r\n");
    fwrite($fp, "******************************************" . "\r\n");
    // Initialize introspector for non-production
    if(!$amf->production) {
         $server->setClass('Zend_Amf_Adobe_Introspector', '', array("config" => $default_config, "server" => $server));
            $server->setClass('Zend_Amf_Adobe_DbInspector', '', array("config" => $default_config, "server" => $server));
    // Handle request
    echo $server->handle();
    ?>
    amf.config.ini
    [zend]
    ;set the absolute location path of webroot directory, example:
    ;Windows: C:\apache\www
    ;MAC/UNIX: /user/apache/www
    ;-webroot =c:/wamp/www/
    webroot = /home/frutiexp/public_html
    ;set the absolute location path of zend installation directory, example:
    ;Windows: C:\apache\PHPFrameworks\ZendFramework
    ;MAC/UNIX: /user/apache/PHPFrameworks/ZendFramework
    ;zend_path = /home/frutiexp/public_html/ZendFramework
    [zendamf]
    amf.production = true
    amf.directories[]=fb41/services
    ;amf.directories[]=./
    CoursesService.php
    <?php
    *  README for sample service
    *  This generated sample service contains functions that illustrate typical service operations.
    *  Use these functions as a starting point for creating your own service implementation. Modify the
    *  function signatures, references to the database, and implementation according to your needs.
    *  Delete the functions that you do not use.
    *  Save your changes and return to Flash Builder. In Flash Builder Data/Services View, refresh
    *  the service. Then drag service operations onto user interface components in Design View. For
    *  example, drag the getAllItems() operation onto a DataGrid.
    *  This code is for prototyping only.
    *  Authenticate the user prior to allowing them to call these methods. You can find more
    *  information at <link>
    class CoursesService {
         var $username = "myusername";
         var $password = "mypassword"
         var $server = "localhost";
         var $port = "3306";
         var $databasename = "frutiexp_trainsur";
         var $tablename = "courses";
         var $connection;
          * The constructor initializes the connection to database. Everytime a request is
          * received by Zend AMF, an instance of the service class is created and then the
          * requested method is invoked.
         public function __construct() {
                $this->connection = mysqli_connect(
                                              $this->server, 
                                              $this->username, 
                                              $this->password,
                                              $this->databasename,
                                              $this->port
    $fp = fopen("./tracking.txt", "a");
    fwrite($fp, "1-service".  $databasename . " " . $username . "\r\n");
    fclose($fp);
              $this->throwExceptionOnError($this->connection);
          * Returns all the rows from the table.
          * Add authroization or any logical checks for secure access to your data
          * @return array
         public function getAllCourses() {
              $stmt = mysqli_prepare($this->connection, "SELECT * FROM $this->tablename");         
              $this->throwExceptionOnError();
              mysqli_stmt_execute($stmt);
              $this->throwExceptionOnError();
              $rows = array();
              mysqli_stmt_bind_result($stmt, $row->cou_id, $row->cou_title, $row->cou_overview, $row->cou_objectives);
             while (mysqli_stmt_fetch($stmt)) {
               $rows[] = $row;
               $row = new stdClass();
               mysqli_stmt_bind_result($stmt, $row->cou_id, $row->cou_title, $row->cou_overview, $row->cou_objectives);
              mysqli_stmt_free_result($stmt);
             mysqli_close($this->connection);
             return $rows;
          * Returns the item corresponding to the value specified for the primary key.
          * Add authroization or any logical checks for secure access to your data
          * @return stdClass

    Hello Jdesko,
    Thank you for you prompt response. Yes, I have changed the connections variables in my dataservice ( I didn't post real values). You are right, after all I didn't make changes on the gateway.php except to add some tracking points. The one that I changed is the amf.config,ini. The application runs without any error exceptions, but don't populate the datagrid. According with the tracing is stoping just when establishing the connection to the database. Please let me know if you have any other clue. thanks

  • Pull data from a table in HTML format from external URL into a Servlet

    How do I pull data from existing website html table into a Servlet?
    I will need to pull the data into a servlet. So, the servelet will need to go to the URL and get the data and save them as variables.
    I know I will need an array to store the data. I just dont know how to call the URL and have the servelet search the site for the <table> </table>.
    I will later use this to save to a database.
    Thanks
    Edited by: DJMegabit on Apr 14, 2010 7:36 PM

    Maybe give us more details about what exactly You'd like to achieve. I guess that there might be better solutions to the problem.

  • Is it possible to pass a variable from one animation to another?

    I have multiple animations on the same page. I need to pass a variable from one to the other.
    Animation One has this:
    sym.setVariable("myVarOne", 1);
    Animation Two has this:
    var myVarOneInTwo=Edge.getComposition("EDGE-12345678").getVariable("myVarOne");
    Seems like it should work, but kinda hard to tell. I put in:
    console.log("myVarOneInTwo = " + myVarOneInTwo);
    But I get: Javascript error in event handler! Event Type = timeline
    So it seems that it doesn't like getting a variable from another animation.
    Is there a way to pull a variable from one animation into another?

    Sorry also had to fix this:
    var myVarOneInTwo=Edge.getComposition("EDGE-12345678").getVariable("myVar One");
    To this:
    var myVarOneInTwo=Edge.getComposition("EDGE-12345678").getStage().getVariable("myVar One");

  • Pass a Value to Variable from the unix environment in ODI (ELT)

    Hi
    i am very new to ODI environment.
    i want know how to pass a value to variables in oracle data integrator from unix environment.
    Example:
    Variable name : Sales
    for variable name sales i want to pass the value from unix environment.
    Regards,
    Raj
    Edited by: user11137587 on Aug 19, 2009 6:26 AM

    Work Around !
    You can execute OS commands using Jython script. Probably you need to flush your enviornment variables value into a file using jython script and then read those value into ODI variable from the file.
    BUt may I know why you want to read environment variable vaules in ODI, Dont you think this will make your application less portable
    Regards,
    Amit

  • Simple Task - Syntax Question (how do you pass variables from one component to another component - databinding)?

    Hi all,
    I'm trying to pass some width/height/URLs from a Video Player component to a Social Bookmarking component's embed text input field. (for people to grab and share videos).
    I know this is a simple task, but it's the end of the day and I seem to be having a brain failure... What's the syntax to achieve this? Do I have to import the video player component? These widths/heights/URLs are all being dynamically generated from an XML... should I be pulling it from the XML or just reuse the variables that already exist in the Video Player component?
    Here's my code...
    Video Player:
    [Bindable]
    public var source:String = "";
    [Bindable]
    public var autoPlay:Boolean = false;
    [Bindable]
    public var fullScreenMode:Boolean = false;
    [Bindable]
    public var clipTag:String = "_movie";
    [Bindable]
    public var iag_code:String = "";
    [Bindable]
    public var officialURL:String = "http://www.movies.com/";
    [Bindable]
    public var referer:String = "unknown";
    [Bindable]
    public var gID:String;
    [Bindable]
    public var starterImageURL:String = 'http://www.movies.com/jazzmaster/images/default_starter_image.
    [Bindable]
    public var oldWidth:Number;
    [Bindable]
    public var oldHeight:Number;
    Sharing Component:
    <mx:HBox
      height="10%"
      horizontalCenter="-25"
      verticalCenter="0"
      paddingBottom="5">
      <mx:Text text="Embed Code:" paddingTop="1" color="#FFFFFF" fontSize="12"/>
      <mx:TextInput  text="{oldWidth}"/>
    </mx:HBox>
    The code above throws an error... "Attempted access of inaccessible property oldWidth through a reference with a static type com:SharingBookmarks."
    Thanks all!
    DK

    Try this..
    create a new flex project and add a folder called "src"
    create a new MXML component named "VideoComp.mxml" and copy/paste
    <?xml version="1.0" encoding="utf-8"?>
    <mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml" width="400" height="300">
    <mx:Script>
    <![CDATA[
    [Bindable]
    public var videoWidth:int = 300;
    [Bindable]
    public var videoHeight:int = 300;
    ]]>
    </mx:Script>
    <mx:Label text="Vidoe" />
    <mx:TextInput text="{videoWidth}" id="w" change="this.videoWidth = int(w.text);" />
    <mx:TextInput text="{videoHeight}" id="h" change="this.videoHeight = int(h.text);" />
    </mx:VBox>
    create a new MXML component named, "SharingComp.mxml" add copy/paste this..
    <?xml version="1.0" encoding="utf-8"?>
    <mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml" width="400" height="300">
    <mx:Script>
    <![CDATA[
    [Bindable]
    public var videoWidth:int;
    [Bindable]
    public var videoHeight:int;
    ]]>
    </mx:Script>
    <mx:Label text="Sharing Comp." />
    <mx:Label text="{videoWidth}" />
    <mx:Label text="{videoHeight}" />
    </mx:VBox>
    and here is the main.mxml file
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
    xmlns:src="src.*">
        <mx:Script>
            <![CDATA[
                private function doSomething():void
                 sharingComp.videoHeight = videoComp.videoHeight;
                 sharingComp.videoWidth = videoComp.videoWidth;
            ]]>
        </mx:Script>
       <src:VideoComp id="videoComp" />
       <mx:Button click="doSomething()" label="copy" />
       <src:SharingComp id="sharingComp" />
    </mx:Application>
    Hope this helps,
    BaBo,

Maybe you are looking for