Actionscript 3 and HBX (Hitbox) Coding

I have this pretty complex tool I am trying to add HBX tracking to. Well, I'm just adding it to 2 links.
The links are set up like this now:
_serviceRatesURL = new URLRequest("http://www.fedex.com/ratefinder/home?cc=US&language=en&locId=express");
_serviceShipURL = new URLRequest("https://www.fedex.com/fcl/;SHIPSESSIONID=SLZTJnQpXQKhQsxm6JTrK18y59lSjzhJZPkTw0hn2KxTvT3jS 2NX!-781674804?appName=fclfsm&locale=us_en&step3URL=https%3A%2F%2Fwww.fedex.com%2Fship%2Fs hipEntryAction.do%3Fmethod%3DdoRegistration%26link%3D1%26locale%3Den_US%26urlparams%3Dus%2 6sType%3DF&returnurl=https%3A%2F%2Fwww.fedex.com%2Fship%2FshipEntryAction.do%3Fmethod%3Ddo Entry%26link%3D1%26locale%3Den_US%26urlparams%3Dus%26sType%3DF&programIndicator=0");
private function onServiceRatesClick(event:MouseEvent):void {
            navigateToURL(_serviceRatesURL, '_blank');
        private function onServiceShipClick(event:MouseEvent):void {
            navigateToURL(_serviceShipURL, '_blank');
And the HBX required is:
navigateToURL(new URLRequest(_serviceRatesURL, '_blank');javascript:_hbLink('Service+Rates'));
navigateToURL(new URLRequest(_serviceShipURL,  '_blank');javascript:_hbLink('Service+Ship'));
Any help would be appreciated. When I add the previous code, it won't allow my flash tool to compile.
Thanks

Thank you Ned for your help, however as I do not really understand how the settimeout function works, it has now made me more confused.
I think I have nutted out what I am trying to say.
Essentially my project is like a web page if you like.
I have six individual pages which all display a picture and play a sound file.
What I would like to do is after each page is selected it will play a sound file, I then want it to wait 10 secs and then go back to a
home page (which will be frame 1) or if they are impatient there is a back button that directs you back to frame 1.
I have included the code used by the back button to manually get back to frame 1 either whilst the sound file is playing or after it has finished
back_btn.addEventListener(MouseEvent.MOUSE_DOWN, fl_ClickToGoToAndStopAtFrame_1);
  function fl_ClickToGoToAndStopAtFrame_1(event:MouseEvent):void
    gotoAndStop(1);
/* Click to Stop All Sounds
Clicking on the symbol instance stops all sounds currently playing.
back_btn.addEventListener(MouseEvent.MOUSE_DOWN, fl_ClickToStopAllSounds);
function fl_ClickToStopAllSounds(event:MouseEvent):void
    SoundMixer.stopAll();
I just want it to return to home page automatically once the sound file is finished and there is nil input from the touch screen. (This will simulate someone walking away midway and leaving it with 2nd  web page showing.)
I hope this makes sense.
Thank you

Similar Messages

  • Explicity mapping between ActionScript and Java objects for the BlazeDS Messaging Service

    The BlazeDS documentation shows how to explicitly map between ActionScript and Java objects. For example, this works fine for RPC services, e.g.
    import flash.utils.IExternalizable;
    import flash.utils.IDataInput;
    import flash.utils.IDataOutput;
    [Bindable]
    [RemoteClass(alias="javaclass.User")]
    public class User implements IExternalizable {
            public var id : String;
            public var secret : String;
            public function User() {
            public function readExternal(input : IDataInput) : void {
                    id = input.readObject() as String;
            public function writeExternal(output : IDataOutput) : void {
                    output.writeObject(id);
    and
    import java.io.Externalizable;
    import java.io.IOException;
    import java.io.ObjectInput;
    import java.io.ObjectOutput;
    import java.util.HashSet;
    import java.util.Iterator;
    import java.util.Set;
    public class User implements Externalizable {
        protected String id;
        protected String secret;
        public String getId() {
            return id;
        public void setId(String id) {
            this.id = id;
        public String getSecret() {
            return secret;
        public void setSecret(String secret) {
            this.secret = secret;
        public void readExternal(ObjectInput in) throws IOException,
                    ClassNotFoundException {
            id = (String) in.readObject();
        public void writeExternal(ObjectOutput out) throws IOException {
            out.writeObject(id);
    If I called an RPC service that returns a User, the secret is not sent over the wire.  Is it also possible to do this for the messaging service? That is, if I create a custom messaging adapter and use the function below, can I also prevent secret from being sent?
    MessageBroker messageBroker = MessageBroker.getMessageBroker(null);
    AsyncMessage message = new AsyncMessage();
    message.setDestination("MyMessagingService");
    message.setClientId(UUIDUtils.createUUID());
    message.setMessageId(UUIDUtils.createUUID());
    User user = new User();
    user.setId("id");
    user.setSecret("secret");
    message.setBody(user);
    messageBroker.routeMessageToService(message, null);

    Hi Martin. The way that AMF serialization/deserialization works for BlazeDS is the same regardless of which service is being used, so yes that code will work for messaging as well. On the server, the serialization/deserialization of messages happens at the endpoint. For an incoming message for example, the endpoint deserializes the message and then hands it off to the MessageBroker which decides which service/destination to deliver the message to.
    That was a good question. Thanks for asking it. Lots of people are used to doing custom serialization/deserialization with the RPC services (RemoteObject/RemotingService) but I'm not sure everyone realizes they can do this for messaging as well.
    -Alex

  • Question about EJB and thread safe coding - asking again!

    sorry everyone, no one seems to be interested in helping me on this, so i post it again.
    i have a question about the EJB and thread safe coding. when we build EJBs, do we need to worry about thread safe issue? i know that EJBs are single threaded, and the container manages the thread for us. maybe i am wrong about this. if i wasnot, how can we program the EJB so that two or more instance of EJB are not going to have deadlock problem when accessing data resources. do we need to put syncronization in ours beans, do we even need to worry about creating a thread safe EJB? thanks in advance. the question really bothers me a lot lately.

    sorry everyone, no one seems to be interested in
    helping me on this, so i post it again.Excellent plan. Why not search a little bit on your own instead of waiting for your personal forum slaves to answer your call. See below.
    i have a question about the EJB and thread safe
    coding. when we build EJBs, do we need to worry about
    thread safe issue? Read this: http://forum.java.sun.com/thread.jsp?forum=13&thread=562598&tstart=75&trange=15
    i know that EJBs are single
    threaded, and the container manages the thread for us.
    maybe i am wrong about this. if i wasnot, how can we
    program the EJB so that two or more instance of EJB
    are not going to have deadlock problem when accessing
    data resources. do we need to put syncronization in
    ours beans, do we even need to worry about creating a
    thread safe EJB? thanks in advance. the question
    really bothers me a lot lately.
    Java's Thread Tutorial
    JavaWorld: Introduction to Java threads
    IBM: Introduction to Java threads
    Google: java+threads+tutorial

  • ActionScript and MXML highlightubg

    I'm a low vision guy, I can't use flex builder because I need
    to change default editor colors (actionscript and mxml editors).
    In others IDEs normally i change background and foreground
    colors to "white over black".
    Help, please

    found a solution for you
    in your eclipse instlation
    go to \plugins\com.adobe.flexbuilder.editors.common_xxxxx\
    directory
    P.S xxxx means some numbers it might be different on your
    machin .
    unzip common.jar file
    then go into
    common\com\adobe\flexbuilder\editors\common\color directory
    edit Colors.xml to your prefferences (it has hex values for
    colors , its pretty self descriptive) and after you finish editing
    put that back into the jar or re-jar that whole directory .

  • Flex SDK and online emulation coding, your opinion on my project

    Hi to everybody,
    I'm an actionscript developer and I've started a project 2 years ago.
    Since I wanted to test dynamic bitmap generation, I started this path by coding a graphic driver that emulates some old graphic chip used in consoles.
    I could see it can work very well in AS3, so thanks to Flex SDK and FDT I have coded some more complex emulators.
    Llittle by little I've built some classes that emulate some more chips such as SN76489, AY-3-8910, Konami SCC, Namco, TMS9918/TMS9928 and other graphic drivers for arcade emulation.
    There are few project around the web on this subject, some of them such as fMAME are done thanks to Alchemy but, mine is pure AS3 with a lot of otimization, simple code, byte code friendly structures and a lot of caching methods.
    The audio has to be fixed, I still haven't find a good caching way to play the audio generated by emulated sound chips with the streaming feature of flash player. To increase quality and fidelity, I need to rise the buffer, but the delay between a graphic event and its corresponding sound rises too...
    Unfortunately on some old PC and some netbook they are a little slow because they use a lot of CPU and memory. I will be very glad if you can tell me your opinin about this work and eventually your PC configuration you are playing with.
    These are the four consoles/computer I've emulated:
    SEGA SC-3000/SG-1000: http://www.play-sc-3000.com
    SEGA Master System: http://www.digimorf.com/ASms
    MSX 1: http://www.digimorf.com/ASReplay_MSX
    CBS ColecoVision: http://www.digimorf.com/fcv
    And these are some MAME concept based arcade games. To play with these ones you need to use te same control keys of MAME:
    - Click on monitor to focus flash player
    - 5 or 6: Insert Coin
    - 1 or 2: no. of player to start
    - Arrow keys: move
    - X, C: fire buttons 1, 2
    http://www.digimorf.com/FlaME/pacman.htm
    http://www.digimorf.com/FlaME/pacman3D.htm - This uses Away3d for the 3d interactive cabinet, you can rotate and play snce the emulator itself is mapped on the screen object.
    http://www.digimorf.com/FlaME/ladybug.htm
    http://www.digimorf.com/FlaME/pengo.htm
    http://www.digimorf.com/FlaME/crushroller.htm
    http://www.digimorf.com/FlaME/bombjack.htm
    http://www.digimorf.com/FlaME/solomon.htm
    Hope you enjoy them!

    You can set the maximum number of connections by using:
    ServerSocket server = new ServerSocket( port, backlog );
    Where backlog is the number of connections at any one time. I'm not sure - but I'm guessing that the physical limit is dictated by your hardware. Once you queue is full of connections, you are right - any further connections are refused. The default number of connections is 50.
    Mike

  • Left and right mouse coding for games

    Hi
    Can anyone point me in the right direction on where to find actionscript 2/3 coding for left and right mouse clicks for gaming. I am a student and want to design a game that will use both left and right mouse clicks on a object that will give different results depending on which mouse click you had made.
    For example on a red object you click right, on a blue object you click left. Depending on how you clicked on a object will determine the next step in the code.
    Does this make sense?
    Cheers
    Beth

    I believe there is no method provided for isolating right clicks with a mouse in Flash.  The right click is reserved for pulling up a menu and there are no properties associated with it in the code.

  • Actionscript and HBox padding

    How do you set the padding values of an HBox in Actionscript?
    Can somebody explain why components have certain properties
    when using MXML and different properties when using Actionscript?
    This is does not make sense to me.
    For example when using an HBox in MXML it has paddingTop,
    paddingRight, paddingBottom, paddingRight properties. But if you
    create a HBox in Actionscript those propertes are no where to be
    found.
    Am I missing something here?

    These properties are style properties.
    You have to use setStyle method :
    hbox.setStyle( "paddingTop", 10 ) ;

  • Basic question about Actionscript and symbols

    I like the object oriented features of actionscript (2.0).
    One thing confuses me tho, namely the combination of symbol classes
    and constructors. Since symbols can't be instanciated by new
    SomeMovie(...), but rather has to be created with attachMovie(), it
    seems to me that there is no use of constructors for symbols.
    Instead you have to send an init object in the attachMovie() call.
    This seems to me to be lacking in logic. It would be much more
    logical if you could do:
    var m = new MyMovie(constructor arguments...);
    destinationClip.attachMovie(m);
    Am I correct that this way of doing it is not possible in
    current actionscript?
    And second, don't you agree this would be a more consistent
    use of the actionscript language?

    First, I just wanna thank u for replying. I still have some
    follow up questions that I think are of interest:
    About the first issue of constructors u say they
    automatically gets called. But isn't it true that only a
    constructor that takes no arguments can be automatically called?
    Because, how could a constructor call with arguments MyMovie(x, y,
    size, etc), be automatically called? My point is, that it would be
    more neat to send the parameters thru the constructor, than thru an
    init object. Also, I wonder why u think constructors are error
    prone. Maybe they are error prone exactly because
    Flash/actionscript invites to an inconsistent way of initializing
    MovieClips and other object instances?
    Second, u say that attaching a class to a MovieClip should be
    avoided unless all or most of the functionality of the MovieClip
    Class is needed. I usually attach a class a MovieClip that needs
    some code to describe its behaviour. In practice, I think the only
    essential method that I need from MovieClip is the onEnterFrame().
    Are you suggesting that it would be better to skip onEnterFrame in
    individual objects, and rather loop over some array to make all
    objects get their command to do their thing? I thought the good
    thing about onEnterFrame was that I could avoid having to traverse
    arrays of objects, and instead let Flash itself call all objects
    that need to be updated each frame.
    Third, I would like to repeat the benefit of not having to
    create variable names as attachMovie requires. For instance, assume
    alot of clips are being attached to the same containing clip. Now u
    have to make sure that all attached clips get different variable
    names, or strange things will happen. But if attachMovie just took
    a reference to a clip as parameter u would avoid that problem.
    If u know some document that discusses these issues, i would
    be happy if anyone had a link to it. My suggestion to the Flash
    developers is to make MovieClip objects consistent with ordinary
    objects.

  • Question about get web service result in actionscript and convert data format

    Hi, All
    I have question about how to get dataset from web services
    and put it in tree structure. I have 2 questions about this:
    1, How can I get data correctly in actionscript?
    I have no problem to get data by
    <mx:ArrayCollection id="acFolder"
    source="{mx.utils.ArrayUtil.toArray(MyGServices.getFolder.lastResult)}"
    />
    And display in datagrid.
    But when I try to use
    public function
    handleFolderContents(event:mx.rpc.events.ResultEvent):void{
    arData=mx.utils.ArrayUtil.toArray(event.result);
    acData=new ArrayCollection(arData);
    input.text=acData.getItemAt(0).id;
    Seems I can’t get data, it always say:
    TypeError: Error #1009: Cannot access a property or method of
    a null object reference.
    2, how to convert data format
    I get data from web service and want to convert it to tree
    structure, as mention below:
    I get:
    <Array>
    <id>111</id>
    <Name>Production1</Name>
    </Array>
    <Array>
    <id>222</id>
    <Name>Production2</Name>
    </Array>
    Convert to:
    <mx:XMLList id="treeData">
    <node>
    <node label="Production1" data="111">
    <node label="Production2" data="222"/>
    </node>
    </node>
    </mx:XMLList>
    Please help me.
    Thanks.

    First, don't specify the package path in the argument
    declaration. Instead import the event object:
    import mx.rpc.events.ResultEvent;
    The docs state this emphatically.
    Second, try "lastResult", in place of "result":
    arData=mx.utils.ArrayUtil.toArray(event.lastResult); // I am
    not positive about this. I maybe recall reading that result was ok
    for the event object, but maybe not.
    Finally, why do you want to convert the xml? You certainly
    could, but it would be a manual process, recursively reading the
    existing xml nodes and building the new structure, but again, why?
    Just use a labelFunction if necessary to display the nodes as
    you wish.
    Tracy

  • Actionscript and Action panel?

    From what I understand, ActionScript (.as files) and Action Panel (F9 embedded in Flash) are completely different. If so, which one is better used for game programming and which one is more powerful? Can ActionScript do everything that the Actions Panel can do?
    Thank you!

    they're different but not completely different.
    actionscript code can be placed in the action panel or it can be in stand-alone .as files.  there's no difference in the code used in an .as file vs code in the action panel.
    and i'm not sure powerful is the right word, but code in stand-alone .as files can do everything code in the action panel can do but not vice-versa:  you can create classes in .as files and you can't do that in the action panel.

  • Using ActionScript and FABridge to call JavaScript

    Hi,
    I understand how to use FABridge to register JavaScript
    functions as event listeners on Flex
    components. In my case, however, I want to programatically
    call a function that I've passed
    from JavaScript to my Flex app using ActionScript. Simply
    calling the function from AS, e.g.,
    my_js_function(), doesn't work and I suspect there's some
    vital FABridge proxy magic I should
    be using. All the FABridge examples I've seen cover the same
    ground: basic bridge set-up,
    changing Flex properties, registering JavaScript callbacks,
    etc. Can anyone point me to an
    example (or bridge documentation) showing how to program an
    ActionScript call to a JavaScript
    function through the bridge?
    Thanks, Garry

    Hi,
    Have you tried using ExternalInterface? Does that fail as
    well (it should be supported on Safar 1.0.3)

  • CRM_MKTPL System and User Status coding

    In Market Planner (CRM_MKTPL) you can change system status (this is different from other areas of CRM)
    I've set up a status profile with system status.
    I've coded a BADI CRM_MKTPL to make sure users can only pick system status.
    But how (in the BADI) can I change the system status (There is a Status_change method in this badi) but I can't see the system status or see how to change it.

    sounds like you only want to show user status and not system status
    In the badi, there is a method status_change
    data: ls_bal_s_msg type          BAL_S_MSG
    if im_user_status is initial AND
         im_check_mode = 'X'.
        ls_bal_s_msg-msgty = 'E'.
        ls_bal_s_msg-msgid = '???'.
        ls_bal_s_msg-msgno = '???'.
        append ls_bal_s_msg to et_return.
        exit.
      endif.
    Where ??? is your own message id and number defined in SE91.  The system never shows the message, but takes the hint that you don't want the system status displayed.

  • Getters and Setters in ActionScript and ECMAScript

    Hi ,
    This line is taken from a book , here the Author mentions that
    In ActionScript , getters and setters is not necessary , they are a part of of the core ECMAScript language.
    Can anybody please let me know what is meant by ECMAScript language ??
    Thanks in advance .

    ECMAScript is an ECMA standard.
    Getters and setters are not mandatory (that's what they mean).
    However, they can be useful in many cases.
    - You can check the value in a setter before assigning (e.g checking if it's null)
    - You cannot override properties of a superclass but you can getters/setters just as you can methods
    - You can take some action when the value of the property is changed. There are many examples in UIComponent classes of the Flex framework.
    - You can put a breakpoint in a setter in order to debug data binding (see if it triggers)
    - In order to optimize data binding, you can write [Bindable event="YourCustomEventNameHere")] before the getter/setter and dispatch this event when the value is set so as to enhance performance of data binding (if you just write [Bindable], your properties will be processed by the framework even if their value does not change).
    Also, note how the synthax is different than Java.
    // ActionScript
    private var _myProperty:uint;
    public function get myProperty():uint
      return _myProperty;
    public function set myProperty(value:uint):void
      _myProperty = value;
    // Java
    private Integer myProperty;
    public Integer getMyProperty():
      return myProperty;
    public void setMyProperty(value:Integer):
      myProperty = value;
    Avoid creating getters/setters a la Java in ActionScript (i.e not using the get/set keywords). This is something I have seen in some implementations or auto-generated code from UML.

  • How Can I change the Directory and Name of Coded UI Test Result html file

    I'm Using Visual Studio 2013
    Now I can find the Coded UI test result html file insde the following path
    TestProjectFolder\TestResults\2015_01_22_05_59\In\anotherfolder\MyMachineName\UiTestActionLog.html
    VS2013 enables editing the name structure of this folder only (2015_01_22_05_59). and it should contains a static name+DateTime (Using the Project TestSettings).
    I need to (Programatically)
    Collect all test result html files on one folder with the project name (Change the path of the test result file)
    Put the testcase name on the result file name (for example : TC13505_ValidateScreenComponents_2015_01_22_05_59)
    If possible,Programatically attach the html result file to the test case attachements
    More Details:
    I need to set a custom valus for (ResultsDirectory -
    TestLogsDir -TestResultsDirectory
    - TestName) on the runtime.
    please if any onw know how to do the previous tasks
    by code, please share your knowledge.
    Regards, Ahmed Elgazar Skype:A7medelgazar

    Hi AhmedElgazar,
    Thank you for posting in MSND forum.
    As you said  that you want to collect all test result html files on one folder with the project name by programmatically way to change the path of test result file in coded UI test.
    As far as I know that when we run a coded UI test every time, it is default that there will create a new folder to save the new UITestActionLog.html.
    So we could not change the path of test result file and collect all test result html files on one folder in VS IDE.
    At present, there have no way to collect all test result html files on one folder and change the test result file path.
    In addition, I know that we can change the TestResults folder using mstest.exe in command line.
    Reference:
    https://social.msdn.microsoft.com/Forums/en-US/58d3d2a6-1a45-41ba-9afa-12d087c7c661/how-to-change-the-test-results-path-of-codedui?forum=vstest
    If you still want to this feature, I suggest you can submit this feature request:
    http://visualstudio.uservoice.com/forums/121579-visual-studio. The Visual Studio product team is listening to user voice there. You can send your idea there and people can vote. If
    you submit this suggestion, I hope you could post that link here, I will help you vote it.
    Thanks for your understanding.
    Best Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • ActionScript and decompilation

    Is there any ActionScript script that can avoid your swf
    being decompiled?
    What are my further possibilities for protecting my file?
    Rgds

    flashlearning11,
    > Is there any ActionScript script that can avoid your
    > swf being decompiled?
    Well, the trick there is, if someone can decompile your SWF,
    then they
    can get past whatever ActionScript makes an attempt to
    protect the
    *operative* ActionScript. ;)
    > What are my further possibilities for protecting my
    file?
    > Rgds
    You could obfuscate your code, so that it's a bit harder to
    figure out
    if it does get decompiled, but that doesn't put the brakes on
    anything. You
    could code things in purposefully goose-chase ways, but that
    only makes it
    harder to maintain. Why give yourself the headache?
    Yes, there are SWF decompilers on the market, but there are
    also Java
    decompilers, and .NET decompilers that convert EXEs and DLLs
    back into C#,
    C++, and so on.
    That makes SWFs about as easy to decompile as binaries
    produced by other
    platforms. If someone wants your stuff, your stuff can be
    had. That's why
    End User License Agreements are written. ;)
    David Stiller
    Adobe Community Expert
    Dev blog,
    http://www.quip.net/blog/
    "Luck is the residue of good design."

Maybe you are looking for

  • Why are my old podcast episodes no longer showing up in iTunes?

    I have been recording and releasing a podcast for just over a year, and I recently had a friend try to download back episodes from the podcast app, only to discover that she could only access the last 10 episodes. As this excludes new listeners from

  • Connecting a microphone to Garageband

    I have a good stereo Rhode microphone for my Nikon DSLR which I would like to use on my MacAir so I can input voice and sound effects into GarageBand. I'm sure it is possible via some sort of mini mic jack to USB connector but feel that there may be

  • Not appearing in Time characteristics tab

    Hi friends, I have created   Z_FISCPER,   Z_REFYTO,  Z_LOADDAT as time characteristics. But I am unable to see these fields in time characteristics tab in Info object list. But it is viewable in the characteristics tab. My problem is I am unable to c

  • Using the score in editor

    I am trying to place notes in a score, using a musical instrument track.  I am in the editor using the command-click but I do not get any notes being placed.  Any ideas?

  • Download issue in SDL WorldServer 2009

    We have found an issue in Firefox which only occurs since this week's upgrade to Firefox 8: On export, SDL WorldServer no longer creates an .xlz named after the Task. Instead it creates a file named Export, with no extension. We can open it in Deskto