How would I create buttons states for MCs I am creating abstract MCs

I am creating a generic website that would have abstract MCs that would load jpg or TXT fields for the user interface to allow for fast updates to the site. The MCs that would make up the user interface would be empty and load things into it using XML or PHP later on. How would I create button states for the user interface MCs.  I started creating a function for every MC button state but I thought there might be a more efficient way.
would creating a array help in this case?
and is using URLRequest the way to link to pages with in a movie well the flash movie that is the site it's self?
/*---------------------------- THE START OF MY ACTION SCRIPT ------------------------------*/
var waywardLogo_mc:MovieClip = new MovieClip;
var theCollection_mc:MovieClip = new MovieClip;
var newsPage_mc:MovieClip = new MovieClip;
var whatthe#$@!doyouwant!?_mc:MovieClip = new MovieClip;
/*---------------------------- onOver ------------------------------*/
waywardLogo_mc.addEventListener(MouseEvent.ROLL_OVER,onOver);
theCollection_mc.addEventListener(MouseEvent.ROLL_OVER,onOver);
newspage_mc.addEventListener(MouseEvent.ROLL_OVER,onOver);
whatthe#$@!doyouwant!?_mc.addEventListener(MouseEvent.ROLL_OVER,onOver);
/*---------------------------- onOut ------------------------------*/
waywardLogo_mc.addEventListener(MouseEvent.ROLL_OUT,onOut);
theCollection_mc.addEventListener(MouseEvent.ROLL_OUT,onOut);
newspage_mc.addEventListener(MouseEvent.ROLL_OUT,onOut);
whatthe#$@!doyouwant!?_mc.addEventListener(MouseEvent.ROLL_OUT,onOut);
/*---------------------------- onClick ------------------------------*/
waywardLogo_mc.addEventListener(MouseEvent.CLICK,onClick);
theCollection_mc.addEventListener(MouseEvent.CLICK,onClick);
newspage_mc.addEventListener(MouseEvent.CLICK,onClick);
whatthe#$@!doyouwant!?_mc.addEventListener(MouseEvent.CLICK,onClick);
function onOver(event:MouseEvent):void
event.target.alpha = .5;
function onOut(event:MouseEvent):void
event.target.alpha = 1;
function onClick(event:MouseEvent):void
event.target.URLRequest("");
/*---------------------------- onover, onOut, onClick buttonModes ------------------------------*/
waywardLogo_mc.buttonMode = true;
theCollection_mc.buttonMode = true;
newspage_mc.buttonMode = true;
whatthe#$@!doyouwant!?_mc.buttonMode = true;

