Document Classes and other Questions

Basically, i am working on an application that will eventually be deployed to the desktop as an AIR application.
I am wanting to create an Analogue clock and Digital clock with a button that toggles the display between either one when pressed. As well as this, i will be wanting to display the Date below, i am having a number of issues however.
I have the code sorted for three of the four components, i have not attempted to figure out the button thus far as i would be more than happy to have the digital clock, analogue clock and date all being displayed on a drag and drop desktop application first. When i say i have it sorted, i have a fully working analogue clock which i have managed to display on the desktop through air on its lonesome, however, i did not include the drag and drop function. For the digital clock and date components i am not sure how to configure them into document classes. The main issue i am having is i do not know if you can reference a dynamic text box within a movie clip to a document class.
This is the code to show the date
[code]{
var currentTime:Date = new Date();
var month:Array = new Array("January","February","March","April","May","June","July","August","September","Octo ber","November","December");
var dayOfWeek:Array = new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
date_text.text = dayOfWeek[currentTime.getDay()] + " " + currentTime.getDate() + " " + month[currentTime.getMonth()] + " " + currentTime.getFullYear();
[/code]
I have put the actionscript frame inside the movie clip file, and i have given both the movie clip, and the dynamic text box within the movie clip the instance name "date_text".
Basically, i am just struggling in how to put this code into a working document class, since the digital clock and date functions are both, some what similar, i feel the solution to one will more than likely lead to me discovering the solution for the other.
The other problem i am having, i do not know how i will display all of the components on one air application. I am assuming, that you create one other document class file which links the other four together? i have tried to do this by just linking a new FLA file with the analogue clock, but it does not work. The code for that is below.
[code]package
          import flash.events.Event;
          import flash.display.MovieClip;
          public class time1 extends MovieClip
                    public var now:Date;
                    public function time1()
                              // Update screen every frame
                              addEventListener(Event.ENTER_FRAME,enterFrameHandler);
                    // Event Handling:
                    function enterFrameHandler(event:Event):void
                              now = new Date();
                              // Rotate clock hands
                              hourHand_mc.rotation = now.getHours()*30+(now.getMinutes()/2);
                              minuteHand_mc.rotation = now.getMinutes()*6+(now.getSeconds()/10);
                              secondHand_mc.rotation = now.getSeconds()*6;
[/code]
That is the original clock document class (3 Movie clips for the moving hands, and the clock face is a graphic, which i may have to reference somehow below)?
[code]package
          import flash.display.MovieClip;
          public class main extends MovieClip
                    public var hourHand_mc:time1;
                    public var minuteHand_mc:time1;
                    public var secondHand_mc:time1;
                    public function main()
                              hourHand_mc = new SecondHand();
                              addChild(mySecondHand);
                              hourHand_mc.x = 75;
                              hourHand_mc.y = 75;
                              minuteHand_mc = new SecondHand();
                              addChild(mySecondHand);
                              minuteHand_mc.x = 75;
                              minuteHand_mc.y = 75;
                              secondHand_mc = new SecondHand();
                              addChild(mySecondHand);
                              secondHand.x = 75;
                              secondHand.y = 75;
}[/code]
This is my attempt at creating the main document class in a seperate FLA file to attempt to load the analogue clock, and later on the Digital Clock, Date Function and Toggle Display button in the same AIR application.
Any help on this is much appreciated, i have been reading up a lot on it through tutorials and the like, but i can't seem to fully grasp it.

why do you have code in a movieclip?
if you want to follow best practice and use a document class you should remove almost all code from timelines.  the only timeline code that might be reasonably used would be a stop() on the first frame of multiframe movieclips.
so, you should have a document class.  that could contain all your code but it would be better to just have your document class create your 2 clocks and date objects and possibly manage toggling between the two clocks.  you could have a separate class the tracks the time and date and that class is used by your two clock classes and your date class.

