Please I really need help with this video problem.

Hi!
Please I need help with this app I am trying to make for an Android cellphone and I've been struggling with this for a couple of months.
I have a main flash file (video player.fla) that will load external swf files. This is the main screen.When I click the Sets Anteriores button I want to open another swf file called sets.swf.The app is freezing when I click Sets Anteriores button
Here is the code for this fla file.
import flash.events.MouseEvent;
preloaderBar.visible = false;
var loader:Loader = new Loader();
btHome.enabled = false;
var filme : String = "";
carregaFilme("home.swf");
function carregaFilme(filme : String ) :void
  var reqMovie:URLRequest = new URLRequest(filme);
  loader.load(reqMovie);
  loader.contentLoaderInfo.addEventListener(Event.OPEN,comeco);
  loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,progresso);
  loader.contentLoaderInfo.addEventListener(Event.COMPLETE,completo);
  palco.addChild(loader); 
function comeco(event:Event):void
          preloaderBar.visible = true;
          preloaderBar.barra.scaleX = 0;
function progresso(e:ProgressEvent):void
          var perc:Number = e.bytesLoaded / e.bytesTotal;
          preloaderBar.percent.text = Math.ceil(perc*100).toString();
          preloaderBar.barra.scaleX =  perc;
function completo(e:Event):void
          preloaderBar.percent.text = '';
          preloaderBar.visible = false;
btHome.addEventListener(MouseEvent.MOUSE_DOWN,onHomeDown);
btHome.addEventListener(MouseEvent.MOUSE_UP,onHomeUp);
btSets.addEventListener(MouseEvent.MOUSE_DOWN,onSetsDown);
btSets.addEventListener(MouseEvent.MOUSE_UP,onSetsUp);
btVivo.addEventListener(MouseEvent.MOUSE_DOWN,onVivoDown);
btVivo.addEventListener(MouseEvent.MOUSE_UP,onVivoUp);
btHome.addEventListener(MouseEvent.CLICK,onHomeClick);
btSets.addEventListener(MouseEvent.CLICK,onSetsClick);
function onSetsClick(Event : MouseEvent) : void
          if (filme != "sets.swf")
                      filme = "sets.swf";
                      carregaFilme("sets.swf");
function onHomeClick(Event : MouseEvent) : void
          if (filme != "home.swf")
                      filme = "home.swf";
                      carregaFilme("home.swf");
function onHomeDown(Event : MouseEvent) : void
          btHome.y += 1;
function onHomeUp(Event : MouseEvent) : void
          btHome.y -= 1;
function onSetsDown(Event : MouseEvent) : void
          btSets.y += 1;
function onSetsUp(Event : MouseEvent) : void
          btSets.y -= 1;
function onVivoDown(Event : MouseEvent) : void
          btVivo.y += 1;
function onVivoUp(Event : MouseEvent) : void
          btVivo.y -= 1;
