Hide ou show objects on stage with actionscript...

hi...
I made a simple flash jukebox and i want the music buttons to
appear as the mp3 files are loaded.
This is the script i wrote:
if(_framesloaded > 4)
_root.musica1.visible = true; //musica1 movieclip instance
name
else _root.musica1.visible = false;
if(_framesloaded > 8465)
_root.musica2bt.visible = true; //musica2bt music button
instance name
else _root.musica2bt.visible = false;
but it's not working...when the flash movie starts and when i
run the download simulator all the buttons appear.

already tried that :-( and it still doesn't work...
so i changed the script to:
if(_framesloaded > 5)
_root.musica1._alpha = 100;
} else {
_root.musica1._alpha = 0;
if(_framesloaded > 8465)
_root.musica2bt._alpha = 100;
} else {
_root.musica2bt._alpha = 0;
but i bounced into another problem, it will only do the test
on the first frame, and i want it to change whenever the frame is
loaded.
Example:
I have a 500frame timeline;
The above code is on the first frame and the referenced frame
is not loaded, but when i enter the 50frame the referenced frame my
already be loaded but the object will still be hidden :-(
how can i resolve this?
how can i do that?

Similar Messages

  • Aligning object to stage with actionscript

    I have a dynamic text box pulling info from an xml file.
    After the text loads the box resizes with autoSize.
    Any ideas on how i can get the box to align to the center of
    the stage after that with actionscript??
    I've looked around and can't seem to find a solid yes or no
    anywhere.
    Or if that's impossible, is there any way to vertically align
    the text, which would negate the need for the resize and align.
    Thanks

    nevermind....
    worked a little more and got it to work with
    mc_text.desc_txt._y=(Stage.height/2)-mc_text.desc_txt._height/2;

  • SWFLoader - SWF showing objects outside stage

    Hi... I have a SWF that I am loading with SWFLoader. For some
    reason, all of the elements that are outside the stage in the SWF
    (animated objects) are showing in Flex. How do I only show the SWF
    as it is supposed to be seen? I have set height and width on both
    the SWF and a container canvas.

    You need to create a rectangle that's exactly the same size
    as your document / stage, and make it a mask and put all of the
    layers in the document underneath it. That should take care of
    it.

  • [ASK] Show Object with Drag and Drop Condition

    Hello guys,
    I just finished making my simple drag and drop quiz which i've already mentioned in the previous thread. But i still have a problem. I've searched through the Internet, but i didn't find any case similar with my case.
    Please take a look at this picture :
    I want to hide the "nextbutton" (D button) then show (unhide) the button with some conditions, here are the conditions :
    If "p=>~q" square dragged on "A" white square && "~q" square dragged on "B" white square && "~p" square dragged on "C" white square then,
    Button D = visible
    else
    Button D = not visible
    How can i do this in actionscript 3.0?
    Any help would be appreciated. Thank you very much.

    I'm sorry, i haven't told you that i've already tried to do it with hitTestObject function, but it doesn't work, the D button never shows up even i dragged the squares on the right spot, here is some of the actionscript :
    Square_4 = pnotq
    Square_5 = notq
    Square_1 = notp
    /* Stop at This Frame
    The Flash timeline will stop/pause at the frame where you insert this code.
    Can also be used to stop/pause the timeline of movieclips.
    stop();
    //Hide and Show Actionscript
    if(Square_4.hitTestObject(Target_2) && Square_5.hitTestObject(Target_1) && Square_1.hitTestObject(Target_3)){
    Next.visible=true;
    } else {
    Next.visible=false;
    //ButtonMode Actionscript
    Square_1.buttonMode = true;
    Square_4.buttonMode = true;
    Square_5.buttonMode = true;
    //Some part of the Drag and Drop Actionscript
    (I made drag and drop for all the squares (1-7))
    var startX:Number;
    var startY:Number;
    Square_4.addEventListener(MouseEvent.MOUSE_DOWN, pickMe);
    Square_4.addEventListener(MouseEvent.MOUSE_UP, dropMe);
    function pickMe(event:MouseEvent):void {
        event.target.startDrag(true);
        startX = event.target.x;
        startY = event.target.y;
    function dropMe(event:MouseEvent):void {
        event.target.stopDrag();
        var myTargetName:String = "target" + event.target.name;
        var myTarget:DisplayObject = getChildByName(myTargetName);
        if (event.target.dropTarget != null && event.target.dropTarget.parent == Target_2){
            event.target.removeEventListener(MouseEvent.MOUSE_DOWN, pickMe);
            event.target.removeEventListener(MouseEvent.MOUSE_UP, dropMe);
            event.target.buttonMode = false;
            event.target.x = Target_2.x;
            event.target.y = Target_2.y;
        } else {
            event.target.x = startX;
            event.target.y = startY;

  • Can't access object using "id" or "name" if created with actionscript

    How can you register an instance of an object with actionscript so that it's id or name value is accessible?
    I included a simple example where a Button is created using mxml and in the same way it is created using actionscript.  The actionscript object is inaccessible using it's "id" and "name" property.
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:s="library://ns.adobe.com/flex/spark"
                   xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"
                   creationComplete="application1_creationCompleteHandler(event)">
        <fx:Script>
            <![CDATA[
                import mx.events.FlexEvent;
                protected function application1_creationCompleteHandler(event:FlexEvent):void
                    import spark.components.Button;
                    var asBtn:Button = new Button();
                    asBtn.label = "actionscript";
                    asBtn.x = 200;
                    asBtn.id = "asButton";
                    asBtn.name = "asButtonName";
                    addElement(asBtn);
                    trace("mxmlButton="+this["mxmlButton"].label); // returns: mxml  label
                    //trace("mxmlButton="+this["asButton"].label); // returns runtime error: ReferenceError: Error #1069: Property asButton not found on TestId and there is no default value.
                    //trace("mxmlButton="+this["asButtonName"].label); // returns runtime error: ReferenceError: Error #1069: Property asButtonName not found on TestId and there is no default value.
            ]]>
        </fx:Script>
        <s:Button
            id="mxmlButton"
            label="mxml label"
            alpha="0.8"/>
    </s:Application>

    Hi Dan,
    It is a very rare occurrence when I miss not being able to access an object (object property, really) using the ["name"] notation for objects created using actionscript.
    In MXML the compiler is conveniently adding an attribute to the class with the same name as the id, so you can conveniently refer to it using the [] notation. While we explicitly specify an application container to use, the MXML compiler creates a custom container which is a derivative of the base container and to that it adds properties for the children declared in MXML. I guess it also effectively calls "addElement" for us when  the container is being constructed.
    Your example assumes that using "addElement" to add the button to the application container is the same as declaring a variable (ie property ). It isn't, so there's no point in looking for an property of the name "as3Button" using the [] notation, because it doesn't exist. The container is managing a collection of children in it's display list and that's not the same as being accessible as properties of the container.
    Generally speaking, accessing properties using the ["name"] syntax isn't necessary.
    Paul
    [edit: you may wonder why "addElement" doesn't conveniently also add the "id" attribute to be an property of the container class. Unfortunately, it can't because the container class would need to be dynamic and it's not. A further complication would be that adding properties at runtime would invite naming clashes at runtime with associated mayhem. MXML can do this because the compiler generates the class and can trap name duplication at compile time.
    Great question, BTW.
    -last edit changed my "attributes" to be "properties" in line with Adobe's terminology]

  • Classic Report with Hide and Show Region Template does not show report

    Hello,
    I created a "No Template" region on a page with a Classic Report. When I change it to a "Hide and Show" region template, the report does not show up when I click to Show the region...is there an additional step i'm missing to make the report show up. Its a very simple query.
    Thanks in advance,
    John

    How about posting some relevant information like Apex version, RDBMS version, Theme you are using, etc.?
    Regards,

  • How can I move two figures on the stage with remote shared object?

    Hi, I have a problem...
    I need to move two figures on the stage with shared object like the "Tutorial shared Object ball" on the adobe website but with more than one figure. All the client must see the figures moving. The figure are a circle (Cerchio) and a square (Quadrato).
    Help me, please. This is the script:
    package
      import flash.display.Sprite;
      import flash.net.SharedObject;
      import flash.events.NetStatusEvent;
      import flash.events.SyncEvent;
      import flash.net.NetConnection;
      import flash.events.MouseEvent;
      import flash.display.MovieClip
      //import flash.net.ObjectEncoding;
      public class BlocchiLogici extends Sprite
            private var pointer_so:SharedObject;
            private var pointer1_so:SharedObject;
            private var nc:NetConnection;
            private var good:Boolean;
            private var Cerchio:cerchio;
            private var Quadrato:quadrato;
            private var Rettangolo:rettangolo;
            private var Triangolo:triangolo;
            public function BlocchiLogici()
                 //NetConnection.defaultObjectEncoding=flash.net.ObjectEncoding.AMF0;
                 //Connect
                 var rtmpNow:String="rtmp://192.168.1.66/BlocchiLogici";
                 nc=new NetConnection  ;
                 nc.connect (rtmpNow);
                 nc.addEventListener (NetStatusEvent.NET_STATUS,doSO);
                 Cerchio=new cerchio ;
                 addChild (Cerchio);
                 Cerchio.x=50;
                 Cerchio.y=200;
                 Cerchio.addEventListener (MouseEvent.MOUSE_DOWN,beginDrag);
                 Cerchio.addEventListener (MouseEvent.MOUSE_UP,endDrag);
                 Quadrato=new quadrato ;
                 addChild (Quadrato);
                 Quadrato.x=100;
                 Quadrato.y=200;
                 Quadrato.addEventListener (MouseEvent.MOUSE_DOWN,beginDrag);
                 Quadrato.addEventListener (MouseEvent.MOUSE_UP,endDrag);
            private function doSO (e:NetStatusEvent):void
                 good=e.info.code == "NetConnection.Connect.Success";
                 if (good)
                       //Shared object
                       pointer_so=SharedObject.getRemote("point",nc.uri,false);
                       pointer_so.connect (nc);
                       pointer_so.addEventListener (SyncEvent.SYNC,doUpdate);
            private function doUpdate (se:SyncEvent):void
                 for (var cl:uint; cl < se.changeList.length; cl++)
                       trace(se.changeList[cl].code);
                       if (se.changeList[cl].code == "change")
                           if (Cerchio)
                            switch (se.changeList[cl].name)
                                 case "xpos" :
                                       Cerchio.x=pointer_so.data.xpos;
                                       break;
                                 case "ypos" :
                                       Cerchio.y=pointer_so.data.ypos;
                                       break;
                        else if (Quadrato)
                               switch (se.changeList[cl].name)
                                 case "xpos" :
                                       Quadrato.x=pointer_so.data.xpos;
                                       break;
                                 case "ypos" :
                                       Quadrato.y=pointer_so.data.ypos;
                                       break;
            private function beginDrag (e:MouseEvent)
                if (Cerchio)
                     Cerchio.addEventListener (MouseEvent.MOUSE_MOVE,moveMc);
                     Cerchio.startDrag ();
                else if (Quadrato)
                     Quadrato.addEventListener (MouseEvent.MOUSE_MOVE,moveMc);
                     Quadrato.startDrag ();
            private function endDrag (e:MouseEvent)
                if (Cerchio)
                     Cerchio.stopDrag ();
                else if (Quadrato)
                     Quadrato.stopDrag ();
            private function moveMc (e:MouseEvent)
                e.updateAfterEvent ();
                if (Cerchio)
                     pointer_so.setProperty ("xpos",Cerchio.x);
                     pointer_so.setProperty ("ypos",Cerchio.y);
                else if (Quadrato)
                     pointer_so.setProperty ("xpos",Quadrato.x);
                     pointer_so.setProperty ("ypos",Quadrato.y);
    I need of a server side file?
    Thanks.

    I solved it!!
    I duplicated the script....
    It's work perfectly..
    Emiliano.

  • Need Help with Sticky Hide and Show 0.9

    I am trying to implement Sticky Hide and Show v0.9 into my applications. I have created a custom region named "Hide and Show Sticky" for Theme 8 as shown in the example application. However when I use the templet my region does not have a hid/show button. I have very little experience with Templates so any help would be great!

    Sorry for the bump. I am REALLY stuck! I viewed the source with the region using the Seeded (Non-Sticky) template and using the new Sticky template. I see some dramatic differences but nob that make sense to me. I tried to past the lines in the forum but they are blocked.
    Any help would be great!

  • Stop and Play All Child MovieClips in Flash with Actionscript 3.0

    I am stuck with the ActionScript here. I have a very complex animated flash movie for eLearning. These contain around 10 to 15 frames. In each frame I am having multiple movie clip symbols. The animation has been created using a blend of scripting and also normal flash animation.
    Now I want to create pause and play functionality for the entire movie. I was able to create the pause function but when i try to play the movie it behaves very strange.
    I was able to develop the pause functionality by refering to the below mentioned links:
    http://www.unfocus.com/2009/12/07/stop-all-child-movieclips-in-flash-with-actionscript-3-0 /
    http://www.curiousfind.com/blog/174
    Any help in this regard is highly appreciated as i am approaching a deadline.
    I am pasting the code below:
    import flash.display.MovieClip;
    import flash.display.DisplayObjectContainer;
    import flash.utils.Timer;
    import flash.events.TimerEvent;
    import fl.transitions.*;
    import fl.transitions.Tween;
    import fl.transitions.easing.*;
    import fl.transitions.TweenEvent;
    import flash.events.Event;
    import flash.events.MouseEvent;
    stop();
    // function to stop all movieclips
    function stopAll(content:DisplayObjectContainer):void
        if (content is MovieClip)
            (content as MovieClip).stop();
        if (content.numChildren)
            var child:DisplayObjectContainer;
            for (var i:int, n:int = content.numChildren; i < n; ++i)
                if (content.getChildAt(i) is DisplayObjectContainer)
                    child = content.getChildAt(i) as DisplayObjectContainer;
                    if (child.numChildren)
                        stopAll(child);
                    else if (child is MovieClip)
                        (child as MovieClip).stop();
    // function to play all movieclips
    function playAll(content:DisplayObjectContainer):void
        if (content is MovieClip)
            var movieClip:MovieClip = content as MovieClip;
            if (movieClip.currentFrame < movieClip.totalFrames) // if the main timeline has reached the end, don't play it
       movieClip.gotoAndPlay(currentFrame);
        if (content.numChildren)
            var child:DisplayObjectContainer;
            var n:int = content.numChildren;
            for (var i:int = 0; i < n; i++)
                if (content.getChildAt(i) is DisplayObjectContainer)
                    child = content.getChildAt(i) as DisplayObjectContainer;
                    if (child.numChildren)
                        playAll(child);
                    else if (child is MovieClip)
                        var childMovieClip:MovieClip = child as MovieClip;
                        if (childMovieClip.currentFrame < childMovieClip.totalFrames)
          //childMovieClip.play();
          childMovieClip.play();
    function resetMovieClip(movieClip:MovieClip):MovieClip
        var sourceClass:Class = movieClip.constructor;
        var resetMovieClip:MovieClip = new sourceClass();
        return resetMovieClip;
    pauseBtn.addEventListener(MouseEvent.CLICK, onClickStop_1);
    function onClickStop_1(evt:MouseEvent):void
    MovieClip(root).stopAll(this);
    myTimer.stop();
    playBtn.addEventListener(MouseEvent.CLICK, onClickPlay_1);
    function onClickPlay_1(evt:MouseEvent):void
    MovieClip(root).playAll(this);
    myTimer.start();
    Other code which helps in animating the movie and other functionalities are as pasted below:
    stage.addEventListener(Event.RESIZE, mascot);
    function mascot():void {
    // Defining variables
    var mc1:MovieClip = this.mascotAni;
    var sw:Number = stage.stageWidth;
    var sh:Number = stage.stageHeight;
    // resizing movieclip
    mc1.width = sw/3;
    mc1.height = sh/3;
    // positioning mc
    mc1.x = (stage.stageWidth/2)-(mc1.width/2);
    mc1.y = (stage.stageHeight/2)-(mc1.height/2);
    // keeps the mc1 proportional
    mc1.scaleX <= mc1.scaleY ? (mc1.scaleX = mc1.scaleY) : (mc1.scaleY = mc1.scaleX);
    stage.removeEventListener(Event.RESIZE, mascot);
    mascot();
    this.mascotAni.y = 100;
    function mascotReset():void
    // Defining variables
    var mc1:MovieClip = this.mascotAni;
    stage.removeEventListener(Event.RESIZE, mascot);
    mc1.width = 113.45;
    mc1.height = 153.85;
    mc1.x = (stage.stageWidth/2)-(mc1.width/2);
    mc1.y = (stage.stageHeight/2)-(mc1.height/2);
    // keeps the mc1 proportional
    mc1.scaleX <= mc1.scaleY ? (mc1.scaleX = mc1.scaleY) : (mc1.scaleY = mc1.scaleX);
    var interval:int;
    var myTimer:Timer;
    // function to pause timeline
    function pauseClips(secs:int, myClip:MovieClip):void
    interval = secs;
    myTimer = new Timer(interval*1000,0);
    myTimer.addEventListener(TimerEvent.TIMER, goNextFrm);
    myTimer.start();
    function goNextFrm(evt:TimerEvent):void
      myTimer.reset();
      myClip.nextFrame();
      myTimer.removeEventListener(TimerEvent.TIMER, goNextFrm);
    // function to pause timeline on a particular label
    function pauseClipsLabel(secs:int, myClip:MovieClip, myLabel:String):void
    interval = secs;
    myTimer = new Timer(interval*1000,0);
    myTimer.addEventListener(TimerEvent.TIMER, goNextFrm);
    myTimer.start();
    function goNextFrm(evt:TimerEvent):void
      myClip.gotoAndStop(myLabel);
      myTimer.removeEventListener(TimerEvent.TIMER, goNextFrm);
    MovieClip(root).pauseClips(4.5, this);
    // function to fade clips
    function fadeClips(target_mc:MovieClip, next_mc:MovieClip, from:Number, to:Number):void
    var fadeTW:Tween = new Tween(target_mc, "alpha", Strong.easeInOut, from, to, 0.5, true);
    fadeTW.addEventListener(TweenEvent.MOTION_FINISH, fadeFinish);
    function fadeFinish(evt:TweenEvent):void
      next_mc.nextFrame();
      fadeTW.removeEventListener(TweenEvent.MOTION_FINISH, fadeFinish);
    // function to fade clips with speed
    function fadeClipsSpeed(target_mc:MovieClip, next_mc:MovieClip, from:Number, to:Number, speed:int):void
    var fadeTW:Tween = new Tween(target_mc, "alpha", Strong.easeInOut, from, to, speed, true);
    fadeTW.addEventListener(TweenEvent.MOTION_FINISH, fadeFinish);
    function fadeFinish(evt:TweenEvent):void
      next_mc.nextFrame();
      fadeTW.removeEventListener(TweenEvent.MOTION_FINISH, fadeFinish);
    // function to show screen transitions
    function screenFx(target_mc:MovieClip, next_mc:MovieClip):void
    //var tweenTW:Tween = new Tween(target_mc,"alpha",Strong.easeInOut,0,1,1.2,true);
    var tranFx:TransitionManager = new TransitionManager(target_mc);
    tranFx.startTransition({type:Iris, direction:Transition.OUT, duration:1.2, easing:Strong.easeOut, startPoint:5, shape:Iris.CIRCLE});
    tranFx.addEventListener("allTransitionsOutDone",doneTrans);
    function doneTrans(evt:Event):void
      next_mc.nextFrame();
      tranFx.removeEventListener("allTransitionsOutDone",doneTrans);
    // function to show screen transitions inverse
    function screenFxInv(target_mc:MovieClip, next_mc:MovieClip):void
    var tweenTW:Tween = new Tween(target_mc,"alpha",Strong.easeInOut,0,1,1.2,true);
    var tranFx:TransitionManager = new TransitionManager(target_mc);
    tranFx.startTransition({type:Iris, direction:Transition.IN, duration:2, easing:Strong.easeOut, startPoint:5, shape:Iris.SQUARE});
    tranFx.addEventListener("allTransitionsInDone",doneTrans);
    function doneTrans(evt:Event):void
      next_mc.nextFrame();
      tranFx.removeEventListener("allTransitionsInDone",doneTrans);
    // function to zoom in
    function zoomFx(target_mc:MovieClip):void
    //var tweenTW:Tween = new Tween(target_mc,"alpha",Strong.easeInOut,0,1,1.2,true);
    var tranFx:TransitionManager = new TransitionManager(target_mc);
    tranFx.startTransition({type:Zoom, direction:Transition.IN, duration:3, easing:Strong.easeOut});
    //tranFx.addEventListener("allTransitionsInDone",doneTrans);
    /*function doneTrans(evt:Event):void
      next_mc.nextFrame();
    // Blinds Fx
    function wipeFx(target_mc:MovieClip):void
    var tranFx:TransitionManager = new TransitionManager(target_mc);
    tranFx.startTransition({type:Wipe, direction:Transition.IN, duration:3, easing:Strong.easeOut, startPoint:9});
    // Blinds Fx Center
    function fadePixelFx(target_mc:MovieClip):void
    var tranFx:TransitionManager = new TransitionManager(target_mc);
    tranFx.startTransition({type:Fade, direction:Transition.IN, duration:1, easing:Strong.easeOut});
    tranFx.startTransition({type:PixelDissolve, direction:Transition.IN, duration:1, easing:Strong.easeOut, xSections:100, ySections:100});

    This movie is an animated movie from the start to end. I mean to say that though it stops at certain keyframes in the timeline it stops for only a certain time and then moves on to the next animation sequence.
    Its not an application where the user can interact.
    On clicking the play button i want the movie to play normally as it was playing before. If the user has not clicked on the pause button it would anyhow play from start to finish.
    Is there anyway where i could send in the fla file?

  • In the iDVD window, there is a box in the lower left corner.  When I scroll over it, I get the message to hide or show the intro movie.  Checking or unchecking the box seems to do nothing.  Can anyone explain?

    Working with iDVD on a project, there is a box in the lower left corner and sometimes another in the lower right corner.  Scrolling over the one in the lower left corner, I get a message indicating that this box hides or shows the intro movie.  I have checked and unchecked the box, but see nothing different in the project.  Nor can I figure out what is meant by "intro movie."  Can anyone explain?

    Go to iDVD Help and type in Intro Movie, and you will get the full version of this:
    Many iDVD themes have “motion menus” that include animations or video that loop, or play repeatedly, until the viewer clicks a menu button. Themes with motion menus have a motion icon in the lower-right corner.
    In addition to background video, iDVD motion menus may also feature an intro, or short animation, that plays once before the part that loops. Other motion menus also include an “outro” that plays after the viewer clicks a button, serving as a transition between the menu and the selected content.
    An example of an iDVD 6.0 theme with an intro and an outro is Reflection White Main. In this theme, the first drop zones appear in the intro, and the buttons and title appear just before the looping part of the background video. In the outro, everything flies offscreen after the viewer clicks a button.
    iDVD provides tools for viewing these motion menus without going into preview mode, which is especially helpful when you are filling drop zones, and for turning the intro or outro off.
    Here are ways to view and edit the background movie:
    ◼ 
    Drag the diamond-shaped motion playhead along the scrubber bar (shown below), to view the background movie, stopping wherever you like.
    (If you don’t see the motion playhead in iDVD, choose View > Show Motion Playhead.)
    ◼ 
    Deselect the checkboxes at the left and right end of the scrubber bar if you don’t want to use the intro or outro, respectively, in your DVD menu.
    The scrubber bar shows the intro and outro as shaded areas at the beginning and end.
    You can also control the intro and outro from the Menu Info window. With your pointer over the menu (and with no buttons or text objects selected), press Command-I to open that window. Select or deselect the Intro and Outro checkboxes in the Background section of the window.
    NOTE: If you drag your own movie to a motion menu background, the outro is automatically removed. To customize the background and keep the outro, use a still image in the menu background instead of a movie.

  • HOWTO show a popup window with ZOOM OUT effect?

    Hi,
    I want to implement such an effect in flex:
    Popup a modal window, which is showing as zooming out from
    the backgroud stage.
    I know how to implement in flash, but how in flex?
    please help.
    thanks.

    When you define the pop-up, set its scaleX and scaleY to
    zero. Then assign its showEffect to a <mx:Zoom> effect. If
    you don't set the initial scale to 0, you may briefly see the
    pop-up at full size before the Zoom effect re-scales it to zero.
    Note that your text may not scale: it depends on the font and
    if the Flash player can scale it; you can always embed the font and
    it will work correctly.
    You can make the Zoom effect either an MXML tag or create it
    with ActionScript when you make the pop-up.

  • Create an image with ActionScript

    How do you create an image with ActionScript? The image is
    located at an url that is not guaranteed to be on the same server.
    I would prefer something that is compatible with previous
    versions of the Flash player.
    If you could point me to some tutorial or show me how it is
    done.
    Thanks

    This is suuuuuuuuuuuuper basic, you just have a movieclip on
    the stage and the URL of any image on the internet/local computer
    function loadImage(imageUrl:String,
    holder_mc:MovieClip):Void{
    holder_mc.loadMovie(imageUrl);
    Fill the two parameters with the 1. image url and 2.
    movieclip that holds the image
    It will load the image into it. Much more in depth tutorials
    and stuff can be found all over the place, just google it.
    Sam

  • Create remoteObject with ActionScript, not MXML

    I want to use remoteObject with ActionScript only, no MXML:
    private function initializeRemoteObject():void {
                _remote = new RemoteObject();
                _remote.source = "AMFProxyObject";
                _remote.endpoint = "http://localhost/linktoMyAMFServer";
                _remote.destination = "zend";
                _remote.showBusyCursor = true;
    public function getIAllData():void {
                initializeRemoteObject();
                var token:AsyncToken = _remote.getAllDataFromStoryTable();
                //token.result = getDataHandler;
    I am stuck here because I don't know the proper syntax to handle the result
    private function getDataHandler ()void
    ///////////////    I just want to convert the MXML code below to ActionScript   \\\\\\\\\\\\\\\\\\\\\\
    <mx:RemoteObject id="zendRemoteObject" destination="zend" source="AMFProxyObject"
            endpoint="http://localhost/linktoMyAMFServer"         
            result="resultHandler(event)">
            <mx:method name="getAllDataFromStoryTable" result="getDataHandler(event)"/>
            </mx:RemoteObject>
    Thanks very much. This is driving me nuts, particularly since I couldn't find any help online by googling.

    Try using a Responder, specifically an AsyncResponder.
       var token:AsyncToken = _remote.getAllDataFromStoryTable();
       var responder:AsyncResponder = new AsyncResponder( resultHandler, faultHandler );
       token.addResponder( responder );
       public function resultHandler( event:ResultEvent, token:Object=null ):void
          Alert.show( "RESULT: "+ event.result as String );
       public function faultHandler( event:FaultEvent, token:Object=null ):void
          Alert.show( "FAULT: " + event.fault.message );
    The following documentation may be helpful:
    http://www.flexafterdark.com/docs/ActionScript-Responder
    I hope that helps...
    Ben Edwards

  • Accessing shape data with actionscript

    Hello.
    I'm wondering, is it possible to access shape data with
    actionscript. I want to draw simple lines with "line tool"
    somewhere in my movieclip and then to access information about my
    lines with actionscript to get startX, startY and endX endY of
    every line. Is it possible?
    thank you.

    I do not believe so. Once you draw a primitive on the stage
    with the api I believe that is all you get. If you create a sprite
    object and then draw into that you might be able to get the sprite
    properties. You may also be able to do the same thing with a
    container movieclip. I don't think just drawing a line with the api
    on the stage will give you anything the reference.

  • How to load and show PDF on stage in Flash using AlivePDF or PurePDF external libraries?

    Hello,
    I searched a lot on internet but didn't find a proper way to load and open/show PDF on stage in Flash. Following are my understandings about this topic.
    I know Flash does not have the built-in functionality to load and show pdf document on stage.
    I know you can do this in AIR application using HTMLLoader class but it required adove reader to be installed on your machine.
    I have used AlivePDF/PurePDF and I know how to export/generate a PDF File using these libraries but I don't know how to use them to load and show PDF document on stage in Flash. According to my research, I think these libraries can accomplish my task but how, I don't know. That's because I am here for your help.
    People suggest to first convert pdf into an image or swf file and then import it into Flash but I don't want this solution because my clients will be importing/uplading PDF file into my software.
    Some people suggest to "Convert PDF renderer code written in C/C++ using Alchemy to flash library" and then use that library to my project. I don't have any idea how to do this. If anyone can help me to achieve required functionality this way, please guide me.
    Now you know about my understandings, so you can guide me in better way. Let me give you an example what kind of functionality I want. Please visit: https://www.pdffiller.com. Upload a pdf file there and you will see that it shows that pdf to user (At the moment, I want this functionality) and pdf annotation i.e. write text on pdf and other functionalities.
    NOTE: I am not a Flex and AIR developer. I am a Flash (Actionscript 3.0) Developer. So please first help according to flash. If you want to offer the solution according to Flex and AIR, you are most welcome.
    I specially want "ADOBE EXPERTS - Adobe Flash developer from Adobe" to comment on this and help me out. It's about 4th day I am without a solution. I am afraid, I'll loose my client if I'll not have a solution in next couple of days.
    Thanks,
    momersaleem
    eLearning Specialist

    Just to throw in a $0.02, I looked at those libraries myself quite a while ago and all they had the ability to do was give you information and assets from the PDF. At that point you literally had to read each page in the PDF (whatever the library could extract), use the information it extracted (position, type size, images, etc) and create a layout engine that could "reconstruct" the page piece by piece.
    I hope it's better these days but that's what I took from those libraries quite a while ago and it may still be true. That would explain "Convert PDF renderer code written in c/c++ using Alchemy to flash library". Someone may already have written a quality layout engine. Otherwise there was no "load pdf, run this ShowPDF() function to add to display list" functionality at all.

Maybe you are looking for

  • Changing Audio, encoder crash v3.0.0.4743

    Hello, After I upgraded to Flash Media Live Encoder 3,its crashing when I change the Audio Device. I'm using a Dell Laptop with Windows Vista - Ultimate 32Bits 2 GHz Core2Duo. 4 GB Memory. I have a built in microphone + line in, when i change to line

  • Using Imac to view cable tv

    I have space for one display in my space challenged abode.  I love the 27" imac and would like to connect it to my cable TV so I can take advantage of the killer display quality on the Imac.  How do I do that?

  • CProjects - Unable to change tabs from graphic to table/detail

    Hello experts, when the tabs in a project under cProjects changed from graphic to table/detail the Display remains to "Please Wait". Further processing of the project is no longer possible. It is  equal if i use WebDynpro application cProjects direct

  • Issue with calling restful services via HTTP in an Orchestration

    The company I work for is using RESTful services for our I/O. We are processing EDI files using Biztalk, and are calling the REST services via HTTP from a c# code called within the orchestration. At lower volumes, the service performs fine, but at hi

  • Can't use comcast email account with Firefox. Why and how to fix it?

    I cannot open my comcast.net email accounts. I can see the Inbox Preview page but I can open, send a new email, etc.. It started Monday evening November 11, 2011. It happened a couple of times a few weeks ago then resolved.