click insert/new symbol, tick movieclip, assign a name, tick export for actionscript and in the class textfield enter a name (say ButtonClass) and click ok.
attached to the first frame of your new movieclip, type stop() in the actions panel.  put whatever graphic you want on-stage for your button's up stage.  create another keyframe, label it "over" and put whatever graphic you want for button's over state on-stage.
in a layer above those graphics, you'll probably want to add a dynamic textfield so each of your buttons can have different text.  assign the textfield and instance name (say tf) and extend its timeline to the last frame of your movieclip button.
then when you want to create a button, on your timeline you can use:
var b:ButtonClass=new ButtonClass();  // these two lines need to be entered for each button
buttonhandlerF(b,someX,someY);
//-------code between dotted lines only needs to be entered once no matter how many buttons you add --------------------
function buttonhandlerF(b:ButtonClass,x:Number,y:Number){
b.addEventListener(MouseEvent.MOUSE_OVER,overF);
b.addEventListener(MouseEVent.MOUSE_OUT,outF);
b.x=x
b.y=y
addChild(b);
function overF(e:MouseEvent){
e.currentTarget.gotoAndStop("over");
function outF(e:MouseEvent){
e.currentTarget.gotoAndStop(1);
//-------code between dotted lines only needs to be entered once --------------------
// you'll also want to create a click listener and listener function
the code between the dotted lines is amenable to being added to a ButtonClass.as class file if want to expand your capabilities.

Similar Messages

  • How to consolidate the financial statements for 3 company codes, assigned t

    Hi Friends,
    How to consolidate the financial statements for 3 company codes, assigned to 3 different companies, 3 different fiscal years, 3 different controlling areas and all the 3 Company Codes assigned to same chart of accounts in the same client?
    Can we need any ABAP program for this (or) Is it possible using Report Painter?
    Please help me.
    Thanks

    Hi friend,
    Is it a real-time situation or something you are visualising ?
    For consolidation, you can use a group chart of accounts and select that in the operative chart of accounts for consolidation purposes.  This would work provided the company codes use the same operative chart of accounts and fiscal year.
    I hope the above would be helpful to you.
    Regards,

  • How to trace every dml statement for a schema/ database

    hi,
    how to trace every dml statement for a schema/ database
    PFile Entrie
    init.ora Parameter Example event='1401 trace name errorstack, level 12';
    tkprof orcl_ora_3632.trc b.txt
    after these two steps I am not able to see the sql statements in trace ...
    Please suggest.
    Thanks & Regards,

    Hi,
    Trace Event 1401 will create a trace file and dumps the information when ORA-01401 error occurs. This error occurs when "inserted value too large for column"
    You will see the trace file getting populated only when you encounter ORA-01401 error.
    Regards

  • How would you change the state to the base state?

    How would you change the state to the base state? Its not
    letting me do something like:
    currentState='<Base State>';

    Sorry about the vagueness of that last reply :)
    What I have done now in my code is this:
    viewstack1.addChildAt(loginCanvas,0);
    toggle.selectedIndex = 0;
    However nothing happens at this line of code:
    toggle.selectedIndex = 0;
    but this works:
    toggle.selectedIndex = 1; or ...
    toggle.selectedIndex = 2;
    toggle.selectedIndex = 3;
    toggle.selectedIndex = 4;
    toggle.selectedIndex = 5;
    toggle.selectedIndex = 6;
    The strange thing is that if I have a button on the screen:
    <mx:Button x="10" y="3" label="Button"
    click="toggle.selectedIndex =0"/>
    and the user clicks it the toggle.selectedIndex = 0; works.
    I'm stumped, any ideas?

  • How to write a case statement for the totals column of two different years (2013 and 2014) of the same month so that I can get a +/- column

    Please Help!!!
    How to write a case statement for the totals column of two different years (2013 and 2014) of the same month so that I can get a +/- column.
                                      January 2014         January
    2013                            +/-
                    Region   Entry   Exit  Total    Entry   Exit   Total   (Total of Jan2014-Total of Jan2013)
                    A               2         3      
    40        5       7        30                    40-30= 10

    What is a table structure? Sorry cannot test it right now..
    SELECT <columns>,(SELECT Total FROM tbl WHERE Y=2014)-(SELECT Total FROM tbl WHERE Y=2013)
    FROM tbl
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • How to create an instance for RemoteSession without using create() method

    How to create an instance for RemoteSession without using create() method?

    What's RemoteSession? Not in the JDK. And does the question have anything to do with concurrency?

  • How to create a notification for new virtual machines created on Hyper-v Using SCOM or another way?

    Hi ,
    We need to  to create a notification for new virtual machines created on Hyper-v Using SCOM or another way
    thanks

    http://sincealtair.blogspot.com/2010/04/how-to-ask-questions-in-technical-forum.html
    Not nearly enough information.
    If you are asking about SCOM, it is better to ask in the SCOM forum -
    http://social.technet.microsoft.com/Forums/en-US/home?forum=operationsmanagergeneral
    .:|:.:|:. tim

  • How to save the session states for a tabular form WITHOUT using check boxs?

    Greeting guys,
    As you know that we can use collections to save the session states of a tabular forms, described in the how-to doc of manual tabular forms. However, what I am trying to do ( or have to do) is to provide a manual tabular form, and save the session states for validation, without using the check boxes. Because a user can put contents into some columns in a row without checking the corresponding checkbox, according to the requirements. So basically what I tried is to loop over all the rows and save Every entry into a collection. However, sometimes I got "no data found" error with unknown reasons.
    My current solution is to use the "dirty" Retry button that gets back the history, which IMO is not a good workabout. So, I'd appreciate if somebody can shed some light on a better solution, especially if it is close to the one in that how-to doc.
    Thanks in advance.
    Luc

    The following is the first collection solutin I've tried:
    htmldb_collection.create_or_truncate_collection('TEMP_TABLE');
    for i in 1..p_row_num loop -- Loop on the whole form rows
    if (htmldb_application.g_f01(i) is not null) or (htmldb_application.g_f05(i) <> 0)
    --If either of them has some input values, the row should be saved into the colleciton.
    then
    htmldb_collection.add_member(
    p_collection_name => 'TEMP_TABLE',
    p_c001 => htmldb_application.g_f01(i),
    p_c002 => htmldb_application.g_f03(i),
    p_c003 => htmldb_application.g_f04(i),
    p_c004 => htmldb_application.g_f05(i),
    p_c005 => htmldb_application.g_f06(i),
    p_c006 => htmldb_application.g_f08(i)
    end if;
    end loop;
    Some of columns have null values, but I don't think that's the reason. Because once I clicked all the check boxes, there would be no error no matter what values were in other columns.
    Another issue would be extract the values FROM the collection, which has been tried because I had problem to store the data into the collection. I used "decode" functions inside the SQL to build the tabular form. I am not sure whether it will be the same as a regular SQL for a tabular form, like the example in the How-to doc.
    Also I didn't use the checksum, for it is not an issue at the current stage. I am not sure whether that's the reason which caused the NO DATA FOUND error.

  • How to create t.code for report painter report created using CJE5

    Hi All,
    I'm trying to create T.code for a report painter program created using CJE5.
    I using the D_SREPOVARI-REPORTTYPE as "RE" and
    D_SREPOVARI-EXTDREPORT as KP 01RPSCO_X <report name>
    If I provide spaces between KP 01RPSCO_X <report name>, its not allowing spaces.
    If I didn't provide the space then its saying that "report does not exists"
    Please let me know how to overcome this issue?.
    What this KP  & 01RPSCO_X stands for? Is this always constant?
    There is a similar kind of transaction in other system which Looks like this " KP 01RPSCO_X <report name>" spaces in between
    I dont understand why its not allowing spaces in this system. As its in different system i cant make a copy of this transaction and change the parameters.
    Edited by: Mr A on Feb 18, 2010 5:28 PM
    Edited by: Mr A on Feb 18, 2010 5:54 PM

    thanks for giving me the link.
    I searched for all these link in SDN before posting itself.
    my issue is how to give the value for the parameater EXTDREPORT.
    If i give spaces for the value KP  01RPSCO_X <report name>, its throwing error, T,code its self is inconsistent.
    if i didnt give spaces its i'm able to create the t.code, but when i execute it, its giving error message saying "report does not exists"
    but if i go to CJE5, that report is there.
    thanks

  • How can I change the state for normal. All I get is a question mark.

    I can't change the normal state for my site. The button for color of text for the normal state is a question mark. Is there a way to reset this?

    Thanks. I am trying to change the appearance of a hyperlink on a web page. Specifically, I want to change the default text color from blue to another color. I can change the color for the other states of the hyperlink (rollover, etc.) but the attempt to change the normal state of the hyperlink is unsuccessful because the color box for that state is a question mark. Bill

  • How to monitor/capture SQL statement for an event?

    I want to capture all sql statements for 10 minutes that ran against the database. How should i do that?
    Thanks,
    Dave

    The following document will give u the requred know how.
    http://www.oracle.com/technology/products/manageability/database/pdf/ow05/PS_S001_274001_106-1_FIN_v1.pdf

  • How would I search the hastable for homer?

    This is an example that I did awhile back. I currently messing around with it just as a review. I got stuck on how I can implement a search for my hashtable. Here is what I have so far
    import java.util.*;
    public class SimpsonsClient {
        public static void main(String args[]) {
          Hashtable hash = new Hashtable();
          Student st1 = new Student("Homer", "Simpson", "0");
          Student st2 = new Student("Marge", "Simpson", "0");
          Student st3 = new Student("Bart", "Simpson", "0");
          Student st4 = new Student("Lisa", "Simpson", "0");
          Student st5 = new Student("Maggie", "Simpson", "0");
          System.out.println("Adding values to hash");
          hash.put(st1.getAge(), st1);
          hash.put(st2.getAge(), st2);
          hash.put(st3.getAge(), st3);
          hash.put(st4.getAge(), st4);
          hash.put(st4.getAge(), st5);
          System.out.println("Does the hash have st1?:" + hash.contains(st1));
          System.out.println("Is the hash code empty?" + hash.isEmpty());
          //Search for homer?
          System.out.println("Hash contain Homer?" + hash.get("Homer"));
        }Output Looks like this:
    Adding values to hash
    Does the hash have st1?:true
    Is the hash code empty?false
    Hash contain Homer?null
    I just would like to know how I can do a search for homer and pull his records off like the name, age, and the field of 1.
    Thanks

    import java.util.*;
    public class SimpsonsClient {
        public static void main(String args[]) {
          Hashtable hash = new Hashtable();
          Student st1 = new Student("Homer", "Simpson", "0");
          Student st2 = new Student("Marge", "Simpson", "0");
          Student st3 = new Student("Bart", "Simpson", "0");
          Student st4 = new Student("Lisa", "Simpson", "0");
          Student st5 = new Student("Maggie", "Simpson", "0");
          hash.put(st1.getAge(), st1);
          hash.put(st2.getAge(), st2);
          hash.put(st3.getAge(), st3);
          hash.put(st4.getAge(), st4);
          hash.put(st4.getAge(), st5);
        }I can't really tell actually. You haven't included a definition for the Student class. If it's something like this:
    public class Student
      public String getName();
      public String getSurname();
      public String getValue(); // the third field
    }In the old jdk 1.1 API
    public static boolean tableContainsStudent(Hashtable table, String name)
      for(Enumeration students = table.elements(); students.hasMoreElements(); )
        if (((Student)students.nextElement()).getName().equals(name)) return true;
      return false;
    }It's quite similar with Collections API
    for (Iterator students=table.values().iterator();students.hasNext(); )
      if (((Student)students.nextElement()).getName().equals(name)) return true;
    return false;
    ...I don't think the Hashtable is optimal at all for searching this way. It would be much nicer if you can do a binary search, but that requires more thinking when designing the storage class.
    greets.

  • How to dynamically create sql statement for Defaulting Segment Values?

    Hi,
    Navigation:
    1) Descriptive/Segments
    2) Query for DFF to be modified
    3) Uncheck “Freeze Flexfield Definition”
    4) (B) Segments
    5) Segments Summary form opens
    6) (B) open - Segments form opens
    Now, here I want to specify Default type as "SQL Statement" and in the default value field I want to use SQL statement with parameters (to evaluate the default value).
    The parameters should be pass at runtime from the form in which we have this DFF. The parameters value should be one of the values which get evaluated at runtime in the form window.
    Please suggest how we can achieve this?
    Or is there any alternative to achieve this?
    Thanks!!
    Regards,
    Narender
    Edited by: Narender Singh on Mar 30, 2010 7:47 AM
    Edited by: Narender Singh on Mar 30, 2010 7:48 AM

    Jason,
    it is possible, though not so simple as with a report.
    What you need to do is to create a pipelined function, that returns your date and count data. This pipelined function can be the base of a pseudo-table, which can be used in a select. For the pipelined function you need to define types for one row and a table to define the return-type for your function:
    create or replace type calendar_row as object (date_time date, description varchar2(250));
    create type calendar_table as table of calendar_row;
    Then you can create the package with the function:
    ================================================
    create or replace package dyn_calendar is
    procedure set_query(i_query in varchar2);
    function view_source return calendar_table pipelined;
    end;
    create or replace package body dyn_calendar is
    v_query varchar2(100) := null;
    procedure set_query(i_query in varchar2) is
    begin
    v_query := i_query;
    end;
    function view_source return calendar_table pipelined is
    TYPE cursor IS REF CURSOR;
    c_cal cursor;
    v_date_time date := null;
    v_description varchar2(100) := null;
    r_cal calendar_row;
    begin
    open c_cal for v_query;
    fetch c_cal into v_date_time, v_description;
    loop
    exit when c_cal%notfound;
    r_cal := calendar_row(v_date_time, v_description);
    pipe row(r_cal);
    fetch c_cal into v_date_time, v_description;
    end loop;
    return;
    end;
    end;
    ================================================
    Now you can set query in a PL/SL region before the calendar:
    dyn_calendar.set_query(SELECT count(*), ' || :P8_SOURCE_DATE || ' FROM ' || :P8_SOURCE_TABLE || ' GROUP BY ' || :P8_SOURCE_DATE);
    and you can base your calendar on the query:
    select * from table(dyn_calendar(view_source))
    Good luck,
    Dik

  • How to specify precision and scale for a datatype in create procedure statement

    Specifying precision and scale in the datatype when creating a procedure does not work:
    create or replace function SqlTxFunctionTesting(inparam in number(9,2)
    Error(1,48): PLS-00103: Encountered the symbol "(" when expecting one of the following: := . ) , @ % default character The symbol ":=" was substituted for "(" to continue.

    user4928701 wrote:
    Specifying precision and scale in the datatype when creating a procedure does not work:
    create or replace function SqlTxFunctionTesting(inparam in number(9,2)
    Error(1,48): PLS-00103: Encountered the symbol "(" when expecting one of the following: := . ) , @ % default character The symbol ":=" was substituted for "(" to continue.
    And one of the cons in the PL/SQL language in my view.
    The language does not allow parameters to be declared in the fashion you are attempting to. Even declaring a subtype and using that, does not enforce either the precision or scale, on the parameter value passed.
    Even worse - the parameter value can be a different data type all together from the defined parameter type - and a silent and implicit data type conversion will be done at run-time.
    So you can expect run-time errors in your code unit caused by the caller passing invalid values, despite the compiler okaying the call from the caller to your code.
    There are pros and cons to this approach. But if you are from a very strong type language environment like C or Pascal, you tend to see more cons than pros in this specific case.

  • How do I change appearance states for checkboxes in InDesign CS6?

    Hello,
    I am creating an interactive fillable PDF form and need to use a custom checkbox.
    I am aware as to how I add my 'Icon' to the Sample Buttons and Form Box, but am having difficulty when attempting to alter the appearance states 'Normal' or 'Rollover' or 'Click'.
    It seems that when I turn my button into a checkbox, as soon as it becomes selected, it puts a god awful default tick inside it as opposed to allowing me to choose my own 'Normal' state.
    Please help.
    M/

    I am having the same problem as Mykel. Using CS6, I've created a form and added checkboxes. I had a request that I customize the checkboxes to make them easier to see when checked. I adjusted the states of the checkbox and they seemed to function well....but only in Acrobat Pro X. When I open the PDF in Acrobat Reader XI, then the checkboxes act strangely. (Most of the end users will be using Acrobat Reader, so this is a concern.) When intially checked, they appear in the modified way that I want them to. However, as soon as the user clicks somewhere else on the page, the modified checkbox reverts to the default checkbox with a tick mark in it instead.
    I'm exporting the PDF as an interactive PDF and have tried various settings. I've also experimented with creating a checkbox from scratch rather than modifying a provided checkbox. All to no avail. I'd welcome any thoughts or suggestions anyone may have. Hoping I've just missed a step in the process!
    Here are links to my original CS6 InDesign document and the PDF:
    https://workspaces.acrobat.com/?d=w15hEhbZV4LmGFdQYL-1pA
    https://workspaces.acrobat.com/?d=5rdmI1K-LG8iFoFC4FTRdA

Maybe you are looking for

  • The music in my iTunes library won't sync to my iPod touch

    I have a 32 GB 3rd iPod touch. And earlier after I had finished downloading some new music, I tried to sync my iPod. First it told me I had to restore my iPod, because it couldn't be read. I did. And three hours later, it was done. So once again, I p

  • Best practice for Video over IP using ISDN WAN

    I am looking for the best practice to ensure that the WAN has suffient active ISDN channels to support the video conference connection. Reliance on load threshold either - Takes to long for the ISDN calls to establish causing the problems for video s

  • Making a DVD with HD and SD assets

    How can I make a SD DVD with HD and SD assets and retain the highest quality on the HD material? I have tried mixing the short vidoes on an SD timeline in Final Cut Pro, then rendering out the HD and export using Best Quality 90 min DVD settings in C

  • How to get the value fron the JSF selectoneRadio component  in Javascript ?

    <h:selectOneRadio id="InOrOut" value="#{currentRow.oaInOut}" onclick="setValue(this.id)" > <f:selectItem itemLabel="IN" itemValue="I" /> <f:selectItem itemLabel="OUT" itemValue="O"/>      </h:selectOneRadio> function setValue(objId) alert(document.ge

  • Statistics Analysis on Tables that are often empty

    Right now I'm dealing with a user application that was originally developed in Ora10g. Recently the database was upgraded to Ora11g, and the schema and data was imported successfully. However, since the user started using Ora11, some of their applica