Anchor Labels

I am looking for the best way/additional resources to link
from one .swf to another .swf but I am interested in targeting a
specific movie clip on the main time-line. Are anchor labels the
way to go?

I am sorry I was referring to two separate .fla's (main.fla
& links.fla). I want the main.fla's navigation bar to link to
the links.fla which has all the movie clips that I want to link to.
I would put it all in one file however I think there is no way
around the file size so I am having to create two fla files.
Thanks for the link I am sure that'll help in the near
future.
Peter

Similar Messages

  • Best practice for using anchor labels?

    I am looking into using anchor labels for the first time and
    I am thinking I cant use them for this site because I am using xml
    and other variables that are being passed in on the first frame but
    maybe there as a chance that it still works. So I would like to
    know the best ways to use anchor labels. Someone who has used them
    please let me know.
    Thanks,
    Randy

    I've used anchor tags in Dreamweaver a lot, but never in
    Flash

  • Anchor netui repeater

    Hi,
    Im new to netui and im using a repeater which has an anchored label. The process is to hide the sub component of the div part using netui anchor tag.
    It seems that i cannot pass the value of the div within the my javascript to do the hiding and showing of the sub components
    Below is my javascript code and netui code
    <br>
    function showHideAddProdServAndSel(cartItemCode){
    var bolExpand = false;
    alert(cartItemCode);
    for(i=0;i<planArr.length;i++){
    if(planArr==document.getElementById(cartItemCode).innerHTML){
    alert("testing");
    if(document.getElementById(planArr[i]).style.display="none"){
    document.getElementById(planArr[i]).style.display="block";
    }else{
    document.getElementById(planArr[i]).style.display="none"
    return false;
    <!-- Html Netui code -->
    <netui-data:repeater dataSource="{session.ShoppingCart.itemList}">
    <netui-data:repeaterItem>
    ----------------------- <br>
    <netui:anchor href="#" style="text-decoration: underline; color: blue;" onClick="javascript:return showHideAddProdServAndSel(getNetuiTagName('item01'));">
    <netui:label styleClass="portlet-section-body-label"value="Product Type :"/><netui:label value="{container.item.productType}"></netui:label>
    </netui:anchor>
    <br>
    <div id="<netui:content value="{container.item.cartItemCode}"/>" style="display:none">
    <netui:label styleClass="portlet-section-body-label"value="Plan Name :"/>
    <netui:label style="color:#996600;font-size:11px;" value="{container.item.cartItemCode}" tagId="item01">
    </netui:label>
    <br>
    <netui-data:repeater dataSource="{container.item.packageList}">
    <netui-data:repeaterItem>
    <netui:label styleClass="portlet-section-body-label"value="Plan Name :"/><netui:label style="color:#996600;font-size:11px;" value="{container.package.plan.description}"></netui:label><br>
    <netui:label styleClass="portlet-section-body-label"value="Monthly :"/><netui:label style="color:#996600;font-size:11px;" value="{container.package.plan.rate}"></netui:label><br>
    <netui:label styleClass="portlet-section-body-label"value="Upfront :"/><netui:label style="color:#996600;font-size:11px;" value="{container.package.plan.upFrontNonRecurringCharge}"></netui:label><br>
    </netui-data:repeaterItem>
    </netui-data:repeater>
    </div>
    </netui-data:repeaterItem>
    </netui-data:repeater>
    Message was edited by:
    skylock

    Hi,
    You should be able to achieve this using the netui-data:getData tag.
    This tag is capable of binding the value of an xScript reference to an attribute in the pageContext. Having put the value in context, you should be able to set it anywhere.
    sample :
    <netui-data:getData resultId="idx" value="{container.index}"/>
    should place the value in pagecontext, access this by
    <%
    pageContext.getAttribute("idx");
    %>
    http://e-docs.bea.com/workshop/docs81/doc/en/workshop/taglib/www.bea.com/workshop/netui-tags-databinding-1.0/getData.html
    - Anders M.

  • Align objects to text paths?

    Hi all,
    I don't know if this is possible at all in Illustrator, but I want to align objects to text paths. Look at the following example to get an idea what I mean.
    I start with something like a circular hierarchy, that I get as an output from another program. These are only lines and text. Now I want to add a flag behind the text. This flag should have the same orientation as the text path.
    As this hierarchy is actually pretty big (this is only a snippet), I don't want to rotate all the flags manually. I tried to do it manually with the below example, but it still doesn't looks right...
    Does anyone know, if there is a proper method to rotate the flags according to the orientation of the text paths in Illustrator? Any help is much appreciated!

    I don't know of more automated way  than doing it manually. However you can make the rotation precise using the smart guides. Assuming the text is live (not outlines), this is how I would do it:
    Make sure on the View menu, there is a checkmark in front of Smart Guides (Ctrl+U)
    With a text object selected, pick the Rotate tool (R), find, and click the anchor point of the text object which will be at the left bottom side if the text is left aligned. The Smart Guides will show an "Anchor" label when the mouse cursor is over it.
    Then, away from the Anchor point, click and drag the path of the text object to rotate it until aligned horizontally or vertically to the artboard which will be indicated by the Smart Guides displaying a straight horizontal or vertical line.
    Hold Ctrl key down temporarily to switch to a selection tool and click with it the flag you want to rotate.
    Release the Ctrl key to get back to the Rotate tool and press the Enter key on your keyboard to get the Rotate dialog.
    Change the Angle value to positive if it is negative and negative if it is positive and press the OK button. On a pc you can do all of this step with three keyboard keys instead of the mouse if you press first the Home key, then Delete or Minus for changing the value to positive or negative, and finally press Enter to apply and close the dialog. The flag is now rotated with the same angle as the original orientation of the text.
    Cut (Ctrl + X) the flag, and Undo (Ctrl + z) a few times until you go back to the original orientation of the text.
    Paste (Ctrl + V) to get a copy of the rotated flag and position it in place. I can see that your skills with position the flags are much better than aligning the orientation and I don't think you need more complicated way of doing it.

  • Passing parameters between mxml files(used in viewstack).

    Hi All,
       In login page, I'm calling RemoteObject method for validating user credentials. In login success, I'd like to keep user name in a variable and call menu page where it is having menu for the application. In menu.xml file, I'm putting home tab is a default selection.
        Depending upon login username it should fetch data for displaying DataGrid in home page. Please find my code
       //Login Page Begin(login.mxml)
      <mx:Script >
            <![CDATA[
       private function login_resultHandler(event:ResultEvent):void
                    userdetails = event.result as ArrayCollection
                    Alert.show("userdetails 0:",userdetails.getItemAt(0).toString());
                    Alert.show("userdetails 1:",userdetails.getItemAt(1).toString());
                    if(userdetails!=null && userdetails.length>=1)
                        login_ViewStack.selectedIndex=1;
                    else
                        loginmessage.visible=true;
    ]]>
        </mx:Script>
       <mx:ViewStack x="0" y="0" id="login_ViewStack" width="100%" height="100%" creationPolicy="all" borderStyle="solid">
            <mx:Canvas label="loginpage" width="100%" height="100%">
                <mx:Form x="213" y="137" height="153" width="348">
                    <mx:FormItem width="262" required="false" height="25" label="Username: " fontSize="14" fontWeight="bold">
                        <mx:TextInput id="username_text"/>
                    </mx:FormItem>
                    <mx:FormItem label="Password: " fontSize="14" fontWeight="bold" width="262">
                        <mx:TextInput id="password_text" displayAsPassword="true" enter="ro_login.checkLogin(username_text.text,password_text.text);"/>
                    </mx:FormItem>
                    <mx:FormItem width="265">
                    </mx:FormItem>
                    <mx:FormItem width="251" label="" horizontalAlign="center">
                        <mx:Button label="login" click="ro_login.checkLogin(username_text.text,password_text.text);"/>
                    </mx:FormItem>
                </mx:Form>
                <mx:FormHeading x="213" y="109" label="Login Page" width="124" fontWeight="bold" fontSize="16"/>
                <mx:Text x="213" y="83" text="Invalid Username and password" id="loginmessage" color="#F43D13" fontSize="16" fontWeight="bold" visible="false"/>
            </mx:Canvas>
            <local:menu id="menu_setup" label="" xmlns:local="*"/>
            </mx:ViewStack>
       //Login Page End
       In checkLogin method, it is validating username/password. and I'm selecting view stack '1' for displaying menu.
      //Menu Page Begin(menu.mxml)
      <mx:Script >
             <![CDATA[
    public function init(): void{        
                myViewStack.visible=true;
                selectedmenu="HOME";
    ]]>
         </mx:Script>
      <mx:Panel  width="100%" height="100%" layout="absolute">
            <mx:ToggleButtonBar id="mainmenu" width="60%" height="39" itemClick="fillsubmenu(event);" dataProvider="myViewStack" buttonMode="true" autoLayout="true" styleName="mystyle" x="118"/>
            <mx:ViewStack id="myViewStack" borderStyle="solid" width="100%" height="465" creationPolicy="all" visible="true"  y="67" x="10">
                <local:home id="page1" label="HOME" xmlns:local="*"/>
                <local:newcontact id="page2" label="NEW CONTACT" xmlns:local="*"/>
                <local:search id="page3" label="SEARCH" xmlns:local="*"/>
                <local:help id="page4" label="HELP" xmlns:local="*"/>
            </mx:ViewStack>
        </mx:Panel>
    </mx:Canvas>
      //Menu Page End
      //HOME Page Begin(menu.mxml)
      <mx:RemoteObject id="ro_records" destination="inquiryService" result="getInquries_resultHandler(event)"
                         endpoint="http://localhost:7001/flexbb/spring/messagebroker/amf">
            <mx:method name="getInquires" result="getInquries_resultHandler(event)"/>
        </mx:RemoteObject>
        <mx:DataGrid id="dg" width="100%" height="100%">
                <mx:columns>
                    <mx:DataGridColumn dataField="inquiry_id" headerText="Report Id"/>
                    <mx:DataGridColumn dataField="inquiry_type" headerText="Report Type"/>
                    <mx:DataGridColumn dataField="full_name" headerText=" Consumer Name"/>
                </mx:columns>
          </mx:DataGrid>
      //HOME Page End
       I'm having following questions:
       How to keep username in session scope. Need to be accessed in all pages.
       How to pass username from login page to home page.
       In HOME page, if I mention 'creationComplete="ro_records.getinquires()"' it will be invoked when I call login.mxml file, so how to invoke getinquires() method passing username when login is successful.
       Thanks in advance.
    Regards,
    Sharath.

    If this post answered your question or helped, please mark it as such.
    To keep username in session scope, so it can be accessed in all pages, and to pass the user name from login to home page, you use custom events, as in my example application. The Flex project archive is attached, but here is the code:
    -------------- assets\css\appHeader.css -----------------
    /* CSS file */
    .welcomeLabel{
      fontSize: 20;
      color: #FFFFFF;
      left: 50;
      verticalCenter: 0;
    .titleLabel{
      horizontalCenter: 0;
      verticalCenter: 0;
      fontSize: 24;
    .loginButton{
      right: 30;
      verticalCenter: 0; 
    ---------------- com\westernstates\classes\controller\WesternStatesController.as -------------------
    package com.westernstates.classes.controller
      import com.westernstates.classes.events.*;
      import com.westernstates.classes.model.*;
      import flash.display.DisplayObject;
      import flash.events.Event;
      import mx.core.UIComponent;
      import mx.events.FlexEvent;
      import mx.managers.PopUpManager;
      // This class forms the "controller" of the MVC (Model-View-Controller)
      // architecture used in this application. Rather than have code in the
      // application and in components, the MVC architecture relies on events
      // handled in the controller.
      // Extend UIComponent so this class has a reference to systemManager,
      // so all events that bubble can be handled.
      public class WesternStatesController extends UIComponent{
        // The constructor uses this classes creationComplete event
        // to call the setupEventListeners method to register events
        // with the controller that allow it to "control" much of the
        // application, and also to popup the Login form.
        public function WesternStatesController(){
          addEventListener( FlexEvent.CREATION_COMPLETE, init);
        // Add event listeners to the system manager so it can handle events
        // of interest bubbling up from anywhere in the application.
        private function init( event:Event ):void{
          systemManager.addEventListener(LoginEvent.LOGIN, login, true);
          systemManager.addEventListener(LoginSuccessEvent.LOGIN_SUCCESS, handleLogin, true);
          systemManager.addEventListener(LoginFailureEvent.LOGIN_FAILURE, handleLogin, true);
          login(new LoginEvent(LoginEvent.LOGIN));
        private function login(evt:LoginEvent):void{
          PopUpManager.addPopUp(WesternStatesModel.appLogin, WesternStatesModel.app as DisplayObject, true); 
        private function handleLogin(evt:LoginEvent):void{
          if(evt.type == LoginSuccessEvent.LOGIN_SUCCESS){
            WesternStatesModel.userInfo.userName = LoginSuccessEvent(evt).userName;
            WesternStatesModel.appHeader.currentState = "loginSuccess";
          }else if(evt.type == LoginFailureEvent.LOGIN_FAILURE){
            WesternStatesModel.appHeader.currentState = "loginFailure";
            WesternStatesModel.appLogin.reset();
    ----------------------- com\westernstates\classes\events\LoginEvent.as -----------------
    package com.westernstates.classes.events
      import flash.events.Event;
      /* This custom event is the base class from which other login related
       * events are derived. This makes it possible to dispatch a login related
       * event and set the loginEventType property, and then in the event handler,
       * check this property and execute based on the login event type.
       * In reality, extending this class doesn't really provide much additional
       * value, but from a conceptual standpoint it might make sense, and as we
       * develop the application further, we might develop this class further.
      public class LoginEvent extends Event{
        public static const LOGIN:String = "login";  
        public function LoginEvent(type:String){
          super(type, true);
    ------------------ com\westernstates\classes\events\LoginFailureEvent.as ------------------
    package com.westernstates.classes.events
      import flash.events.Event;
      // This custom event should be dispatched if the user fails to
      // successfully log into the application.
      public class LoginFailureEvent extends LoginEvent{
        public static const LOGIN_FAILURE:String = "loginFailure";  
        public function LoginFailureEvent(){
          super(LoginFailureEvent.LOGIN_FAILURE);
    ---------------------- com\westernstates\classes\events\LoginSuccessEvent.as -----------------
    package com.westernstates.classes.events
      import flash.events.Event;
      // This custom event should be dispatched if the user
      // successfully logs into the application.
      public class LoginSuccessEvent extends LoginEvent{   
        public static const LOGIN_SUCCESS:String = "loginSuccess"; 
        private var _userName:String;
        public function LoginSuccessEvent(userName:String){
          // Store the username for the user that successfully logged in.
          // The application can access the username from the event object.
          this._userName = userName;
          super(LoginSuccessEvent.LOGIN_SUCCESS);
        // A getter is necessary for the application to be able to access the private
        // variable containing the username for the user that successfully logged in.
        // A setter is unnecessary because the username is determined upon login
        // and there is no reason to change it.
        public function get userName():String{
          return this._userName;
    --------------------- com\westernstates\classes\misc\User.as -----------------
    /* This class is used to store information about the user currently logged in.
       The user's password should not be stored here. Currently only the username
       is stored in this class, but later we will add more data.
    package com.westernstates.classes.misc
      [Bindable]
      public class User
        // The public accessor methods (a getter and a setter) allow us to access this private variable.
        private var _userName:String;
        public function User(){
        public function get userName():String{
          return this._userName;
        public function set userName(user:String):void{
          this._userName = user;
    ------------------ src\com\westernstates\classes\model\WesternStatesModel.as ---------------
    package com.westernstates.classes.model
      import com.westernstates.classes.misc.*;
      import components.*;
      import mx.core.Application;
      // This class forms the "model" of the MVC (Model-View-Controller)
      // architecture used in this application. Data that would otherwise
      // be found in the application or component files are centralized here.
      public class WesternStatesModel{
        // This variable allows us to enforce having only one model object,
        // and provides an entry point to access the data in the model.
        private static var instance:WesternStatesModel;
        // This variable is a convenience obj allowing us to access the
        // main app children when necessary. It would be better to replace
        // this with an event, making even greater use of the MVC architecture.
        public static var app:Object = mx.core.Application.application;
        // This object is used to store information about the user currently logged in.
        [Bindable] public static var userInfo:User = new User();
        // References to UI components.
        public static var appHeader:ApplicationHeader = app.appHeader;
        public static var appLogin:Login = new Login();
        // Ensure only one instance of the model exists at any time (singleton).
        public function WesternStatesModel(){
          if( instance != null ){
            throw( new Error( "There can only be one instance of WesternStatesModel." ) );
        // This method is used throughout to access non-static variables of the model.
        public static function getInstance():WesternStatesModel{
          if( instance == null ){
            instance = new WesternStatesModel();
          return instance;
    -------------------- src\components\ApplicationHeader.mxml ----------------
    <?xml version="1.0" encoding="utf-8"?>
    <mx:ApplicationControlBar xmlns:mx="http://www.adobe.com/2006/mxml"
      width="100%" dock="true">
      <mx:Script>
        <![CDATA[
          import com.westernstates.classes.events.*;
          import com.westernstates.classes.model.WesternStatesModel;
          private function logInOut(evt:MouseEvent):void{
            if(evt.currentTarget.label == "Login"){
              this.dispatchEvent(new LoginEvent(LoginEvent.LOGIN));
            }else{
              this.currentState = "";
        ]]>
      </mx:Script>
      <!--
        This component is the docked control bar at the top of the application,
        where we display a welcome message upon successful login, or a login
        error message for login failure. We also have the main application
        title label, and utility buttons such as Logout/Login.
      -->
      <!--
        The external css file supports our architecture of separating the
        definition of the UI from style rendering.
      -->
      <mx:Style source="../assets/css/appHeader.css"/>
      <!--
        States allow us to control changes in the labels and buttons.
        State changes are managed by the controller class.
      -->
      <mx:states>
        <mx:State name="loginSuccess">
          <!--
            The binding braces { } are necessary to resolve the entire welcome
            string using hard coded pieces and the username in the model.
          -->
          <mx:SetProperty target="{welcomeLbl}" name="text"
            value="{'Welcome ' + WesternStatesModel.userInfo.userName + ' !!!'}"/>
          <mx:SetProperty target="{welcomeLbl}" name="visible" value="true"/>
          <mx:SetProperty target="{loginBtn}" name="label" value="Logout"/>
        </mx:State>
        <mx:State name="loginFailure">
          <mx:SetProperty target="{welcomeLbl}" name="text" value="LOGIN FAILED !!!"/>
          <mx:SetProperty target="{welcomeLbl}" name="visible" value="true"/>
        </mx:State>
      </mx:states>
      <!--
        Usually we would try to use auto-layout containers, such as VBox, HBox, etc.
        but the application header is a simple component and we want to anchor labels
        and buttons to the left and right sides of the component, or center them,
        and a Canvas and constraint based layout makes this easier. The constraint
        based layout settings are in the css file.
      -->
      <mx:Canvas width="100%" height="100%">
        <mx:Label id="welcomeLbl" text="Welcome !!!" visible="false" styleName="welcomeLabel"/>
        <mx:Label id="titleLbl" styleName="titleLabel" text="Western Gallery of Photography"/>
        <mx:Button id="loginBtn" label="Login" click="logInOut(event);" styleName="loginButton"/>
      </mx:Canvas>
    </mx:ApplicationControlBar>
    ------------------- src\components\Login.mxml -------------------
    <?xml version="1.0" ?>
    <mx:Panel xmlns:mx="http://www.adobe.com/2006/mxml"
      title="Login" horizontalScrollPolicy="off"
      verticalScrollPolicy="off" creationComplete="init();"
      defaultButton="{loginBtn}">
      <mx:Script>
        <![CDATA[
          import mx.controls.Alert;
          import com.westernstates.classes.events.*;
          import mx.collections.ArrayCollection;
          import mx.managers.PopUpManager;
          // This test username and password would not be here in a real application.
          private var testUser:String = "user1";
          private var testPwd:String = "testme";
          private function init():void{
            this.reset();
            PopUpManager.centerPopUp(this);
          public function reset():void{
            userTxt.text = "";
            passwordTxt.text = "";
          private function login(evt:Event):void{
            if(userTxt.text == testUser && passwordTxt.text == testPwd){
              this.dispatchEvent(new LoginSuccessEvent(userTxt.text));
              this.reset();
              PopUpManager.removePopUp(this);
            }else{
              this.dispatchEvent(new LoginFailureEvent());
              mx.controls.Alert.show("Login Failed!!!");
        ]]>
      </mx:Script>
      <!--
        Currently this login form is very basic. Later we will add validation,
        states, effects, etc.
      -->
        <mx:Form id="loginForm">
          <mx:FormItem label="Username:">
            <mx:TextInput id="userTxt"/>
          </mx:FormItem>
          <mx:FormItem label="Password:">
            <mx:TextInput id="passwordTxt"
              displayAsPassword="true"/>
          </mx:FormItem>
        </mx:Form>
        <mx:ControlBar horizontalAlign="center">
          <mx:Button label="Login" id="loginBtn" click="login(event);"/>
        </mx:ControlBar>
    </mx:Panel>
    ------------------ MainApp.mxml -------------
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
      xmlns:controller="com.westernstates.classes.controller.*"
      xmlns:comp="components.*" viewSourceURL="srcview/index.html">
      <!--
        Because we have broken this application into components, the main application
        file currently does not have much in it. It is possible to argue for simply
        defining the application header here in the main application file, but you
        might use it in other applications or components, so it is implemented as
        a separate component.
      -->
      <!-- The WesternStatesController class. It registers event listeners
        with the systemManager for events that will bubble up the display hierarchy.
        The controller is a non-visual class, although it does extend UIComponent
        so it is on the display list, but it has no visual elements. -->
      <controller:WesternStatesController/> 
      <comp:ApplicationHeader id="appHeader"/>
    </mx:Application>

  • Illustrator doesn't honor user selections.

    Hi there,
    There may be a setting to fix all of this, enlighten me if so:
    Why is that when I am working away in Illustrator CS6 or any previos version for that matter, when I go to select an anchor that is close to an edge, that edge is selected instead of the anchor that I am clearly trying to select. I understand that the discretion between the anchor and the separate edge is very small, but at any zoom level I should be allowed to "snipe" that anchor with my white arrow if I, the user, am able to differentiate between the two. Illustrator even differentiates between the anchor and edge, highlighting the anchor prominently enough to cue me to think, "Awesome, I can select this anchor", only to get the oh so common Adobe Rage when the edge sitting 10 pixels away is selected instead of said anchor.
    If there is a box that I can check that will end this nonsense, please send it my way. Thanks in advance for a big fix or quick fix!

    anchor_sore wrote:... Illustrator even differentiates between the anchor and edge, highlighting the anchor prominently enough to cue me to think, "Awesome, I can select this anchor", only to get the oh so common Adobe Rage when the edge sitting 10 pixels away is selected instead of said anchor.
    The little white square that shows when the mouse is over an anchor, means there is an anchor under the cursor but not necessarily this is what you will select if you click there. If there is an edge from another object in front and it is within the Selection Tolerance distance specified in the Selection & Anchor Display section of the Preferences, then this edge will be selected. Illustrator gives component selection priority first to the selected object and if there is no selection or multiple or all objects are selected, to the top most object in the stack. The Selection Tolerance is in monitor pixels, so if you zoom out so that the edge and the anchor are displayed on screen within the size of the monitor pixels defined as selection tolerance, Illustrator can't guess what you want to select and uses these priorities.
    You can fist select the object and then using the white pointer select an anchor from it. Also if you want a reliable feedback about what you will be selecting, turn the Smart Guides on from the View Menu and if it displays the 'anchor' label you will select an anchor when you click.

  • Spark Menu / Dropdown

    Hi,
    this question might be very simple, but I'm struggling around this problem for some time now.
    I'm trying to implement a menu in actionscript, but I've searched the flex4 docs and there's no Spark menu class. So I'm trying to change the behavior of the DropdownList to work the way I need it to: when you click it shows the options, but after selecting one of them it just performs the action, keeping the anchor label as before... basically a simple menu, since I don't need sub items (for instance, like the spellchecker menu on the top corner of this writing area).
    It seems a simples task, but I'm not succeeding on it, maybe I'm trying the hardest approach... I don't know if there's a property that do it by just setting a flag or something.
    I did some tweaks trying to extend and override the DropdownList and its skin, but the further I got was setting the initial value of the anchor (labelDisplay) on the skin, but after been selected it updates for the new value.
    Does anyone have any suggestions?
    thanks
    renan

    Sorry, I clicked "send" too soon.
    The problem is that the combobox opens its drop down menu but if you click on the scrollbar to get to the entries at the bottom of the list it simply disappears. Did anyone run into a similar problem? Does it have something to do with putting a spark component into an mx data grid?
    I am running out of ideas
    Thanks a lot!!!

  • Select a line then set size

    I know this seems to becoming at something backwards, but if I can do this it will make life easier for doing custom stripes for cars.
    I open a profile image of the particular car.
    I create my vector stripes on the image.
    Now...if I could draw a line of a known measurement on the graphic in illustrator (eg. between two doors) and then select that line (and the stripe graphic) and set the line to be a certain size (eg. 35 inches) and it would scale the rest of the stripe that would be a big help.
    Is there any way to do this?

    If your line is not perfectly horizontal or vertical you can also use this way.
    Turn the Smart Guides on. Pick the Line Segment Tool. With the Smart Guides snapping and showing the Anchor label, drag from point 1 to point 2 as shown in the image below with red. This will create an identical line as your original line. Press Delete on your keyboard to delete the line you just created. With the Line tool still selected, hold the Alt key and click on the first point you clicked before which is marked as 3 with red on the image. This will show the Line tool options box with the length of your current line and you can type the new length there. This will create a longer line on top of your original line. You will use this line along with your original line as a guide for scaling. You can change your new line with a different color and send it behind to see better the end of your original line. Select only the objects you want to scale without the lines. Select the Scale tool, first click on 1 to set the center of scaling then click and drag from 2 to 3 and your objects will be scaled with the same amount as your line.
    edit: The example assumes that you have already created an initial line. If not you can skip creating and deleting the identical line.

  • Get textFrame by label returns null and anchored objects

    I have the following two functions:
    function getByLabel(page, label)
        for(var i=0; i < page.allPageItems.length; i++)
            if( page.allPageItems[i].label == label )
                return page.allPageItems[i];
    and
    Object.prototype.findItems = function(/*obj*/props)
        if( !('everyItem' in this) )
            throw new Error("Error: " + this + " is not a collection.");
        var ret = this.everyItem().getElements(),
            i = ret.length,
            e, p;
        while( i-- && e=ret[i] )
            for( p in props )
                if( (p in e) && e[p]===props[p] ) continue;
                ret.splice(i,1);
        return ret;
    In my page structure, I got one main text frame (the content area) and two vertical text fromes on the sides of the page. There is also a small box textframe on top of the page. All these textboxes EXCEPT the main text frame are ALL "ANCHORED objects". I had to make them anchored objects, eitherwise after importing data, the boxes would jump around. (Example, the small box textframe that is on the top would get moved to the content area textframe etc). Not sure if using anchored objects is the proper way to fix this.
    When I try to get the small box text frame, it does not work using the findItems (returns null) but it works fine with the getByLabel method. Why is that?
    The calling syntax is:
    for( i=0 ; i < doc.pages.length ; ++i )
            var page = doc.pages.item(i);
            var textFrame = getByLabel(page, 'lblSection' ); //This works
            //   var textFrame = page.textFrames.findItems({ label:  'lblSection' })[0]; This does not work, returns null
            if( textFrame != null )
                textFrame.parentStory.contents = "";

    (function () {
        // Per the InDesign Scripting Guide, app.activeScript is only
        // valid when a script is directly executed from InDesign, not
        // from the ESTK, so a try/catch block is recommended to handle
        // it.
        var d;
        try {
            d = app.activeScript.parent.parent.fsName;
        } catch (e) {
            d = Folder.appPackage.parent.fsName+"/Scripts";
            return d;

  • How to display each anchor point number or label?

    Hello AI Community,..
                                      in an earlier Illustrator CS version, i was able to display any Paths' anchor point Numbers or label. But in CS6 with both "Anchor/Path Labels" enabled in Prefs. > Smart Guide section and in View > Smart Guides, no Point Numbers are displayed.
    Please let me know,..
    1) ..how to display each paths anchor point numbers or label?
    Thanks again for any help or suggestions,
    Jeff

    Thanks Kurt,..
                          just got in, checked and saw Measurment Labels, Anchor/Path Labels, Alignment Guides and Obj,Highlighting are all on. I also realized their working properly as "Anchor" and "Path" text labels display whenever moused over.
    But i can't remember how i enabled anchor point numeric display?
    Checked all menus i could find without luck.
    Any and all suggestions appreciated,
    Jeff

  • Unable to open local file using af:goLink and anchor link in JSF page.

    Hi,
    I want to open a file at a perticular location on client machine. I am using af:goLink to openg the file. But when i tried to click on the link it is not opening the file. If i give any other value like name of other site, it opens the link. It is not giving any exception also. I tried by puting notmal HTML anchor link. That is also not working. But if i put this anchor link in normal HTML page, it works.
    Following is the JSPX page that i have created. Here c:\dmmsi.log is a temp file on my local system.
    <?xml version='1.0' encoding='windows-1252'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
    <jsp:directive.page contentType="text/html;charset=windows-1252"/>
    <f:view>
    <af:document title="File Upload">
    <af:form usesUpload="true">
    File Uploader Test
    <af:inputFile label="Input File" autoSubmit="true"/>
    <af:spacer height="20" width="50"/>
    <af:goLink targetFrame="_new" destination="file:///c:/dmmsi.log" text="Test"/>
    <af:spacer height="20" width="50"/>
    <!--a id="you" href="c:\dmmsi.log" target="_new">Open File</a-->
    </af:form>
    </af:document>
    </f:view>
    </jsp:root>
    HTML Page i tried using anchor link
    <html>
    <body>
    <form>
    Please specify a file from your local machine</b>
    <input name="file" type="file" onblur="document.forms[0].hello.value = document.forms[0].file.value; document.getElementById('you').innerHTML =document.forms[0].file.value; document.getElementById('you').href = 'file://'+document.forms[0].file.value;">
    <br><br>
    <input type="text" name="hello" value="">
    <br><br>
    <!-- a id="you" href="c:\dmmsi.log" target="_new">Click Me to Open file< / a -->
    </form>
    </body>
    </html>
    (Note: Please remove the comments that i have added in creating anchor link. I was facing some issue in putting my code in this editor. It was creating the HTML link when i see the preview.)
    I hope you will be able to reproduce my problem.
    Sujay

    What version of IE are you using? IIRC, IE 7 is supposed to prompt you. ("The web site is attempting to open a page in your Trusted Zone. This can let hax0rs pwnz0r you. Continue?" or something to that effect.)
    If you use the verbatim tags, do you get an actual error message? That might help diagnose the problem.

  • Is it possible to have an anchored object linked to a paragraph style?

    I want to link an anchored object to a paragraph style, so that whenever a paragraph that has a particular style is created, an anchored object is created at the same time. The particular application is to label the associate text with the anchored object. is this possible?

    Here an example for a GREP search/replace:
    Search for the beginning of every paragraph + the first character:
    ^(.)
    Replace with the formatted contents of the clipboard + the found character:
    ~C$1
    Uwe

  • What's wrong with the anchor

    I would like to have the component in the following code on the top but it is always in the center, what is wrong with my anchor? Thanks for any help!
    private JPanel createParameterPanel(JLabel label, Component value) {
    JPanel panel = new JPanel();
    GridBagLayout gridBag = new GridBagLayout();
    GridBagConstraints c = new GridBagConstraints();
    panel.setLayout(gridBag);
    c.fill = GridBagConstraints.HORIZONTAL;
    c.anchor = GridBagConstraints.NORTH; // why anchor doesn't work?
    c.weightx = 1.0;
    c.gridwidth = GridBagConstraints.REMAINDER;
    c.gridheight = 1;
    c.gridx = 0;
    c.gridy = 0;
    gridBag.setConstraints(label, c);
    panel.add(label);
    c.gridy = 1;
    gridBag.setConstraints(value, c);
    panel.add(value);
    return panel;

    Change this:
    c.gridy = 1;
    gridBag.setConstraints(value, c);to this:
    c.gridy = 1;
    c.weighty = 1;
    gridBag.setConstraints(value, c);Thus, the lower component will take up all space in the Y-dimension that the upper component does not require. 'Anchor' is not necessary for the upper component. Try changing anchor to 'SOUTH' for the lower component and watch how it changes the layout.
    Mitch Goldstein
    Author, Hardcore JFC (Cambridge Univ Press)
    [email protected]

  • How can I add callouts on top of anchored images in CS6?

    I am using InDesign CS6 on a MacBook. I have multiple anchored images in a long document. Some of the images require callouts, such as labels or arrows, which should display on top of the image and should always stay with the image as if these items were also anchored. Is there a way to layer images in InDesign so that they are all anchored?
    I tried grouping the callout objects with the anchored object, but you cannot select an anchored object and other objects at the same time. I know in Word you can create an image canvas and add multiple items to that, and they are all grouped together. Is there a way to do that in InDesign? Or would I have to anchor each callout along with its corresponding image?

    Peter, your advice was very helpful. However, the text boxes (callout labels) that are included in the grouped objects get distorted once the grouped objects are anchored. Each text box shows the red +. When I expand the text box to fit content, the text box expands vertically so that all of the text is below the originally anchored object.
    The other callouts (just lines) stay in place perfectly.  Any insight into why the text boxes don't behave the same way that the lines do?

  • Anchor a button upper right in a panel?

    Have to anchor a button upper right in a panel.  Need it to stay anchored even when I use resize and move effects on the panel.  Want the button up top, not in the panel's content pane.
    The only way I know to get a button up there is to put it in the panel's titleBar.  If I want it to be anchored I'll have to put it in a container that supports constraints, like a Canvas, before putting it in the titleBar.  When I do this, constraints seem to go out the window.  They work somewhat but behave abnormally. 
    Here's a sample app (2 files) implementing this approach.  Compile and click the button down below.  The large panel with the button in its titleBar is supposed to shrink and hide behind the little video window.  It does, but the button in its titleBar doesn't go along for the ride.  It's not constrained.  Is there another approach to this?
    Main app file (constraints.mxml) followed by custom panel file (CustomPanel.mxml)...
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        xmlns:custom="*"
        layout="absolute"
        initialize="init()">
        <mx:Script>
            <![CDATA[       
                [Bindable]
                private var vidX:Number;
                [Bindable]
                private var vidY:Number;
                [Bindable]
                private var vidW:Number;
                [Bindable]
                private var vidH:Number;
                [Bindable]
                private var panelX:Number;
                [Bindable]
                private var panelY:Number;
                [Bindable]
                private var panelW:Number
                [Bindable]
                private var panelH:Number;
                private var open:Boolean = true;
                public function init():void
                    vidX = 20;
                    vidY = 20;
                    vidW = 180;
                    vidH = 120;
                    panelX = 202;
                    panelY = 20;
                    panelW = 500;
                    panelH = 350;               
                private function onButtonClick(e:MouseEvent):void
                    if(open)
                        inAndDownSize.play();
                        open = false;
                    else
                        outAndUpSize.play();
                        open = true;
            ]]>
        </mx:Script>
        <!--  Effects -->
        <mx:Parallel id="outAndUpSize"
            duration="200">
            <mx:Move
                target="{panel}"
                xFrom="{vidX}" xTo="{panelX}"/>
            <mx:Resize
                target="{panel}"
                widthTo="{panelW}" heightTo="{panelH}"/>   
        </mx:Parallel>
        <mx:Parallel id="inAndDownSize">
            <mx:Move
                target="{panel}"
                xFrom="{panelX}" xTo="{vidX}"/>
            <mx:Resize
                target="{panel}"
                widthTo="{vid.width}" heightTo="{vid.height}"/>
        </mx:Parallel>
        <!--UI elements -->
        <custom:CustomPanel id="panel"
            x="{panelX}" y="{panelY}"
            width="{panelW}" height="{panelH}"
            layout="absolute">
        </custom:CustomPanel>   
        <mx:VideoDisplay id="vid"
            x="{vidX}" y="{vidY}"
            width="{vidW}" height="{vidH}"/>
        <mx:Button
            label="Click"
            horizontalCenter="0"
            bottom="10"
            click="onButtonClick(event)"/>
    </mx:Application>
    CustomPanel.mxml...
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Panel xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="absolute"
        initialize="init()"
        creationComplete="onCreationComplete()">   
        <mx:Script>
            <![CDATA[
                import mx.containers.Canvas;
                import mx.controls.Button;       
                private var button:Button = new Button();
                private var canvas:Canvas = new Canvas();
                private var style:CSSStyleDeclaration = new CSSStyleDeclaration();   
                private function onCreationComplete():void
                    canvas.width = parent.width;
                    canvas.height = parent.height;               
                    style.setStyle("left", 400);
                    button.id = "button";
                    button.label = "b";
                    button.width = 30;
                    button.height = 30;               
                    button.styleDeclaration = style;
                    canvas.addChild(button);
                    this.titleBar.addChild(canvas);
            ]]>
        </mx:Script>   
    </mx:Panel>

    Hi,
    There is not need to use Canvas to position it. override the updateDisplayList method and move the button. Check the code below.
    <mx:Script>
            <![CDATA[
                import mx.controls.Button;
                private var button:Button;
                private var style:CSSStyleDeclaration = new CSSStyleDeclaration();  
                   override protected function createChildren():void
                       super.createChildren();
                       button = new Button();
                       button.label = "b";
                    button.styleDeclaration = style;
                    titleBar.addChild(button);
                override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
                    super.updateDisplayList(unscaledWidth,unscaledHeight);
                    button.width = 30;
                    button.height = 30;
                    //move button to the top right
                    button.move(width - button.width - 5, 5);
            ]]>
        </mx:Script>

Maybe you are looking for