Similar Messages

  • I had a windows laptop, and I save files like photos, documents, videos and other things on an external hard drive, and now I want to move those files to the Mac book Pro, and then move those files again to another external hard drive 1T. My question is:

    I had a windows laptop, and I save files like photos,documents, videos and other things on an external hard drive, and now I want tomove those files to the Mac book Pro, and then move those files again toanother external hard drive 1T. My question is: Is it possible? Doing this willnot affect the files that I had in windows? No information is lost? or how cani do it?

    Connect the external drive to your Mac and drag the files from it to your Mac's internal drive. Then dismount and disconnect the external drive, connect the 1TB external drive, and drag the files from the internal drive onto the external. Nothing will have been deleted from any of the drives up to this point; the files will only have been copied. Verify that the files are readable. There's no reason they shouldn't be; this is just a precaution.
    Now if you wish to delete the files from any of the drives, drag them to the Trash, and Empty the Trash while the drive from which they came is still connected. If you disconnect the drive before emptying the Trash, the files you were trying to remove from it won't be deleted. They'll remain in the Trash and continue to take up space on the drive.
    Note that if your external drives are in NTFS format, you won't be able to write anything to them or delete anything from them, though you will be able to read and copy the files they contain. The NTFS disk format is read-only to the Mac OS, unless you have a third-party NTFS driver installed. To make your drives cross-platform readable and writable, you must reformat them in the FAT32 or ExFAT format.

  • What is the difference between document class and normal class

    Hi,
    Please let me know what is the difference between document class and normal class.
    And I have no idea which class should call as document class or call as an object.
    Thanks
    -Actionscript Developer

    the document class is invoked immediately when your swf opens.  the document class must subclass the sprite or movieclip class.
    all other classes are invoked explicitly with code and need not subclass any other class.

  • Trying to download songs on iTunes and it's asking for "my 1st car I owned" and other questions that I never answered. It won't let me download anything til I answer them. Can you help me?

    Trying to download songs on iTunes and it's asking for "my 1st car I owned" and other questions that I never answered. It won't let me download anything til I answer them. Can you help me?

    You need to contact Apple to get the questions reset. Click here, phone them, and ask for the Account Security team, or fill out and submit this form.
    (94816)

  • Classes and Movieclips question

    Hey
    I'm just wondering, how do I use/call (say... modify the y
    coordinate) of a MovieClip that is placed on the stage, in a parent
    class of the Document class?

    Fuc*in kglad, I love you man. You ended a week long feud I
    had with flash because I couldn't get this to work. I'm so happy
    about this, it feels so nice to be able to work on my game again
    and suddenly a huge part of flash just made sense.
    I greatly appreciate your help. Thanks mate :).
    For those who may have stumbled across this thread who have
    the same problem (it really isn't a problem, but more of a lack of
    knowledge of something specific), here is what you have to do:
    In my document class I have this function:
    [code]
    public function CallBaseEngine():void {
    helloPerson(player);
    [/code]
    Now in a parent class of the doucment class (meaning that the
    document class "extends" to this class I have this:
    [code]
    public function helloPerson(player):void {
    player.x = 999;
    [/code]
    player being simply the instance name of a movieclip I have
    on the stage.
    So what does this code mean for the n00bies? Well in the
    first block of code I am simply calling a function called
    helloPerson which is located in a parent class, remember children
    can "access" their parents but parents can't "access" their
    children so if I did the same thing but tried to call a function in
    the child class I would get an error saying its not found. However,
    you put "player" in the brackets which means that you want to bring
    the movieclip with an instance name called player through with you
    on your way to call the function helloPerson.
    In the second block of code, I am quite simply modifying
    where the player movieclip is along the x axis, this is to make
    sure that I can access the movieclip called player and the code is
    properly working. Bringing along doesn't mean we create a
    "duplicate" or anything, it basically is bringing along the
    permission to access player.
    Thanks again kglad!

  • MacBook Pro 13" Hard Drive and other questions

    Hi there,
    I've just purchased a 13" MBP which I absolutely love but have a few questions about upgrading it. I want to swap out the hard drive for a larger capacity but just want to make sure I purchase one that will fit.
    I'll number the questions for ease of answering.
    1. Will this hard drive be correct? I know it's a 2.5" SATA but I didn't know if the dimensions are ok for the 13" MBP.
    http://www.amazon.co.uk/WD-Scorpio-Black-WD3200BJKT-internal/dp/B001FBJJQ4
    2. Will the difference between a 7200rpm 16MB cache drive and a 5400rpm 8mb cache drive be noticeable? I can get a 500gb slower speed drive for the same price and while the capacity increase would be useful, I would prefer a faster drive if it's noticeable.
    Many thanks

    That article I believe to be incorrect! The author never mentions which Scorpio drive....Blue or Black. The Blue does not contain a free fall sensor option as the Black is available with our without free fall sensor. The free fall sensor will interfere with the Sudden Motion Sensor (SMS) built into the Mac. SMS can be disabled but my experience first hand with the Scorpio Black in my MBP 13 was not good even after disabling the SMS and merely using the free fall sensor in the Black. If you want a 7200 RPM drive and you like West Dig get the Black without the free fall sensor. You will be much happier. I run the Black in several Windows Laptops and it streams fast then the 7200.4 which I also have in a windows laptop and the scorpio black performed better and more stable! I just dont think I personal would not use it on the MBP 13...I took mine out for it was problematic!! If you want a 500 GB go with the Fujitsu or the Hitachi...even the the Western Dig Scorpio Blue with does not have a free fall sensor. The author of that article mentioned ShockGuard that is not a Free Fall sensor and only engages durring spin up or down as well as parks when it is off. This does not sense a fall like the SMS or a built in free fall sensor. Many MBP unibody owner have used the Blue and it has been hugely successful!!! My experience which is very extensive with Seagate as of late has not been favorable. I do not like the latest generation of drives they are producing we are seeing extensive failures (higher % compared to other OEMs). Stick with those three.
    If you want battery life, the Fujitsu or Hitachi are very good choices Fujitsu being a little better
    For speed the WD Blue is best on synthetic tests but it is a little power hungry. I am sticking with the Fujitsu in real world test it seemed to do better than the others...H2Benchw it wasnt as good. PCmark it did very well. The Gaming, Video and other test it seemed to do well on but not as good in the h2Benchw.
    http://www.tomshardware.com/reviews/mobile-hdd-notebook,2305.html
    Great info!!!

  • EXSP24 in LE7 and other questions

    I have worked out that the sampler instrument editor in LE7 has been removed which is kinda an odd upgrade from Logic Audio 6 imo. If i have this wrong please let me know.
    So how do I go about adding in new instruments from sample cd's etc??
    I am used to running Logic Audio 6 on my old Imac in System 9 so the new or apparent lack of Logic Folders etc is quite bizarre for me. So if anyone can also throw me some pointers on:
    1: Using Reason adapted for Recycle as a rewired instrument in LE7 (I have a feeling this is not possible)
    2: Using Absynth within LE7
    3: Will something like Kontakt run in LE7?
    4: Rewiring Logic into Live or vice versa.
    So many questions
    Thanks
    Paul

    You can't edit EXSP24 instruments but you can import several formats:
    Akai, Soudfonts, Giga, SampleCell and DLS.
    To create your own patches you need some external apps like this:
    http://www.redmatica.com/Site/Pages/KM.php
    About other questions and supposing that you don't have a Intel Mac:
    1. Yes, you can.
    2. Logic uses plugins in Audio Unit format; if you have an older version of Absynth you should upgrade to a newer one.
    3. Same as above,
    4. Logic can act as Rewire host only so you can rewire Live to Logic but not Logic to Live.
    cheers
    rob
    Power Mac G4/533 PowerBook 12   Mac OS X (10.4.5)  

  • Pixel Bender custom multiply blend and other questions

    I am creating photo editing application on iPad and i am using Pixel Bender to calculate effects. But ive got a problem with multiply blend mode.When i run it in CPU/GPU mode, it runs fine(result looks absolutly 1:1 as from photoshop). But when i switch to Flash Player mode, it dont want to render properly. I dont get any compilation errors. Ive got also some other questions:
    1.How does PB performs on iOS ?
    2.If my problem is becouse of  incapability of FP, is there any other solution to this ? I cant afford AS3.0 computing, becouse it is really slow even on PC.
    3. Can be Pixel Bender 3D sollution to this ? If yes, when will it come out to iOS ?
    4. How are filters computed in FP ? CPU or GPU ?
    here, you can see the difference : http://ponozka.php5.cz/gpuMode.jpg  http://ponozka.php5.cz/flashMode.jpg
    Thanks
    source code :
    <languageVersion : 1.0;>
    kernel MultiplyLayer
    <   namespace : "Your Namespace";
        vendor : "Richard Molnar";
        version : 1;
    >
        input image4 src;
        input image4 layer;
        output pixel4 dst;
        parameter float4 param <
            minValue:float4(0.0,0.0,0.0,0.0);
            maxValue:float4(1.0,1.0,1.0,1.0);
            defaultValue:float4(1.0,1.0,1.0,1.0);
        >;
        void
        evaluatePixel()
            pixel4 pix;
            pixel4 pix2;
            pix = sampleNearest(src,outCoord());
            pix2 = sampleNearest(layer,outCoord());
            dst.r = pix.r - pix.r * (1.0-(pix2.r))*param.r*pix2.a*param.a;
            dst.g = pix.g- pix.g * (1.0-(pix2.g))*param.g*pix2.a*param.a;
            dst.b = pix.b -pix.b * (1.0-(pix2.b))*param.b*pix2.a*param.a;
            dst.a = 1.0;

    Ok, so i already know, that CPU/GPU and flash are giving different results. So lets have a situation, where you need to display transparent image without transparency. On GPU/CPU, you will need only this :
    dst.r = src.r;
    dst.g = src.g;
    dst.b = src.b;
    dst.a = 1.0;
    but for flash, you will need this :
    dst.r = (1.0/src.a)*src.r;
    dst.g = (1.0/src.a)*src.g;
    dst.b = (1.0/src.a)*src.b;
    dst.a = 1.0;
    First kernel on GPU will show the exact same result as second kernel on flash. But the question remains : is it bug ?

  • Is the disk equal to log files and other questions?

    In the web page http://www.oracle.com/technology/documentation/berkeley-db/je/GettingStartedGuide/introduction.html#dplfeatures, there is a statement, " The checkpointer is responsible for flushing database data to *disk* that was written to cache as the result of a transaction commit ".
    I wonder if the disk here means log files under the JE home directory.
    From my understanding of these documents and other web resources, the check pointer is to write records in Cache to Log files (disk), and then cleaner is to reorganize and then to remove unused log files. For the records in a Cache, they are brought from disk to Cache by querying the index organized in a B-Tree structure, and the In-Compressor is to delete some empty internal nodes of B-Tree.
    I wonder if the above is right to describe relations among these components, check pointer, cleaner, B-Tree and In-Compressor.
    Thanks for your help!
    Best,
    Jiangfan

    Jiangfan Shi wrote:
    I wonder if the disk here means log files under the JE home directory. Yes.
    I wonder if the above is right to describe relations among these components, check pointer, cleaner, B-Tree and In-Compressor. Yes.

  • New Droid Turbo takes forever to load pictures on social media? ...and other questions!

    Hey all, I just got my new Droid Turbo a week ago and I've noticed some shortcomings that I'm not sure how to handle. They're not major, but they irritate me. I'll just list them...
    -On social media (Instagram and Facebook specifically), the pages load fine but most/all of the pictures take nearly a minute or more to load, if they load at all. Never had an issue with Samsung or previous Motorola phones doing this.
    -I occasionally get a popup error that "Contacts has stopped" even when I'm not accessing it or the program is closed (it usually happens when I'm making a call).
    -I have a setting to make my Gmail mail sync automatically, but it doesn't always do it, and the phone is supposed to notify me but only does it sometimes.
    -How to make "folders" in photo Gallery?
    -Google Play music is synced, but doesn't play AT ALL...just "thinks."
    I think that's all I have for now. Sorry it's so much, but I appreciate any help you all have! Thanks!!
    *Lauren*

    Congratulations on your new Droid Turbo. We'd love to help make sure your new phone is working properly. For the photos in Instagram and Facebook, Is it that some photos appear and others do not? How are photos in other applications or different websites? As for the Gmail sync, have you checked the settings under Gmail to ensure the sync options are set to your preference. In regards to the folders for the gallery, folders are usually created on their own and based on where pictures are created. For the Play Music, what happens when you try to play songs?
    SheritaH_VZW
    Follow us on Twitter @VZWSupport
    If my response answered your question please click the �Correct Answer� button under my response. This ensures others can benefit from our conversation. Thanks in advance for your help with this!!

  • Windows File compatibility, my iPod, and other questions

    After years of gripping about doing Video and Photo editing on my PC, I am considering switching to a Mac. But, given I have a heavy investment in PC hardware, I want to make sure I can leverage everything the best way possible. So...
    1.) I have a 20GB clickwheel iPod...any problem using this with a Mac? Need to be reformatted or anything?
    2.) Can you access ActiveX based websites without problems?
    3.) I have a Windows XP machine with 4 drives in RAID format. Could I use this as a common storage network drive for both Mac and PC's at the same time (for instance, store MP3's on it, and access and play them from either the iMac and other Windows PC's without a problem?). What about jpg formatted pictures? Any nuances between PC and Mac formats? (or is jpg really just jpg on either machine...I can open up the same picture on a Mac and a PC and see the exact same picture, without major color changes, etc.).
    I realize I need to reformat to FAT, but other than that, are their other problems I should know about? (I would like to use the RAID configuration to make sure I don't lose any data)
    That should start for now...
    Thanks - Jeff
    Windows (for now) Windows XP Looking at an iMac
    Windows (for now)   Windows XP   Looking at an iMac

    1.) I have a 20GB clickwheel iPod...any problem
    using this with a Mac? Need to be reformatted or
    anything?
    You can use it, and it will need to be reinitialised formatted for the Mac.
    2.) Can you access ActiveX based websites without
    problems?
    No you can't access ActiveX websites with a Mac
    3.) I have a Windows XP machine with 4 drives in
    RAID format. Could I use this as a common storage
    network drive for both Mac and PC's at the same time
    (for instance, store MP3's on it, and access and play
    them from either the iMac and other Windows PC's
    without a problem?).
    Yes
    What about jpg formatted
    pictures?
    Yes
    I realize I need to reformat to FAT,
    If the computer will still be running Windows and acting as a server then no you won't need to reformat to FAT.
    iFelix

  • Oracle 8i Lite - OO4O and other Questions

    1.) Can OO4O (Oracle Objects for OLE) be used with the Oracle 8i Lite database ?
    2.) Does Oracle 8i Lite operate as a "client/server" database ?
    3.) Is it possible to have multi-user access to Oracle 8i Lite ?
    4.) Is there documentation somewhere that lists all of the limitations with 8i Lite as compared to 8i ?
    We are in the planning stages of a partial mobile system, and want to know how much difference in development efforts for the 2 platforms (Oracle 8i on Win 2000 server and Oracle 8i Lite on NT/98/95 Laptops).
    Any information on Oracle 8i Lite would be appreciated. -- Especially need an answer to question 1 right now.
    Thanks,
    Paula

    Hi,
    I am qouting below from the oracle 8i Lite documentation which says it supports triggers . Please clarify.
    Oracle Lite DBMS
    Oracle Lite DBMS is a lightweight (50KB - 750KB), Java enabled database designed from the ground up for laptops, handheld computers, PDAs and smartphones. It supports industry standard ODBC, JDBC, SQLJ, and Java Stored Procedures and Triggers. It provides a streaming fast "C" interface, OKAPI, to its object kernel. It also supports Java Access Classes, JAC, a fast and easy way to make Java Objects persistent. Oracle Lite DBMS now supports all popular mobile platforms, including Palm OS, EPOC, and Windows CE, letting you deploy enterprise applications on virtually any mobile device.
    Regards
    null

  • ACE - Inspection per VIP and other Questions

    I have my ACE up and running with SLB for HTTP, terminating SSL and inspection for the traffic flowing through the ACE.
    One thing i haven't figured out yet is how to let the ACE distinguish between inspecting only the VIP traffic versus inspecting the whole traffic flowing through the routed VLAN.
    My service-policy is currently bound on the xfer net VLAN which also services the VIP.
    I made a "match url" rule with action reset for the regex "admin". If try to access the link "slb.foo.local/admin" via the VIP it works but it unfortunatly also works if i access the real servers in the VLAN behind the ACE directly.
    A: Any idea how to solve that with best practice?
    B: I haven't found a way to create a self signed certificate so far. Is it not implemented or did i just miss it?
    C: Is an ACL mandatory to get traffic flowing via the VIP to the real servers? I have the feeling that without an ACL permitting the traffic explicitly there won't be a flow at all.
    D: The commands "loadbalance vip icmp-reply active" and "loadbalance vip advertise active" for RHI are now two times in my config. Do i only need them once in my policy or does it make sense to keep them per HTTP and HTTPS Class?
    The corresponding config:
    class-map match-all HTTP-INSPECT-L4CLASS
    description HTTP protcol deep packet inspection
    2 match port tcp eq www
    class-map type http inspect match-any HTTP-INSPECT-L7CLASS
    description HTTP - Deep packet Inspection - Definition
    2 match content length range 0 256
    3 match url [/]admin
    4 match url .asp
    class-map match-all L4-VIP-CLASS
    2 match virtual-address 10.10.10.85 tcp eq www
    class-map match-all L4-VIP-CLASS-SSL
    2 match virtual-address 10.10.10.85 tcp eq https
    class-map type http loadbalance match-any L7-SLB-CLASS-1
    3 match http header Host header-value "10.10.10.85*"
    4 match http header Host header-value "slb.foo.local*"
    class-map type management match-any REMOTE_ACCESS
    2 match protocol ssh any
    3 match protocol icmp any
    policy-map type management first-match REMOTE_MGM_ALLOW_POLICY
    class REMOTE_ACCESS
    permit
    policy-map type loadbalance first-match L7-SLB-Policy
    class L7-SLB-CLASS-1
    serverfarm LB-Testfarm
    policy-map type inspect http all-match HTTP-INSPECT-L7POLICY
    class HTTP-INSPECT-L7CLASS
    reset
    policy-map multi-match L4-SLB-POLICY
    class L4-VIP-CLASS
    loadbalance vip inservice
    loadbalance policy L7-SLB-Policy
    loadbalance vip icmp-reply active
    loadbalance vip advertise active
    appl-parameter http advanced-options HTTP_PARAMETER_MAP
    class L4-VIP-CLASS-SSL
    loadbalance vip inservice
    loadbalance policy L7-SLB-Policy
    loadbalance vip icmp-reply active
    loadbalance vip advertise active
    ssl-proxy server SSL-PSERVICE-Server
    class HTTP-INSPECT-L4CLASS
    inspect http policy HTTP-INSPECT-L7POLICY
    interface vlan 444
    description XFER-ACE
    ip address 10.10.10.83 255.255.255.240
    access-group input All
    access-group output All
    service-policy input L4-SLB-POLICY
    service-policy input REMOTE_MGM_ALLOW_POLICY
    no shutdown
    interface vlan 555
    description ACE-Server
    ip address 10.10.10.97 255.255.255.240
    access-group input All
    access-group output All
    no shutdown
    Thanks for reading...
    Roble

    Gilles hope you still read this thread :)
    In another Post you mentioned that the ACE features URL rewriting. I am desperate looking for this feature but can't find it anywhere in the docs.
    Since i am terminating ssl on the front and speaking plain http on the back end i have some problems with the portal application and links to non-secure documents.
    I don't think i can make the appl. admins fix the problem or make the company for the portal
    rewrite the code. (3 letters NOT starting with an I)
    From the SCA Docs i found following description which matches my problem.
    [quote]
    When you have configured the urlrewrite command, the SCA can inspect the full HTML answer to replace all links to a nonsecure document with a link to the same document via HTTPS
    [/quote]
    EDIT:
    Another thing...
    I currently redirect all my http traffic to a certain https url with a redirect rserver. Works fine.
    I am still thinking about how to solve the same problem with ssl/https portion of my vip.
    vip:443 -> redirect to vip:443/url/foo/bar/
    I tried something like...
    vip:443 -> redirect to vip:444/url/foo/bar/
    But somehow that didn't work out. You have a valid "conceptional" approach to this issue?
    Roble

  • Timeline Markers From PP to AE and Other Questions

    I find no instructions to import timeline markers along with Premiere sequences. Is it possible?
    I'm still very new to AE and I am confusing myself quite easily going back and forth between the programs. What is the usual practice if i want to replace parts of original footage with segments created in AE?
    Should I import the Premiere sequence and work on the segments in AE and create movie from there OR create the composition in AE and import into the Premiere project? In other words, once I import or export from one program to another, do I abandon the original project?
    I ask because i am ending up with AE comps on my Premiere timeline as well as Premiere sequences in AE timelines.
    I hope that doesn't sound too dumb

    > I find no instructions to import timeline markers along with Premiere sequences. Is it possible?
    http://help.adobe.com/en_US/PremierePro/4.0/WSB90E08AC-8994-4070-A1A1-BA560E5EDA4A.html
    I found this with a simple Community Help search for 'Premiere markers'.
    > Should I import the Premiere sequence and work on the segments in AE
    and create movie from there OR create the composition in AE and import
    into the Premiere project? In other words, once I import or export from
    one program to another, do I abandon the original project?
    I ask because i am ending up with AE comps on my Premiere timeline as well as Premiere sequences in AE timelines.
    I hope that doesn't sound too dumb
    No, that doesn't sound too dumb. There are a lot of options to figure out. See "Working with Adobe Premiere Pro and After Effects" for an overview.
    The reason that there are a lot of options is that each of them is good for different things.
    That means that we can't really answer your question without knowing exactly what you're trying to accomplish.
    I suggest trying the various methods described int he document that I linked to and getting back to us when you have a specific piece of your work that you can't figure out how to do.

  • Compiled Error in Xcode for iphone game and other questions

    Dear all,
    Hi, I am a newbie of xcode and objective-c and I have a few questions regarding to the code sample of a game attached below. It is written in objective C, Xcode for iphone4 simulator. It is part of the code of 'ball bounce against brick" game. Instead of creating the image by IB, the code supposes to create (programmatically) 5 X 4 bricks using 4 different kinds of bricks pictures (bricktype1.png...). I have the bricks defined in .h file properly and method written in .m.
    My questions are for the following code:
    - (void)initializeBricks
    brickTypes[0] = @"bricktype1.png";
    brickTypes[1] = @"bricktype2.png";
    brickTypes[2] = @"bricktype3.png";
    brickTypes[3] = @"bricktype4.png";
    int count = 0;`
    for (int y = 0; y < BRICKS_HEIGHT; y++)
    for (int x = 0; x < BRICKS_WIDTH; x++)
    - Line1 UIImage *image = [ImageCache loadImage:brickTypes[count++ % 4]];
    - Line2 bricks[x][y] = [[[UIImageView alloc] initWithImage:image] autorelease];
    - Line3 CGRect newFrame = bricks[x][y].frame;
    - Line4 newFrame.origin = CGPointMake(x * 64, (y * 40) + 50);
    - Line5 bricks[x][y].frame = newFrame;
    - Line6 [self.view addSubview:bricks[x][y]]
    1) When it is compiled, error "ImageCache undeclared" in Line 1. But I have already added the png to the project. What is the problem and how to fix it? (If possible, please suggest code and explain what it does and where to put it.)
    2) How does the following in Line 1 work? Does it assign the element (name of .png) of brickType to image?
    brickTypes[count ++ % 4]
    For instance, returns one of the file name bricktype1.png to the image object? If true, what is the max value of "count", ends at 5? (as X increments 5 times for each Y). But then "count" will exceed the max 'index value' of brickTypes which is 3!
    3) In Line2, does the image object which is being allocated has a name and linked with the .png already at this line *before* it is assigned to brick[x][y]?
    4) What do Line3 and Line5 do? Why newFrame on left in line3 but appears on right in Line5?
    5) What does Line 4 do?
    Thanks
    North

    Hi North -
    macbie wrote:
    1) When it is compiled, error "ImageCache undeclared" in Line 1. ...
    UIImage *image = [ImageCache loadImage:brickTypes[count++ % 4]]; // Line 1
    The compiler is telling you it doesn't know what ImageCache refers to. Is ImageCache the name of a custom class? In that case you may have omitted #import "ImageCache.h". Else if ImageCache refers to an instance of some class, where is that declaration made? I can't tell you how to code the missing piece(s) because I can't guess the answers to these questions.
    Btw, if the png file images were already the correct size, it looks like you could substitute this for Line 1:
    UIImage *image = [UIImage imageNamed:brickTypes[count++ % 4]]; // Line 1
    2) How does the following in Line 1 work? Does it assign the element (name of .png) of brickType to image?
    brickTypes[count ++ % 4]
    Though you don't show the declaration of brickTypes, it appears to be a "C" array of NSString object pointers. Thus brickTypes[0] is the first string, and brickTypes[3] is the last string.
    The expression (count++ % 4) does two things. Firstly, the trailing ++ operator means the variable 'count' will be incremented as soon as the current expression is evaluated. Thus 'count' is zero (its initial value) the first time through the inner loop, its value is one the second time, and two the third time. The following two code blocks do exactly the same thing::
    int index = 0;
    NSString *filename = brickTypes[index++];
    int index = 0;
    NSString *filename = brickTypes[index];
    index = index + 1;
    The percent sign is the "modulus operator" so x%4 means "x modulo 4", which evaluates to the remainder after x is divided by 4. If x starts at 0, and is incremented once everytime through a loop, we'll get the following sequence of values for x%4: 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, ...
    So repeated evaluation of (brickTypes[count++ % 4]) produces the sequence: @"bricktype1.png", @"bricktype2.png", @"bricktype3.png", @"bricktype4.png", @"bricktype1.png", @"bricktype2.png", @"bricktype3.png", @"bricktype4.png", @"bricktype1.png", @"bricktype2.png", ...
    3) In Line2, does the image object which is being allocated has a name and linked with the .png already at this line *before* it is assigned to brick[x][y]?
    Line 2 allocs an object of type UIImageView and specifies the data at 'image' as the picture to be displayed by the new object. Since we immediately assign the address of the new UIImageView object to an element of the 'bricks' array, that address isn't stored in any named variable.
    The new UIImageView object is not associated with the name of the png file from which its picture originated. In fact the UIImage object which inited the UIImageView object is also not associated with that png filename. In other words, once a UIImage object is initialized from the contents of an image file, it's not possible to obtain the name of that file from the UIImage object. Note when you add a png media object to a UIImageView object in IB, the filename of the png resource will be retained and used to identify the image view object. But AFAIK, unless you explicitly save it somewhere in your code, that filename will not be available at run time.
    4) What do Line3 and Line5 do? Why newFrame on left in line3 but appears on right in Line5?
    5) What does Line 4 do?
    In Line 2 we've set the current element of 'bricks' to the address of a new UIImageView object which will display one of the 4 brick types. By default, the frame of a UIImageView object is set to the size of the image which initialized it. So after Line 2, we know that frame.size for the current array element is correct (assuming the image size of the original png file was what we want to display, or assuming that the purpose of [ImageCache loadImage:...] is to adjust the png size).
    Then in Line 3, we set the rectangle named newFrame to the frame of the current array element, i.e. to the frame of the UIImageView object whose address is stored in the current array element. So now we have a rectangle whose size (width, height) is correct for the image to be displayed. But where will this rectangle be placed on the superview? The placement of this rectangle is determined by its origin.
    Line 4 computes the origin we want. Now we have a rectangle with both the correct size and the correct origin.
    Line 5 sets the frame of the new UIImageView object to the rectangle we constructed in Lines 3 and 4. When that object is then added to the superview in Line 6, it will display an image of the correct size at the correct position.
    - Ray

Maybe you are looking for