AS3 coding - movie in swf file doesn't show

I would be so greatful if someone can help with this. I've been sitting for days to find my mistake but my inexperience really holds me back here
In my spelling game I have letters falling out of the sky - players have to click on them. I tested one letter in this swf. It works as I planned but it was only one letter hard coded.
So now I have many levels and I added the letters needed for each level in arrays generated through a loop. They trace correctly, but they do not show up in this swf.
I'm sure I am just missing a bit of code in the function or didn't addChild correctly. I doubble checked that the missing MC is not behind the background by turning the backgroung off, but it is not that.
Where am I going wrong?
Here is the relevant code:
package
    import flash.display.*;
    import flash.text.TextField;
    import flash.events.Event;   
    import flash.utils.Timer;
    import flash.events.*;
    import flash.events.MouseEvent;
    import flash.media.Sound;
    import flash.media.SoundChannel;
    public  dynamic class WordArray extends MovieClip
                public var wordtext:wordText =  new wordText;
                var activeWordArray:Array;
                var activeLevelofTenWordsArray:Array;
               var activeLevelofTilesArray:Array;
                public var letterArray:LetterArray;
                var tileTimer = new Timer(500,384);
        //Movie clips of letter tiles to be used
        public var a:A = new A();
        public var f:F = new F();
        public var g:G = new G(); //etc. for all mc's
        private var wordArray:WordArray;
        private var letterTiles:Array = [a,f,g..etc];
                              private var  lettersL01:Array = [a,a,f,f,f,g,g,h,h,i,i,n,n,n,o,o,o,o,s,s,t,t,t];
                              private var  lettersL02:Array = [th,th,  //etc for all levels..
                            public var letterLevels:Array = [lettersL01,lettersL02,lettersL03,lettersL04,lettersL05,lettersL06,le ttersL07,lettersL08,lettersL09,lettersL10,
                                                                              lettersL11,lettersL12,lettersL13,lettersL14,lettersL15,lettersL16,let tersL17,lettersL18,lettersL19,lettersL20,
                                                                              lettersL21,lettersL22,lettersL23,lettersL24,lettersL25,lettersL26,let tersL27,lettersL28,lettersL29,lettersL30];
public var  wordsL1W1:Array = ["a"];  //etc for all words
public var  wordsL01:Array = [wordsL1W1,...etc for all levels];
public var wordLevels:Array = [wordsL01,wordsL02,...etc. for entire word array]
                private var tf:TextField;
                // ***constructor code
                public function WordArray(_tf:TextField)
                    tf = _tf;
                    levelGenerator();
                function levelGenerator():void
                    //**To get next level of 10 words
                    if(wordLevels.length>0)
                        activeLevelofTenWords();
                        tileGenerator();
                    else
                    //Game is complete
                function activeLevelofTenWords():void
                    // na
                function tileGenerator():void
                    if(letterLevels.length>0)
                            activeLevelofTiles();
                    else
                            //Game is complete
function activeLevelofTiles():void
                        activeLevelofTilesArray = letterLevels.shift();
                    initLetterTiles();
                    function initLetterTiles():void
                        for(var j:int=0; j<3; j++)
                         {  shuffle(activeLevelofTilesArray);
                            for (var i:int=0; i < activeLevelofTilesArray.length; i++)
                                trace (activeLevelofTilesArray[i]);
                                activeLevelofTilesArray[i].x = 399;
                                activeLevelofTilesArray[i].y= 30;
                                addChild(activeLevelofTilesArray[i]);
                            function shuffle(a:Array)
                                var p:int;
                                var t:*;
                                var ivar:int;
                                for (ivar = a.length-1; ivar>=0; ivar--)
                                    p=Math.floor((ivar+1)*Math.random());
                                    t = a[ivar];
                                    a[ivar] = a[p];
                                    a[p] = t;

part of your problem could be that I am only seeing that you create one instance of every letter but using this letter multiple times in your Arrays
check this code:
var a:A = new A();
addChild(a);
addChild(a);
addChild(a);
addChild(a);
addChild(a);
addChild(a);
for (var i:int = 0; i<=stage.numChildren-1;i++){
    trace("checking");
    if (getChildAt(i) is A){
        trace("A found");
Flash will throw no error and you might think that you actually put multiple instances of A on stage, but in fact Flash only creates one instance.
similar thing with your code:
[a,a,f,f,f,g,g,h,h,i,i,n,n,n,o,o,o,o,s,s,t,t,t];
addChild(activeLevelofTilesArray[i]);
will not add multiple instances of your objects if you only use the new keyword once for every letter.
Another thing: Why do you need WordArray to be dynamic?
Using dynamic has some caveats: http://flexblog.faratasystems.com/2006/10/02/actionscript-3-dynamic-classes

Similar Messages

  • SWF files doesn't show in flash

    I converted some videos into swf files. I opened them in flash player and they all look fine,  but when I imported one  in flash and put it in the scene the only thing visible was a small white circle, like the one that appears at the center of the objects when you select them. It couldn't be moved, it could barely be selected  and it doesn't show up when testing the movie.  I don't need to edit the video in flash, I just want to put it together with other elements, something similar to this http://mawichan.deviantart.com/art/Oban-WEB-PAGE-381429374
    I have the suspicion that they don't work because they were not originally made in flash, since I have worked with swf files in flash before, but those were banners previously made in flash.
    However I would like to hear the opinion and/or advice of someone who knows more  than me, I am still a beginner.
    Thank you.

    video files should be played in flash using the flvplayback component (or using the netstream class), not converted to swfs. ie, create a fla, add an flvplayback component to your stage and, in the properties panel, assign the component's source to be your video file.  (use a relative path.)

  • All text in SWF file doesn't show

    I have 3 text pages in a site that need to be shown in the ScrollPane Component. They are 3 different sizes: 640 X 1150, 640 X 2300 and 640 X 2800. I know that the max depth is 2880 px. When I preview each text SWF file in either HTML or Flash, the text is cut off about 1/3rd of the way from the bottom, but the Pane keeps scrolling with blank space and no text. I've linked each SWF file to it's ScrollPane and the same situation holds true in the Flash site file. It seems to me that it's not the ScrollPane component, It's my Flash file. Do any of you magical Guru's have a reason or solution for this? Thanks for any insight. I'm blind at this point.

    I've solved the problem in a round-about way. I re-did the SWF files in Flash 8! All the text was there when I previewed it in Flash 8 and when I moved the SWF F8 file to the FCS4 folder site the ScrollPane worked perfectly. Looks like a Flash CS4 problem to me. I hope this helps others with the same problem. I'm just glad I still have Flash 8 on my computer! Hello, Adobe or should I say Macromedia? Sorry.

  • Flash CS5.5, SWF file doesn't load TLF text.

    Hiya,
    I just downloaded the trial version of Flash 5.5. I was trying to a tutorial from  Adobe Classroom in a Book: Flash Professional CS5. I was trying to do lesson 7 which is all about TLF text.
    In the tutorial, you insert text that is TLF text. Most of the text doesn't do anything (it's Read-Only). But there is one area that is supposed to be a Mortgage Calcualtor and functions with ActionScript.
    I inserted the ActionScript that makes the Mortgage Calculator text do the proper math. My problem happens when I try to test the movie: the SWF file doesn't display any of the TLF text, and the Output panel gives me the following:
    ReferenceError: Error #1065: Variable TLFTextField is not defined.
    ReferenceError: Error #1065: Variable TCMText is not defined.
    I am confused because there aren't any variables with those names in any of the files of the tutorial, or in the ActionScript I entered. Where is Flash getting those variable names from? O_o
    I even turned the text back into Classic text to see if that helped, but I still get the error. Could this be a glitch with Flash 5.5?
    Thanks for your time.
    Tara

    That file has all the menu items in it.
    A crossdomain file is use as a security measure. Perhaps I see it because I use a webpage on my own server to display your SWF file. Check to see if that's the case with you.
    But I gave it another try.
    I downloaded the menu.swf and the xml file and stored them in a folder. I use a custom webpage and stored that in the same folder.
    Instead of the full URL is simply use the filename.
    <object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" id="obj1"
    codebase="http://download.macromedia.com/pub/shockwave/cabs/ flash/swflash.cab#version=6,0,40,0" border="0"
    width="870" height="800">
    <param name="movie" value="menu.swf">
    <param name="quality" value="High">
    <embed src="menu.swf"
    pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" name="obj1"
    width="870" height="150"></object>
    That works.
    When I paste the <object> code in the HTML Snippet and use relative URLs to the menu in the folder mentioned above, I noticed that the XMLHorizontalMenu.xml is expected to be in the Pagename_files folder. That folder belongs to the iWeb pages it is embedded in. When I put the xml file there, the menu works.
    You have to check the design of the menu.swf file.
    Otherwise, store all files in a separate folder and use a <iframe> to embed it.

  • Firefox will not show links to flv files. I get the error message for each flv file: "File not found. Firefox can't find the file at (path) .flv." Any mov and swf files in this same path will show. I can see the videos in Safari so the paths are correct.

    Firefox will not show links to flv files. I get the error message for each flv file: "File not found. Firefox can't find the file at http:// (path) .flv." Any mov and swf files in this same path will show. I can see the videos in Safari so the paths are correct.

    Is this a webpage that contains a link to a flv file? Please post a link to the page and tell us which link(s) are the problem flv files or else post a link to the .flv file itself.
    Alternately, click on one of the sample FLV File links on this page and tell us exactly what happens:
    http://www.mediacollege.com/adobe/flash/video/tutorial/example-flv.html
    It might also help if you post the exact error message, including the path to the flv file.
    '''Note:'''
    Depending on how you have Firefox set up, clicking on a FLV File link will either save the FLV file to your computer or Firefox may open it automatically in an external application right after downloading (Firefox may ask you first). Firefox itself can't play FLV files so you need a "helper" application (or a plugin for flv files, if ther is one. You can see if Firefox is already set up to download or open FLV files by going to Firefox Preferences and looking in the Applications list. Find the FLV file type in the list and, if the action is "Open with", it should show the application that can play FLV files (e.g., VLC Media Player or Perian). See [[Managing filetypes]] for more information.

  • UITextField from .xib file doesn't show

    A UITextField from .xib file doesn't show when it's page comes up on the iPhone simulator.
    The View looks fine in Interface Builder, and no warnings are thrown to Console or IB's Info window.
    On the Simulator the View comes up and a Label and a Switch show, but not a UITextField. The Objects are on the same row and their bounds are all appropriate.
    I don't see anything in the Text Field Attributes of IB that is problematic, plus I've probably tried all combinations of settings. In Connections there is a reference to a File's Owner attribute.
    I have been able to create a UITextField programmatically.

    Worked around the problem by deleting the UITextField from the .xib and re-creating it.

  • Interactive pdf with movies/swf files doesn't work in up-to-date Acrobat Reader

    Hi, I've a CS6 InDesign doc with movies (MP4's from a URL) and a few swf files. When exporting as an interactive pdf, all the links, movies, swf's work fine in my Acrobat Pro. They work fine on other peoples PC's with Acrobat Pro. But on all my clients PC's with up to date Reader, the movies are playing slow, and the pdf just doesn't work as expected. With links to next page etc not working either. They have up dated their Flash Player too. Still not working well.
    Is there a magic fix? Can I re-save this pdf differently so they can experience all the interactive features properly?
    I created a similar pdf last year from CS5, but adding in the movies & links on the pdf. Do I have to do this again?
    Yours, mostly quite fed uply, Gina !

    Is it possible that your client's PC is just a very slow machine? You might consider cutting out some of the interactivity if your PDF is to complex to be handled by less powerful machines.

  • AS3 issue embedding AS2 .swf files

    Hi there,
    I'm attempting to create a menu navigation system with Flash/AS3 that opens up a series of older AS2 activities.
    At the moment I'm testing it with two buttons/two activities.
    The problem I'm having is that when I'm testing the navigation, the first button clicked will open its respective activity correctly, which can then be shut down using the original activity's exit button, and return to the two buttons on my AS3 menu. However, if I then select the other activity from the same screen, it won't load. I'm able to click the original activity again, and have it open, but not the new one.
    If I test the main flash navigation file again and click the other button first (that wasn't working), the other activity opens fine, and can be closed down. However the first button now won't open the activity. So both the buttons work (if they're the first ones clicked), but from then on, only the first button clicked works.
    In the debug panel, it looks as if the AS2 .swf files that I'm attempting to embed are themselves embedding a wrapper.swf file (with navigation buttons) as well as another sub set of shared .swf files for their own operation. Might it possible that these sub swf files aren't being unloaded properly when I switch between the main AS2 movies from my menu system?
    Is there a way to clear/unload everything that's been loaded (even resources loaded by the external files themselves - like a hard reset) between button presses?
    I have no access to the original AS2 code as this was done by another team years back.
    I'd be really grateful for any help or advice that anyone might be able to give.
    Thanks

    Just looking at the debugging panel, this is what I see when I try and run the program:
    Attempting to launch and connect to Player using URL /*****/*****/****.swf
    [SWF] Volumes:Data:Documents:*****:****:****:*****.swf - 876582 bytes after decompression
    [SWF] Volumes:Data:Documents:*****:****:****:*****:F11_pr_qu_3:quiz.swf - 176016 bytes after decompression
    LocateFolders.enginesFolder(file:///*****/****/****/*****/F11_pr_qu_3/quiz.swf)
    [SWF] Volumes:Data:Documents:*****:****:****:*****:F11_pr_qu_3:wrapper.swf - 481279 bytes after decompression
    ### Latest wrapper ###
    etc etc...
    Then follows a whole set of loading instructions and trace instructions put in the as2 swf which show XML files being loaded and the program launching. These must have been put in place by the previous programmer.
    When I click the exit button on the 'embedded' swf, the debugging panel shows things shutting down:
    ActivityToolbar clickQuit()
    Wrapper quitActivity()
    EndGame clear(false)
    Now when I click the second button, I should see a similar set of launching greetings etc. instead it bottles out at the following:
    [SWF] Volumes:Data:Documents:*****:****:****:*****:F11_wb_fc_1:flashcards.swf - 94720 bytes after decompression
    LocateFolders.enginesFolder(file:///file:///*****/****/****/*****/F11_wb_fc_1/flashcards.s wf)
    And there it stops.
    If I restarted the program and pressed the second button first, it would show the flashcards.swf activity loading correctly, but would then refuse to load the first activity when I clicked on the button.

  • When loaded in an internet browser, a Captivate 2 exported flash player 8(.swf) file doesn't pause when it should

    I have made tutorials using Captivate 2 and exported them as
    an .swf file. When played in Flash Player 8, when previewed in
    Captivate 2, and when loaded in an internet explorer, it doesn't
    pause at each slide like I have programmed it to do in Captivate 2.
    I have put buttons in each slide and make them pause the slide
    until the viewer clicks on it an tells it to move on. It randomly
    doesn't pause and continues on to the next slide. It sometimes
    works and sometimes doesn't work. It's not consistently one slide
    and not another. It is random. Does anyone have a clue what is
    wrong?

    Thank you for pointing out that I need to download the projector. How do I ensure that every time I double click on a swf file, it does not launch Adobe Flash Professional, but instead, it launches Flash Player ver 14. Do I have to place the Flash Player Projector in the library or applications, where exactly should it be placed.
    Next, when I launched Flash Player ver 14, to open the swf file, I clicked on a button that is linked to a website - I get a message:
    "Adobe Flash Player has stopped a potentially unsafe operation,... To let this application  communicate with the Internet, click on settings" I clicked on settings and get the attached panel, which does not make sense to me. And I cannot launch a website by clicking on the button contained in the swf file. Please advise.
    I am using a Mac Book Pro, OSX 10.9.3

  • Small Unwanted Image Movement in .swf File

    Hi. I'm not a Flash developer, so please excuse this question
    if it is sophomoric. Someone created a .swf file for my site that
    transitions multiple images in & out. It can be seen here:
    http://www.shadyladylighting.com.
    The problem is the images seem to abruptly move/jump as they
    are in transition. It's almost as if they jump quickly before they
    change. You have to look close to see it, but it's very annoying
    once you see it happening.
    Can anyone tell me what the problem is and how it should be
    fixed? Although I can't fix it I must hire someone to do so, and
    basically I want to know what the problem is before I pay someone
    to fix it.
    Thanks,
    Mike

    Hard to say what that problem is without seeing the source
    (FLA) file - do you have that by chance?
    Chris Georgenes / mudbubble.com / keyframer.com / Adobe
    Community Expert
    GACUTIL wrote:
    > Hi. I'm not a Flash developer, so please excuse this
    question if it is
    > sophomoric. Someone created a .swf file for my site that
    transitions multiple
    > images in & out. It can be seen here:
    http://www.shadyladylighting.com.
    >
    > The problem is the images seem to abruptly move/jump as
    they are in
    > transition. It's almost as if they jump quickly before
    they change. You have
    > to look close to see it, but it's very annoying once you
    see it happening.
    >
    > Can anyone tell me what the problem is and how it should
    be fixed? Although I
    > can't fix it I must hire someone to do so, and basically
    I want to know what
    > the problem is before I pay someone to fix it.
    >
    > Thanks,
    > Mike
    >

  • Swf file doesn't appear

    hi
    i'm a completely new with using flash and dreamweaver. so please sorry for this question.
    i used a template from flash and converted it into a swf. after i integrated that swf file into
    my dreamweaver template. now on my local browser it does work but as soon as i upload the
    file the swf doesn't appear.
    the specific website would be http://www.shivaslounge.ch/pix.html
    thank you so much for a help.
    patrick

    What Ned said.
    Rephrase:
    "Upload to your server the Scripts folder which DW created for you when you inserted the Flash."
    PS: upload the entire folder to your server, not just the .js files. The code which loads the Flash is looking for the .js files inside a folder named Scripts. Doesn't currently exist hence no Flash appears on your webpage.

  • Swf File doesn't display in chrome but displays in firefox

    Hi there, I made a swf file and embed it in my website.
    URL: http://worldwidefilipinoalliance.com
    It displays properly in the mozilla firefox but not in my google chrome.
    Is this problem related to the browser or the way that I embeded my swf file.
    Can you give me a tip on how to solve this.
    Thank you and regards!

    Your embedding code appears to be minimal, as well as the old version, which could be the problem.  The more modern embedding code will use either swfobject or other javascript-based coding.  If you can get a hold of a newer version of Flash you should let Flash generate an html page and then copy and paste the embedding code from that into your html page.

  • *.swf file doesn't work normally in safari browser

    I'm Flash Mx user and i use it for animation, advertisement, banner on the web.
    *.swf file works well in explore, but not in safari browser.
    So I cann't see the flash contents(*.swf) in safari, even if flash player v11.0 is installed.
    I mean *.swf file dosen't work normally.
    Please let me know the reason.

    Hi..
    See if this works for you >  http://techtips.salon.com/download-swf-files-mac-1619.html

  • SWF file doesn't open with Flash Player

    Hi,
    1) I have a swf file on my desktop. Where in my computer should i go to launch Flash Player in order to play the swf file? When I double click on th swf file, it launched Adobe Flash, rather than Flash Player.
    2) Furthermore, I have just uninstall Flash Player and re-install the latest version, as the safari browser confirms that I have the ver 14 of Flash Player installed. When I check my Adobe Flash folder, it still has the old Flash Player. How do I get this updated?
    3) How can I get the recently installed Flash Player app into my applications folder?
    Thank you

    Thank you for pointing out that I need to download the projector. How do I ensure that every time I double click on a swf file, it does not launch Adobe Flash Professional, but instead, it launches Flash Player ver 14. Do I have to place the Flash Player Projector in the library or applications, where exactly should it be placed.
    Next, when I launched Flash Player ver 14, to open the swf file, I clicked on a button that is linked to a website - I get a message:
    "Adobe Flash Player has stopped a potentially unsafe operation,... To let this application  communicate with the Internet, click on settings" I clicked on settings and get the attached panel, which does not make sense to me. And I cannot launch a website by clicking on the button contained in the swf file. Please advise.
    I am using a Mac Book Pro, OSX 10.9.3

  • SWF File Doesn't Upload Completely

    I am taking a Flash class and we are using a book to make flash projects. I am suppose to upload my SWF files on to a website, but whenever I do, the file uploads incompletely, in other words, it is missing some components. In the project, we worked with Action Script to load images. The SWF works fine when I play it on my computer, but when I upload it, it doesnt work completely. Here's my SWF File that I uploaded: http://www.wix.com/andooh/Test According to the Action Script I followed, it's suppose to load images on the home button. How I see it, the images are in a separate folder but can be reach from the Action Script when it plays on my computer. However, when I separate the SWF file from the other files the Action Script is suppose to read it doesnt work. I was wondering if anyone knows what's wrong.

    Did you uploaded the images?

Maybe you are looking for

  • How do you make the project bin window Not come up in quick edit in PE9?

    A few weeks ago I started to notice the Project Bin coming up whenever I went to quick edit. I don't think it did it before that. I always have to go to windows and uncheck it to get more screen space to work with. How do I get the Project Bin to Not

  • Unable to install SAP Netweaver 2004s in Solaris x64

    I am trying to install SAP Net2004s in solaris x64 and it has JDK1.6. For some reason the SAPINST keeps giving error "JDK version 1.5.0 and above is not supported by SAP. I downloaded and installed j2sdk1.4.2_24_b06 as per note 716604. Created enviro

  • Where is this setting hiding?

    Somehow I made a typo and got 192.167.1.100 instead of 192.168.1.100. Now everytime I create a new project it writes this in the .actionScriptProperties file. I have been looking for where to change this setting but it is eluding me. <compiler additi

  • How to use JNI and run javah

    When using a DLL I'm supposed to use javah on my class file, for creation of a C headerfile. How's this done in JDeveloper?

  • How to combine this code

    Hi, I am learning JSP. I made this page which takes up user name and roll and prints it.Can you please show me how to do this in a more better way. Such as instate of 3 page can I combine it into two or any thing that you have in mind... Thank you ve