Reading child objects in flash content

I have a vector graphic that originated in Illustrator, which
I then imported into Flash CS3. I converted the graphic elements to
symbols, linking them to AS3 classes, and exported the swf to load
into Flex 3.
I can capture a mouseover event for the individual elements
in the graphic, reading the event.target value just fine, loaded
via the swfLoader or via the Image tag, and feeding the object to
the functions I want to operate on the individual elements.
Now I want to programmatically (and randomly) select the
individual graphic symbols, but can't seem to read them.
In this sample code, which is not working, "background" holds
Flash swf, whether it is a swfLoader, Image, or other Display
Object. The underlying symbols are typed as movie clips, but
casting the selected children as different types doesn't seem to
help.
public function applyRandom():void
var index:int = NumberUtilities.random (0, 100, 1);
var _target:Object;
_target = Object(background.getChildAt(index));
animate(_target);
I've installed Flex Component for Flash CS3 and pulled the
individual components into Flex, but not the whole graphic. Even if
I re-composed the graphic by moving the individual symbols back
into place, in my initial tests, I am running into the same
problem.
Any suggestions would be greatly appreciated.

I have it solved.
loadedMC = MovieClip(background.content);
var _index:int = NumberUtilities.random (0,
loadedMC.numChildren-1, 1);
var _target:Object = Object(loadedMC.getChildAt(_index));
animate(_target);