Now this is the sets.fla file:
Here is the code for sets.fla
import flash.utils.Timer;
import flash.events.TimerEvent;
var video:Video;
var nc:NetConnection;
var ns:NetStream;
var t : Timer = new Timer(1000,0);
var meta:Object = new Object();
this.addEventListener(Event.ADDED_TO_STAGE,init);
function init(e:Event):void{
video= new Video(320, 240);
addChild(video);
video.x = 80;
video.y = 100;
nc= new NetConnection();
nc.connect(null);
ns = new NetStream(nc);
ns.addEventListener(NetStatusEvent.NET_STATUS, onStatusEvent);
ns.bufferTime = 1;
ns.client = meta;
video.attachNetStream(ns);
ns.play("http://www.djchambinho.com/videos/segundaquinta.flv");
ns.pause();
t.addEventListener(TimerEvent.TIMER,timeHandler);
t.start();
function onStatusEvent(stat:Object):void
          trace(stat.info.code);
meta.onMetaData = function(meta:Object)
          trace(meta.duration);
function timeHandler(event : TimerEvent) : void
  if (ns.bytesLoaded>0&&ns.bytesLoaded == ns.bytesTotal )
            ns.resume();
            t.removeEventListener(TimerEvent.TIMER,timeHandler);
            t.stop();
The problem is when I test it on my computer it works but when I upload it to my phone it freezes when I click Sets Anteriores button.
Please help me with this problem I dont know what else to do.
thank you

My first guess is you're simply generating an error. You'll always want to load this on your device in quick debugging over USB so you can see any errors you're generating.
Outside that, if you plan on accessing anything inside the SWF you should be loading the SWF into the correct context. Relevant sample code:
var context:LoaderContext = new LoaderContext();
context.securityDomain = SecurityDomain.currentDomain;
context.applicationDomain = ApplicationDomain.currentDomain;
var urlReq:URLRequest = new URLRequest("http://www.[your_domain_here].com/library.swf");
var ldr:Loader = new Loader();
ldr.load(urlReq, context);
More information:
http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WS5b3ccc516d4fbf351e63e3d118a9 b90204-7de0.html
If you're doing this on iOS you'll need to stripped SWFs if you plan on using any coding (ABC) inside the files. You mentioned iOS so I won't get into that here, but just incase, here's info on stripping external SWFs:
http://blogs.adobe.com/airodynamics/2013/03/08/external-hosting-of-secondary-swfs-for-air- apps-on-ios/

Similar Messages

  • Please I really need help with this one.

    Ok I have this problem where I hook my ipod up and it works fine connects and is recognized. However, when i start trying to move music to it or transfer information using it like a jump drive it suddenly disconnects. At this point it is no longer recognized by my computer unless I restart my computer. In device manager it shows up as an unknown device and when i check the status of it, it says no device drivers installed for this device. What could be the problem here?

    http://docs.info.apple.com/article.html?artnum=93499

  • Please help! I am trying to change my Apple Id that used to be my mother to Mine- Every time i have it changed and i go and try and do an update it continues to ask for her old password. I really need help with this!

    Please help! I am trying to change my Apple Id that used to be my mother to Mine- Every time i have it changed and i go and try and do an update it continues to ask for her old password. I really need help with this!

    Phil0124 wrote:
    Apps downloaded with an Apple ID are forever tied to that Apple ID and will always require it to update.
    The only way around this is to delete the apps that require the other Apple ID and download them again with yours.
    Or simply log out of iTunes & App stores then log in with updated AppleID.

  • Need help with this book problem...Pig game...can ANYONE help!??

    I need help with the following book problem...could someone write this code for me?? Thanks!!
    First design and implement a class called PairOfDice, composed of two six-sided Die objects. Using the PairOfDice class, design and implement a class to play a game called Pig. In this game, the user competes against the computer. On each turn, the current player rolls a pair of dice and accumulates points. The goal is to reach 100 points before your opponent does. If, on any turn, the player rolls a 1, all points accumulated for that round are forfeited and control of the dice moves to the other player. If the player rolls two 1s in one turn, the player loses all points accumulated thus far in the game and loses control of the dice. The player may voluntarily turn over the dice after each roll. Therefore the player must decide to either roll again (be a pig) and risk losing points, or relinquish control of the dice, possibly allowing the other player to win. Implement the computer player such that it always relinquishes the dice after accumulating 20 or more points in any given round.
    I realize this is a long code, so it would be greatly appreciated to anyone who writes this one for me, or can at least give me any parts of it. I honestly have no clue how to do this because our professor is a dumbass and just expects us to know how to do this...he doesn't teach us this stuff...don't ask. Anyways, thanks for taking the time to read this and I hope someone helps out!! Thank you in advance to anyone who does!!!

    Nasty comments? It's not a matter of not liking you, it's a matter of responding to the
    "I'ts everyone else's fault but mine" attitude of your post.
    If you are genuine, the program is very easy to write, so, your Professor is correct when he said you should
    be able to do it. I'm still very much in the beginner category at java, and it took me only 20 mins to write
    (+5 mins to design it on paper). 2 classes in one file < 100 lines. Most of the regulars here would do it in half the time / half the lines.
    All of the clues are in the description, break them down into their various if / else conditions. Write it down on paper.
    Have a go. Try to achieve something. Post what you've tried, no-one will laugh at you, and you will be
    pleasanty surprised at the level of help you will get when you've "obviously" made some effort.
    Again, have a go. If you don't like problem-solving, then you don't like programming. So, you gotta ask
    yourself - "what am I doin' here?"

  • My firefox crashes every 2-5 minutes for unknown reasons. its getting really annoying and i really need help with this :( i cant seem to get an ID on the crash report, its giving a different reason everytime.. i think. please help !

    i have many many crash reports and they all seem different. yet, whenever i search the support pages for help on those crash IDs it shows 0 results. alot of people are having the same problems, and i hope we ALL can get help on this. its getting really frustrating and annoying :(

    i doubt it is from skype. i havent used skype in 2 days or so.
    here are the crash reports IDs from JUST today..
    bp-8c7fab55-79c8-4db1-9527-4ba072111013 10/13/2011 4:51 PM
    bp-db6bf6c4-cf34-4eae-a742-105842111013 10/13/2011 4:51 PM
    bp-f28611cf-3ff0-4658-a843-05da92111013 10/13/2011 4:32 PM
    bp-03fa57ef-580d-4f1d-8fb4-52ac72111013 10/13/2011 4:21 PM
    bp-d07e0d82-df2a-41c8-a19b-bb99e2111013 10/13/2011 4:19 PM
    bp-fafbd8cf-6769-4b76-8153-c17242111013 10/13/2011 4:06 PM
    bp-ee9694ab-585b-4963-8b94-e46432111013 10/13/2011 3:47 PM
    bp-773242e1-a87d-4e19-90cb-ce4e52111013 10/13/2011 3:37 PM
    bp-6bae0db3-895b-4239-8a71-758ce2111013 10/13/2011 3:36 PM
    bp-6dfc1b57-5a8f-4244-baa1-8d0642111013 10/13/2011 3:36 PM
    bp-9a6589cd-0e2f-4299-b517-a6c862111013 10/13/2011 3:31 PM

  • Really need help with this, can't use safari on my ipod

    I clicked on a link on a website for my school, and then it opened in another page. idk if i clicked something or this happened on its own, but then a video tried to open from the image. I've messed around with my settings, and i can't seem to be able to get a youtube video to open on my ipod if it's from a website, i always have to go directly from youtube to find anything. So it says "could not load video", the only option is to click okay, so I do, and then it gives me the main ipod youtube page, with history and search and all that stuff. I give up and decide to just look at something else, and click safari, except it goes straight to the image, which goes straight to the unloadable video on another program, and then i have to close the page. It goes in circles, but it means that safari is unusable, and my computer is broken, so i really need it for internet.
    Also, is there a way to make youtube videos viewable from a website link?
    And why, when I search up a popular song on youtube on my ipod, and type in that i want the lyric video, i only get live versions, and there is never any lyric videos, and i usually detest live versions of songs?? and then when i search the same thing on someone's computer, i get my lovely lyric videos? Is Youtube angry at Apple or something?
    aand why were the older ipods less crash-prone?
    answers are very helpful, especially for the first question, because i am clueless about technoloy. Honestly, it took me a year to learn how to turn on my computer....

    A lote of sitesuse the Flash version of YourTube. no iOS devices support flash. The you have to either use the YourTube app or Safari to go to YouTube since Safari tells the YouTube site to use HTML5.
    For other problems withwith Safari try going to Settins>Safari and clear Histor, Cookies and Data.
    Also reset the iPod. Nothing is lost.
    Reset iPod touch: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.

  • Really need help with this!

    I have a form to upload pictures, create a thumbnail, and put
    them in folders. I really need to know how to put the links in a
    database with php so I can display them on a page with the other
    fields! PLEASE HELP!!

    stone_cutter wrote:
    ok, if i was the computer, i would first, find the first occurence of the letter "V" in the word,Okay, good. How would you do that? You did look at the docs others pointed you to, right?
    and then include all the subsequent characters.Okay, good. How would you do that? You did look at the docs others pointed you to, right?
    I know what to do, i just don't know the codes for them.The idea is that you figure out "the codes." This generally means taking a guess at an approach that you think will work for one of the steps, writing some code, testing it, seeing if it produces the output you expect, figuring out why it didn't, changing it, repeating until you get it right, moving on to the same process with the next very small piece, and so on, until each piece works by itself, then putting the pieces together, and testing and tweaking until it works.
    I know the code is gonna start with m = p.substring Why?
    Why substring?
    Why immediately m = ?
    You don't think there will be any intermediate steps?
    What you're doing here, rather than following the process I describe above, is grabbing a handful of buzzwords that you think apply, slapping them together, then throwing your hands in the air and crying, "I don't get it."
    Where are the String API's? Can someone give me the link to them?I think they already did, more than once.
    http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html

  • Hey guys i really need help with this problem...

    Hey guys how is everyone? I have a Soundblaster X-Fi XtremeMusic. and i am having a real annoying problem, here is how it all started. I took the time and dusted out my computer by using a can of air duster, and i think a little got on there and it turned into frost. Weird thing is it happened before and i never had this problem. I turn my computer on and crank the volume up i receive no sound what so ever. I know it has to work because i have a pair of DJ headset hooked into the jack, and i heard a little pop sound. And no audio, every last port on the card i cannot get no sound out of it except one of them, it's really annoying i hate this doing this and i have to hook my 5.1 using one jack just to get sound. And it doesnt sound good i have some really powerful 1,000 watt speakers with 2 amps. I know this is yet due to the fact i only have the lime jack in This is the only way it'll work. And i have a THX cable and it works sometime. I hope my soundcard isnt messed up. I really hope you guys can help me with this issue. I cannot contact creative cust service via email because i dont have my box no more, and my serial number is faded on the card (i think that was the serial)
    I try to explain the best way i can describe it. Below is my System Specs.
    <pre>Processor: AMD Athlon X3 425 @ 2.7GHz
    Video Card: ATI HD 5770 1GB
    Hard Drive:1TB Western Digital, 500GB Western Digital, 300GB Seagate (all SATA connections)
    Heatsink: Zalman CNPS7000C-Cu
    Power Supply: Antec 550 Watts True Power II
    Sound Card: Creative Soundblaster XI-FI Xtreme Music
    Motherboard: ASUS M4A79XTD EVO
    DVD Drives x2. Plextor DVD-RW/DL/ Sony DVD-ROM Drive via PATA connections</pre> Thanks in advance hope you all have a splended weekend.

    Hello
    Thank you for your help but unfortunately still have troubles with the soundcard.
    I upgraded my system to
    RAM: Corsair Vengeance LP 16GB DDR3
    Processor: AMD Phenom II X6 1090T Processor, Black Edition 3.3GHz
    Video Card: Sapphire 100314-3L Radeon HD 6870 1GB
    Hard Drive: 1TB Western Digital, 500GB Western Digital, 300GB Seagate (all SATA connections)
    Heatsink: Zalman CNPS7000C-Cu
    Power Supply: Corsair TX850W 850 Watt SLI/Crossfire Certified
    Sound Card: Creative Labs Soundblaster X-FI Titanium Fatal1ty Professional (getting this soon)
    Motherboard: ASUS M4A79XTD EVO (BIOS: 2102)
    DVD Drive(s): Plextor DVD-RW/DL/ Sony DVD-ROM Drive via PATA connections
    And i still run into problems i think its a matter of a hardware issue. The plugs dont really work
    only one does (where lime goes in) And the bass has toned down as well... Isn't as powerful
    as it used to be, so my best be is to upgrade to Creative Labs Soundblaster X-FI Titanium Fatal1ty Professional
    Thats my only hope...
    But again thank you for your help

  • Really need help with this one!!

    hi all im posting here in the hope that some one can show me some light at the end of the tunnel as to my bb problem as its starting to get depressing now!
    long story short ive had bt bb for 4 weeks now and im paying for 8mg as thats the fastest my area can provide but my transfer speed is locked at 2mg maximum. countless phone calls later they said its a throughput issue and they will put a request in to reset my profile and everything will be fine. as i thought it didnt work. lots of phone calls later they said i had to wait 10 days after the request is put in for my speed to increase. waited 12 days and still nothing! more phone calls later they eventually sent an engineer round who said himself he cant see why my downloads are locked at 2 mg when after his own tests he said the line should be giving me at the very least a stable 6.5mg so he proceeded to put a request in of his own to a bt computer thats codenamed "rambo" to increase the speed to my house. he said i should see results after 4 hrs but in some rare cases its taken 72 hrs to kick in. so i ended up waiting 4 days and still **bleep** all. im so so sick of bt and all the **bleep** they are feeding me as they keep telling me every single time they say there gonna fix it that this time it will 100% fix my problem and it never does. really feel im being ripped off cos im paying for the top package in my area and im not getting anything anywhere near what i should be. can anyone please help with my problem it would be very much apreciated.
    thanks for reading all this peeps

    also heres the speed test results
    FAQ
    Test1 comprises of Best Effort Test: -provides background information.
    Download  Speed
    1840 Kbps
    0 Kbps
    2000 Kbps
    Max Achievable Speed
     Download speedachieved during the test was - 1840 Kbps
     For your connection, the acceptable range of speeds is 400-2000 Kbps.
     Additional Information:
     Your DSL Connection Rate :8128 Kbps(DOWN-STREAM), 448 Kbps(UP-STREAM)
     IP Profile for your line is - 2000 Kbps
    If you wish to discuss these results please contact your ISP.
    If you are experiencing problems with specific applications, servers or websites please contact your ISP for assistance.
    whats really getting to me now is bt keep admitting to me my acheivable speed should actually be in the region of 6.5 mg and my profile shouldnt be set to 2000kbps so if they know the problem themselves why cant they fix it

  • Still Need Help with this String Problem

    basically, i need to create a program where I input 5 words and then the program outputs the number of unique words and the words themselves. for example, if i input the word hello 5 times, then the output is 1 unique word and the word "hello". i have been agonizing over this dumb problem for days, i know how to do it using hashmap, but this is an introductory course and we cannot use more complex java functions, does ANYONE know how to do this just using arrays, strings, for loops, if clauses, etc. really basic java stuff. i want the code to be able to do what the following program does:
    import java.io.*; import java.util.ArrayList;
        public class MoreUnique {
           public static void main(String[] args) throws IOException{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String str[] = new String[5]; int uniqueEntries = 0; ArrayList<String> ue = new ArrayList<String>();
             for (int i = 0; i < 5; i++) { System.out.print((i +1) + ": "); str[i] = br.readLine(); }
             for (int j = 0; j < 5; j++) {
                if (!ue.contains(str[j].toLowerCase())) { ue.add(str[j].toLowerCase()); } } uniqueEntries = ue.size(); System.out.print("Number of unique entries: " + uniqueEntries + " { ");
             for (int q = 0; q < ue.size(); q++ ) { System.out.print(ue.get(q) + " "); } System.out.println("}"); } } but i need to find how to do it so all 5 words are put in at once on one line, and without all the advanced java functions that are in here, can anyone help out?

    you have to compare string 0 to strings 1-4, then
    string 1 with strings 2-4, then string 2 with strings
    3 and 4 then string 3 with string 4....right???Here's a way to do it:
    public class MoreUnique {
        public static void main(String[] args) throws IOException {
            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
            final int NUM_WORDS = 5;
            String[] words = new String[NUM_WORDS];
            int uniqueEntries = 0;
            for(int i = 0; i < NUM_WORDS; i++) {
                System.out.print((i+1)+": ");
                String temp = br.readLine();
                if(!contains(temp, words)) {
                    words[uniqueEntries++] = temp;
            System.out.print("Number of unique entries: "+uniqueEntries+" { ");   
            for (int i = 0; i < uniqueEntries; i++ ) {   
                System.out.print(words[i]+" ");
            System.out.println("}");
        private static boolean contains(String word, String[] array) {
                 Your code here: just a simple for-statement to
                 loop through your array and to see if 'word'
                 is in your 'array'.
    }Try to fill in the blanks.
    Good luck.

  • Another Videora Post- I just need help with this one problem, please!

    I am guessing that the best way to convert your videos to an iPod compatible format is Videora. It works lovely, except for one glitch. I notice that the audio is noticeably off when I play the video. Any solution on how to fix this? I would really appreciate it if anyone helped me out on this
      Windows XP  

    It is on both, I am thinking.. I tried it with a movie avi file, and it always comes out off.

  • Please i really need help with my i phone 4s it wont charge unless its shut down but also...

    So my i phone 4s wont charge unless its turned off but it will charge but it wont read on my laptop usb or any one elses  so no i tunes reset , its just been a hassle i dont have icare and the back glass panel has a thin singular crack and the lock buttons broke so my dad said sprint wont fix it On top of all this my lock button is broken so i can even do a hardware reset , an since this is a hammy down phone i dont know the security code to do the manual reset from the general settings so help please i have alot of stuff to do since im still having schooling and i need it fornot only social interactions but a organizer pleaseeee help me figure out what to do?!?!

    Sadly your iPhone sounds like it's not worth repairing.. I am sorry only a replacement phone will fill the bill...

  • I REALLY need help with this! (not too hard) (but hard to explain) (long)

    I know that this isn't hard, but I just can't figure it out.
    I am trying to create artificial cellular life, but the cells will be able to go through sexual reproduction.
    The DNA for the cells is a 500 index boolean array. One array for Dominant genes, and another one for Rececive genes.
    The DNA is generated randomly.
    The division (to make a sperm cell) works like this -
    1. I get a random number with the Math.random() function, and I use the Math.round() function to round it to either a 1, or a 0.
    2. The boolean arrays are converted to integer arrays (true = 1, false = 0).
    3. If the random number is a 1, then (in a for loop) the current index value of the dominant array is changed to a 3. If the random numnber is equal to a 0, then the current index value of the rececive array is changed to a 3.
    I started working on a new class, to combine the sperm cell with another sperm cell (call it an egg cell, whatever, doesn't matter) in order to create a new complete cell.
    I realized that I have no idea how I can reuse my classes, and make NEW cells, without overwriting my old cells.
    All of the final information that the classes produce is passed through TestMain.class (which puts it into other variables, and sends it to the appropriate class).
    So, I need to be able to run the process for creating a cell, then creating a sperm cell out of it, twice.
    I can, of course, just copy and paste this action, but seeing as how I want to have unlimited amounts of cells in action, this would not be practical.
    Here are my classes, sorry that they are not commented, but I explained what they do above, and I will write what they do overall.
    Genes.java - Creates the random DNA (and is essentially the cell)
    public class Genes {
    public boolean[] domgenes = new boolean[501];
    public boolean[] recgenes = new boolean[501];
        public void randgenes()
    System.out.println ("Dominant Genome: ");
    System.out.println ("");
    int domcount = 0;
            for(int i=0; i<500; i++) {
                double tempgene = (Math.round((Math.random())));
                int tempdomgene = (int)(tempgene);
                  if(tempdomgene == 1) {
                  domgenes[i] = true;
                System.out.print(1);
                  else {
                  domgenes[i] = false;
                System.out.print(0);
              for (int x = 0; x<500; x++) {
                if (domcount == 0) {
                System.out.println("");
                System.out.println("");
                System.out.println ("Rececive Genome: ");
                System.out.println("");
                domcount = 1;
                double tempgene = (Math.round((Math.random())));
                int temprecgene = (int)(tempgene);
                  if(temprecgene == 1) {
                  recgenes[x] = true;
                  System.out.print(1);
                  else {
                  recgenes[x] = false;
                  System.out.print(0);
        public boolean[] getdomGenes()
            System.out.println("");
            return domgenes; //returns the dominant genome
        public boolean[] getrecGenes()
            return recgenes; //returns the rececive geneome
        }DivideGenes.java - This creates the sperm cell out of the information that TestMain.java sent it (which is the information that Genes.java sent to it).
    public class DivideGenes
        int badcopy =0;
        boolean[] domgenes;
        boolean[] recgenes;
        int[] tempdomgenes = new int[501];
        int[] temprecgenes = new int[501];
        int tempgene;
        int geneholder;
        public DivideGenes(boolean[] domgenes, boolean[] recgenes)
            this.domgenes = domgenes;
            this.recgenes = recgenes;
       public int randommath() { //finds a random number
                double tempgene2 = Math.random();
                tempgene2 = tempgene2*500;
                tempgene = (int)tempgene2;
          return tempgene;
        public void randdivide() //main process
    for (int i = 0; i < 500; i++) {
    if (domgenes[i] == true) {
    tempdomgenes[i] = 1;
    else {
    tempdomgenes[i] = 0;
    if (recgenes[i] == true) {
    temprecgenes[i] = 1;
    else {
    temprecgenes[i] = 0;
            for (int i = 0; i < 500; i++) { //creates the sperm cell
    if (binmath() == 1) {
    tempdomgenes[i] = 3;
    else {
    temprecgenes[i] = 3;
      public int[] getNewDomGenes()
      return tempdomgenes;
      public int[] getNewRecGenes()
      return temprecgenes;
        public int binmath() {
        double tempbingene = (Math.round((Math.random())));
               int bingene = (int)(tempbingene);
                return bingene;
      }TestMain.java - This is the class that all of the result information is passed through, and is the regulator class (this is the class with the 'main' block). I used the names of the objects randomly, they do not represent anything (like cell2 does not represent the second cell), they are just names.
    public class TestMain
        public static void main(String[] args)
            Genes cell = new Genes();
            cell.randgenes();
            boolean[] theDominantGenes = cell.getdomGenes();
            boolean[] theRececiveGenes = cell.getrecGenes();
            DivideGenes cell2 = new DivideGenes(theDominantGenes, theRececiveGenes);
            cell2.randdivide();
           int[] theTempDominantGenes = cell2.getNewDomGenes();
           int[] theTempRececiveGenes = cell2.getNewRecGenes();
         CreateNewCell cell3 = new CreateNewCell (theTempDominantGenes,theTempRececiveGenes);
      cell3.CompileCell();
      }CreateNewCells.java - This is going to combine two sperm cells in order to make one new cell. It doesn't have anything in it so far, just some System.out.println stuff I made to show my friends.
    public class CreateNewCell {
    int[] tempdomgenes;
    int[] temprecgenes;
    public CreateNewCell(int[] tempdomgenes, int[] temprecgenes)
            this.tempdomgenes = tempdomgenes;
            this.temprecgenes = temprecgenes;
    public void CompileCell() {
    System.out.println("");
    System.out.println("Sperm Division Started");
    System.out.println("------------------------------------------");
    System.out.println("");
    System.out.println ("Dominant Genome after random gene elimination");
    System.out.println("");
    for (int i = 0; i < 500; i++) {
    System.out.print(tempdomgenes);
    System.out.println("");
    System.out.println("");
    System.out.println ("Rececive Genome after random gene elimination");
    System.out.println("");
    for (int i = 0; i < 500; i++) {
    System.out.print(temprecgenes[i]);
    Thank you very much if you choose to help me out.

    As I said before, your code is not object.
    When you write
    DivideGenes cell2 = new DivideGenes(theDominantGenes, theRececiveGenes);it means than from 2 Genes, you are creating a new object which is DivideGenes. I assume that what you want is to create a cell from an other cell and its mate.
    So it should be:
    public class Cell {
      //put here your gene class attributes and methods
      public Cell divideCell(Cell mate) {
         Cell child = new Cell();
         //put here your divide code
         return child;
    }Otherwise I can't understand your code.
    What kind of object is a createcellGene?? It must be a method of Cell !!
    ...

  • Hi folks, my mothers 40th next week and im looking to buy an iphone for her now and pay later. I see its available but will i be granted the loan on here ? really need help with this . thanks folks

    Hi folks its my mothers 40th next week and im looking to get an iphone4s or 5 from apple and then pay back monthly as in buy now pay later . i do not want contract . Im only 19 and cant afford to buy one right away although i can pay monthly back to apply if i was to get the iphone. Help needed here and thank use

    This is Apple's financing program in the US if you want to buy an iPhone without a carrier subsidy:
    http://store.apple.com/us/browse/finance/instant_credit_page
    Whether you could qualify I can't say. And as Lawrence said, even without a contract the plans from the carriers are expensive, so you will need to consider whether you or your mother can afford the monthly ree.
    Regards.

  • All tools in panels toolbar are disabled meaning I cannot change to any of the alternatives-E.g. Cannot select various Type tools as when I drag out I get the "disabled (Stop symbol)". Really need help with this, been like this for a while now. Many Thank

    Panels tool bar is completely unresponsive. Cannot change to any of the alternatives.
    I am using The most up to date Adobe Illustrator CC on Yosemite.

    I actually can't believe I was being that stupid.
    Thank you very much! This solves the issue.
    Many Thanks,
    Ronan

Maybe you are looking for