Similar Messages

  • Adobe Reader cannot play embedded Flash content

    I don't know why, the Flash format was originally created by Macromedia, and then Adobe acquired the company, but the Adobe Reader cannot display Flash content.
    My PDF file is here:
    http://genifer.googlecode.com/files/agi-book.pdf
    Scroll to page 37.
    The original SWF file is here:
    http://genifer.googlecode.com/files/unified-AND-OR.swf
    which *can* be played on my Chrome browser.
    But when I embedded the SWF file in the PDF, the result is unplayable.
    A clue is:  Adobe Reader asked me to download QuickTime to display media contents.  So I downloaded QuickTime.  But QuickTime nowadays has removed Flash support.  Why did Adobe Reader ask me to download QuickTime to display Flash, when Adobe owns the Flash format?
    I have also tried selecting other media players in the Reader's option box (eg, Windows Media, Windows built-in, Adobe Flash, etc) but none of them works.
    I have also tried using Adobe Acrobat Professional 9.  Same result.
    It seems to be a problem with Adobe Reader.  Any suggestions?
    Thanks!

    Adobe Reader most certainly CAN play embedded Flash content, but only if you embed it properly.
    You're seeing a Quicktime warning because you're embedding the SWF as "legacy media" content - this is no longer supported for authoring and is disabled by default for playback.You should use Rich Media Annotations instead (embedding using the multimedia/flash tool in Acrobat 9 or Acrobat X).

  • Flash Content in HTMLLoader ignores DisplayList

    When using an HTMLLoader to load a page that includes Flash
    content, the Flash content always appears at the top of the
    applications displayList. Even if a DisplayObject is given a higher
    index than the HTMLLoader object, the Flash content always appears
    on top.
    Can anyone offer any help on this?

    HI Shift_nis - you need to set the index on adobe display objects so example
    window.htmlLoader.stage.setChildIndex(displayObject,1)
    will set the index to 1.
    Example:
    http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/display/DisplayObjectConta iner.html
    Hope this helps
    K

  • Cannot access flash content in adobe reader

    Opening flash content in Adobe reader causes Adobe reader to advise me that "flash player" is required.
    I have cleaned and reinstalled the latest flash and adobe reader multiple times.
    I have reset the internet options and checked the plugins
    I have installed shockwave
    I have verified flash works fine in internet explorer
    I have tried the "repair installation" in Adobe Reader.
    I have manually scanned the registry and cleaned it of all adobe registry entries then reinstalled all adobe applications (they all acted as if it was their first time and functioned properly).
    ANY help would be appreciated.

    Adobe and Flash content wrote:
    What is the difference between that file and the one that ends with "AX" from the adobe web site.
    Further from what TSN has already explained: Internet Explorer uses a technology called ActiveX for browser add-ons; that's what the "AX" stands for.  All other browsers use the "plugin" technology (NPAPI) originally developed by Netscape.
    I have for years tried to convince Adobe to provide a single installer for Windows that installs all Flash Player components, instead of two different installers (https://bugbase.adobe.com/index.cfm?event=bug&id=2945082).  Unfortunately this seems to be a lost cause.  But you can go to the bugbase link in the previous sentence, and cast a vote to implement it.

  • Which versions of Acrobat reader supports embedded Flash content?

    I was wondering which versions of Acrobat supports Flash files (or Flash content) that might be found embedded within PDF files?
    Specifically, does version 6, 7 or 8 have this capability?

    The wikipedia entry for Adobe Acrobat says this regarding Acrobat reader version 9:
    "Insert FLV (Flash) or H.264 video for direct playback in Adobe Acrobat and Adobe Reader."
    The way I read that, it says that the ability to handle pdf files with embedded flash content was introduced with Acrobat reader version 9, and did not exist in earlier versions of Acrobat reader.
    So are you sure that older Acrobat reader versions (specifically, version 6) is capable of correctly handling flash content embedded within a pdf file?

  • Acrobat reader X unable to display flash content (swf) why?

    Basically we have a OBIEE dashboard page which has some flash content and we also have the ability to download/ export this swf file into PDF
    when i try to export it and save it  to my local machin the pdf file opens but it just shows an empty page with the SWF placeholder nor does it play the movie.
    My system config:
    Windows 7
    Flash player 10 debugger version
    Adobe acrobat reader X version 10.0.0.0
    But when i do the same on my  friends laptop it works fine..
    (he has similar configurations but Dell laptop and both connecting to same server to download pdf)
    WHY is this happening and how do i resolve this?
    HELP PLEASE!

    Post your problem in the forum for Adobe Reader.

  • Loading child SWFs with TLF content (from Flash CS5.5) generates reference errors in FB4.6

    I am currently producing e-learning content with our custom AS3-Framework.
    We normally create content files in Flash CS5.5 with dynamic text fields, which are set at runtime from our Framework (AS3 framework in FB4.6).
    Now we are in the progress of language versioning, and since one of the languages is Arabic we are changing the dynamic text fields to TLF fields.
    Then all my problems started.
    In Flash I have chosen to include the TLF engine and to export in frame 2.
    (see to: http://helpx.adobe.com/flash/kb/loading-child-swfs-tlf-content.html )
    I get this error:
    VerifyError: Error #1053: Illegal override of getEventMirror in flashx.textLayout.elements.FlowLeafElement.
                at flash.display::MovieClip/gotoAndPlay()
    I guess it is because our framework wants to gotoAndPlay before the TLF engine has been loaded.
    Can this be it?
    Any good suggestions on how to handle loading child SWFs with TLF content.

    Please refere to the following articles .. you may find some help.
    http://www.stevensacks.net/2010/05/28/flash-cs5-tlf-engine-causes-errors-with-loaded-swfs/
    http://www.adobe.com/devnet/flash/articles/preloading-tlf-rsl.html
    I also faced similar problem and posted a question at the following link, but, I still couldn't find the solution.
    http://forums.adobe.com/message/4367968#4367968

  • 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?

  • Flash Content Freezes Temporarily in IE

    After moving the mouse on to Flash content on a web page in
    IE6 and IE7, it freezes for a few seconds, and then becomes
    responsive again. It seems that when this happens, everything on
    the page including links and rollover images become unresponsive as
    well.
    I tried reinstalling IE7 (during which time I tested the
    problem in IE6) with no luck in either browser. There was still a
    slight duration of unresponsiveness. I also uninstalled flash
    player and installed the standalone version of 9,0,28.
    Firefox and Opera are both fine and do not present this
    issue.
    I know this is confined to my PC only as I tested it on my
    flat mate's PCs. But I was wondering if anyone else has had this
    problem or might be able to help or suggest something to try.
    It might be worth noting that when the Flash content is
    playing audio, the audio does not stop when the mouse and visual
    frames halt for that short period.

    Solved!
    It was a problem with FlashGet 1.80. This version of FlashGet
    introduced a Flash download button which annoyingly popped up right
    under the mouse cursor when you moused over a Flash object on a web
    page and must have been causing any Flash content to pause for a
    short time.
    The latest version of FlashGet v1.82 does not present this
    problem :)

  • How to display Flash Content uploaded in Admin Console

    HI All ,
    I have created a flash content in the admin console.Flash file is uploaded to a binary property.
    I have to display that flash file in the JSP.
    Normally , a Image can be displayed in the JSP , with following tag,
    *<img src="<%=request.getContextPath() + "/ShowProperty" + node.getPath()+"//Brochure-Image"%>" />*
    But how to display a flash content uploaded in the admin console.
    Pls suggest me in this regard,
    Srinivas

    There is no wlp tag to display flash image. You have to use HTML object tag for this. Just google it and you will find lot of answer how to include flash file in your JSP.
    Either you pass a path to your repository or save the file somewhere on you local drive and use that path.
    <object width="968" height="209" id="mymoviename">
                        <param name="movie" value="../flash/abcd.swf"/>
                        <param name="quality" value="high"/>
                        <embed src="../flash/abcd.swf" quality="high"
                        pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash"
                        type="application/x-shockwave-flash" width="774" height="204"></embed>
    </object>

  • Get IE8 to display Flash content

    Does anyone have a bullet proof method for embedding Flash content so that it shows in all flavors of IE8 WITHOUT having the user change settings on their machine?
    I'm working on a project that was tested by a couple of people who could see the content then click on a link in the Flash content which loads a URL in the same page THEN when they hit the back button in their IE browser the Flash content doesn't show.
    I was using SWFObject to embed but have switched to a simple method shown below:
    <object type="application/x-shockwave-flash" id="cdbwidget" data="CDBabyStore_widget.swf?customerID=xhWv7J5EP8fi22rByrPcVg%3d%3d&byType=ByCustomer&si teURL=document.referrer&colorScheme=0x000000,0xE0E0E0,0xCCCCCC,0x666666,0x333333,0xFFFFFF, 0xFFFFFF" width="550" height="575">
        <param name="movie" value="CDBabyStore_widget.swf?customerID=xhWv7J5EP8fi22rByrPcVg%3d%3d&byType=ByCustomer&s iteURL=document.referrer&colorScheme=0x000000,0xE0E0E0,0xCCCCCC,0x666666,0x333333,0xFFFFFF ,0xFFFFFF" />
    </object>
    I've tested this on Windows 7 running IE7, 8 & 9 and it works flawlessly but two people are having the issue I noted above.
    Thanks for any tips.

    In a nutshell, if you've tested it and it works, it works. The two people who are having problems (there will probably be thousands more worldwide) have a setting in their Internet Options or in Windows that is causing the problem.
    You might want to run this through the Flash and Dreamweaver forums as well to get some more insight from people who are more skilled at Flash integration and older browser compatibility.

  • Flash content does not work

    I have installed and re-installed Flash but no matter what, Flash content will not play in either Safari or Firefox. I get a semi-greyed out QuickTime logo with a white question mark wherever a banner ad or any other Flash object should be.
    I ran AppleJack. That didn't help. Any ideas?
    Gary

    These are the downloads and the settings you need in order to view/hear pretty much everything that the net can throw at you: The setup described below has proved repeatedly successful on both PPC and Intel macs, but nothing in life carries a guarantee!
    Assuming you already run Tiger versions OS 10.4.9 or above (this has not yet been verified with Leopard) and have Quicktime 7.2 or above, and are using Safari 2 or 3, download and install (or re-install even if you already had them) the latest versions, suitable for your flavor of Mac, of:
    RealPlayer 10 for Mac from http://forms.real.com/real/player/blackjack.html?platform2=Mac%20OS%20X&product= RealPlayer%2010&proc=g3&lang=&show_list=0&src=macjack
    Flip4Mac WMV Player from http://www.microsoft.com/windows/windowsmedia/player/wmcomponents.mspx (Windows Media Player for the Mac is no longer supported, even by Microsoft)
    Perian from http://perian.org/
    Adobe FlashPlayer from http://www.adobe.com/shockwave/download/download.cgi?P1ProdVersion=ShockwaveFlash
    In Quicktime Preferences, under advanced, UNcheck Enable Flash, and under Mime settings/Miscellananeous only check Quicktime HTML (QHTM).
    In Macintosh HD/Library/Quicktime/ delete any files relating to DivX (Perian already has them).
    Now go to Safari Preferences/Security, and tick the boxes under Web Content (all 4 of them).
    Lastly open Audio Midi Setup (which you will find in the Utilities Folder of your Applications Folder) and click on Audio Devices. Make sure that both Audio Input and Audio Output, under Format, are set to 44100 Hz.
    Important: Now repair permissions and restart.
    The world should now be your oyster!
    You should also have the free VLC Player from http://www.videolan.org/ in your armory, as this plays almost anything that DVD Player might not.

  • Flash content (embedded using SWFObject or using other methods) won't print

    All Flash content embedded using SWFObject or using other methods won't print anymore, since version 3.6.4.
    There is a blank square on the printed page instead of the object.
    There was no trouble with previous firefox version.
    I've got the issue with version 3.6.4, 3.6.6 & 3.6.7
    I'm using Adobe flash player version 10,1,53,64 ; I've tried to downgrade to Adobe flash player version 9, I'd got the same issue.
    I've tried from multiple computer and still had the same blank square.
    Thanks for your help !
    == URL of affected sites ==
    http://www.bobbyvandersluis.com/swfobject/testsuite_2_2/test.html

    Having the same problem with our flash based design tool. For now we're recommending that our users use IE as it prints the flash objects fine. Would prefer to use Firefox, but that won't be an option until flash objects can be printed again (as they used to be).
    example:
    [http://webblox.libertycable.com/print_fl.asp?partid=202531&checksum=5523020.37&rand=728201062255PM]

  • Adding dynamic preloader and percentage to flash content

    I am trying to add a dynamic preloader and I am also trying to show users the loading percentage of flash content.
    I searched Google and mostly creating preloader with Adobe Flash came up.
    What I am trying to do is adding this programatically.
    For example if Angry birds is loading, first it should say that the flash game is loading, please be patient.
    Here is the homepage: Full Screen Game
    I am using PHP/Jquery. It would be really great if it is possible to do that with Jquery.
    Thanks for your time,

    it would be easier to debug an xml file that's formatted nicely rather than a string that you'll cast into an xml object.  so, pass the xml path and use a formatted xml file.

  • Indesign : how to move a rectangle object with his content ?

    hi
    i develop an indesign extension with flash builder and cs extension builder 2.
    when I move a rectangle object containing an image with the geometricBounds property the image does not move and is not visible anymore ...
    how to move a rectangle object with his content ?
    thanks
    Simon

    Use rectangle.move()

Maybe you are looking for