FLV Timeline vs Classes

I made a simple FLV projector and got it to run in the
timeline. But I need it to run in any of several layers, so I want
to transfer the code into a class that can be written once and
called from everywhere. I wrote code, but it doesn't seem to work
and I can't even seem to identify what is wrong.
Anyone know of any tutorials or examples to guide my
way?

Overrides do work, but unless you thoroughly understand them, try to avoid them. In most cases, Chapter Playlists or alternate navigation will do what you are attempting.
That said, for example, if a button is linked to Timeline 1 (that has an end action of going on to Timeline 2), and the button has no override set, Timeline 1 executes its end action and goes to Timeline 2. If the button has an override of "last menu," then Timeline 1 does not execute its own end action, but the override action from the button that called it - and returns to the last menu.
Timeline overrides do the same thing: if Timeline 2 has an end action of Timeline 3, and Timeline 1 (with an end action of Timeline 2 and no override set) links to Timeline 2, then Timeline 2 will execute its end action and continue on to Timeline 3. If Timeline 1 has an override set for "last menu," then when it starts Timeline 2, Timeline 2 will end by going back to the last menu.

Similar Messages

  • Call function in main timeline from class file

    Hi all, How can a function in main timeline be called from class file?

    Hi all, How can a function in main timeline be called from class file?
    You can, but you really shouldn't.
    Classes shouldn't "talk" to the outside directly.
    Use Event dispatching to get things done.
    "root" (i just threw up by just typing that word) should be avoided at all cost, especially in AS3.

  • Access var on main timeline from class

    Hello,
    Currently working on some expanding media that has class files for all of the various action functions, then a separate class file for all of the var that sets the graphics, tracking, copy / content and whatnot.
    The final part that's driving me nutty - how to set a var per .swf that will concatenate with the tracking.  Ideally I'd like to get this as automated as possible so if I pass off the files to other designers they can update it quickly with minimal effort.
    Assets:
    unit 1a
    300x250 banner
    728x500 expanded larger content area
    unit 1b
    728x90 banner
    728x90 expanded larger content area (that is a duplicate of the 300x250 content .swf).
    So with tracking, each banner and expanded area would have individual tracking pixels.  Currently I can get all of the pixels to fire properly per unit however I have to have separate functions so there's no overlap and a number of duplicate naming.  Druthers-wise what I would have is the type of unit passed when the pixel function is triggered for the larger expanded sizes.  For example =
    User clicks on unit 1b button, this triggers the buttonClickTracking(); function (which is in the actions class file, shared by both unit 1a and unit 1b)..  unit 1b would have some var in the timeline so that when that function is called, the pixel will have "unit1b" + tracking.pixel;
    To sum it up, I need to set some var on the timeline for each expanded unit so the unit label (id) is called when any of the various tracking functions are initiated.  Right now getting that ID from each of the larger content .swf eludes me so any suggestions would be greatly appreciated!

    i could not understand what you're trying describe.

  • As3 in timeline and class

    Hi folks.
    I'm trying my best in a game project, but just can't do it right.... I'm a complete noob in as3 (have done my share of simple as2 though, possibly that's my problem..), but have managed to get to a certain point in the project where I have game functionality, but now i stumble where I thought would be no problem at all. I made a game where all the "gaming" code is in the external .as file, and it all works fine, but when I add a code to the timeline from code snippets, it all stops working.
    Is it possible that .as code and timeline code don't work together?
    Thnx in advance

    Ok, this is the class:
    package
        import flash.display.MovieClip;
        import flash.events.MouseEvent;
        public class Spajalica extends MovieClip
            private var xPos:int;
            private var yPos:int;
            private var correctCount:int = 0;
            private var totalCount:int = 1;
            public function Spajalica():void
                addListeners(s1);
            private function getPosition(target:Object):void
                xPos = target.x;
                yPos = target.y;
            private function dragObject(e:MouseEvent):void
                getPosition(e.target);
                e.target.startDrag(true);
            private function stopDragObject(e:MouseEvent):void
                if (e.target.hitTestObject(getChildByName(e.target.name + "Target")))
                    e.target.x = getChildByName(e.target.name + "Target").x;
                    e.target.y = getChildByName(e.target.name + "Target").y;
                    //deactivate object
                    e.currentTarget.removeEventListener(MouseEvent.MOUSE_DOWN, dragObject);
                    e.currentTarget.removeEventListener(MouseEvent.MOUSE_DOWN, stopDragObject);
                    //increment correct count;
                    correctCount++;
                    // totalCount is the amount of solutions the user must solve to proceed
                    if (correctCount == totalCount)
                        nextFrame();
                else
                    e.target.x = xPos;
                    e.target.y = yPos;
                e.target.stopDrag();
            private function addListeners(... objects):void
                for (var i:int = 0; i < objects.length; i++)
                    objects[i].addEventListener(MouseEvent.MOUSE_DOWN, dragObject);
                    objects[i].addEventListener(MouseEvent.MOUSE_UP, stopDragObject);
    and this is the button code in my frame 2 (it's from code snippets):
    back.addEventListener(MouseEvent.CLICK, fl_ClickToLoadUnloadSWF_2);
    import fl.display.ProLoader;
    var fl_ProLoader_2:ProLoader;
    //This variable keeps track of whether you want to load or unload the SWF
    var fl_ToLoad_2:Boolean = true;
    function fl_ClickToLoadUnloadSWF_2(event:MouseEvent):void
        if(fl_ToLoad_2)
            fl_ProLoader_2 = new ProLoader();
            fl_ProLoader_2.load(new URLRequest("http://www.helpexamples.com/flash/images/image1.jpg"));
            addChild(fl_ProLoader_2);
        else
            fl_ProLoader_2.unload();
            removeChild(fl_ProLoader_2);
            fl_ProLoader_2 = null;
        // Toggle whether you want to load or unload the SWF
        fl_ToLoad_2 = !fl_ToLoad_2;
    In frame 1 in my actions layer i have stop(); and it works until I ad the above code to frame 2

  • Need help moving my code from the timeline into classes

    Hello everybody,
    A few months ago I made a simple flashgame with the help of a tutorial (http://www.flashgametuts.com/tutorials/as3/how-to-create-a-brick-breaker-game-in-as3-part- 1/) as a school assignment. When I turned it in to my teacher, his biggest complaint was that the code was written onto the timeline instead of in seperate classes. I know virtually nothing of programming (dealt with agoraphobia while the classes took place ), so I was wondering if someone could help me move the code into classes.
    Here's the complete package for the game: https://www.dropbox.com/sh/xhjuhz04z8g129m/0nSwf1wngu
    Thanks!

    You will need to learn about classes. I suggest that for the moment you set your actual project to the side--but keep it in mind--and work on some smaller chunks. Do some tutorials and learn a bit. Then try and apply what you have learned to your project.
    http://www.untoldentertainment.com/blog/2009/08/25/tutorial-understanding-classes-in-as3-p art-1/
    Work on the individual bits and post more specific questions when you run up against them.
    It will require shifting your thoughts a bit on how to design and structure things. For me the really key concept is encapsulation--the idea that your classes are self-contained and have very specific routes of communication for receiving and sending information. To achieve this you need to think about methods, properties, and events. If you've done regular timeline coding you probably recognize properties (x, alpha, htmlText, etc.) and events (MouseEvent.CLICKED). Methods is a fancy word for function. So when you do something like myMovieClip.gotoAndStop(5) the gotoAndStop is a method of the MovieClip class and that just means somewhere there is code like this:
    function gotoAndPlay(frame:Object, scene:String=null):void{
         // code that tells flash how to move the movieclip to a frame
    That is a bit of a simplification, but conceptionally it is what you will do for the methods of your classes.

  • Flv and mcLoader Class

    Hi,
    Does somebody knows what is happening?
    I'm using the mcLoader class to load all my external swf
    files, everything worket perfectly until I decided to use
    flvPlayBack on one of those external files. If the player is on my
    main stage it works great and if I run directly the loaded swf it
    also works, but now when i run the external swf through the
    mcLoader the player doesn't appears.
    my mcLoader code:
    var mcLoader01:MovieClipLoader = new MovieClipLoader();
    mcLoader01.loadClip("clientes/targetTrade.swf",mcConatiner);
    The flvPlayer should be on the second frame of this
    targetTrade.swf ("click to watch the video")
    thanks,
    Peter

    All external paths are relative to the location of the html
    or projector – not to the swf calling the file. Usually that
    is what is wrong when somebody has a problem like this. Could
    be?

  • Accessing parent function from class

    Hey guys
    I have a .fla file with some code in the actions panel.
    A bit of code calls a function in a class from the actions panel
    The function in the class is run, but I want to be able to call a function in the main actions panel code from the function in that class
    The class doesn't extend anything so (parent as MovieClip).function() does not work
    Any ideas?
    Thanks
    Chris

    if you're trying to reference code attached to a timeline, your class will need a displayobject reference.  you can pass it a reference when instantiating a class object:
    // on a timeline:
    var c:YourClass=new YourClass(this);  // code your constructor to accept this movieclip reference.
    you can then use that reference to access code in any timeline (that exists when trying to reference):
    private var tl:MovieClip;  // import the mc class.
    public funciton YourClass(mc:MovieClip){
    tl=mc;

  • Java and FLV media question

    Here is my problem:
    I have an 18 min FLV content. Aspect ratio is 720 x 480. The FLV timeline controls are not as customized as I want it. Because there is ad content and we dont want the audience to skip the ads. Suppose the audience has watched 3 minutes of the video content and an ad shows up. Despite having the entire clip being downloaded over a fast connection, I dont want the audience to be able to fast forward and skip any bit of the video. They can rewind and scrub up to the point they have watched, for example the 3 min mark because htey have already seen that much of the video. I was wondering if there is a Java video player that supports FLV with the added functionality I wanted.

    You need:
    1. A JDBC driver for MYSQL (Which is easily available)
    2. A MYSQL Database with data
    3. An userid and password of this Database
    4. Port number the database server is listening on
    5. The url (combination of all above) that you will have to write so that your java application starts talking to the DB.
    Make sure
    1. The JDBC Driver for this database is in the classpath.
    2. The database is started and running.
    Hope this helps.
    Regards

  • Does anyone else miss Macromedia

    For Macromedia, it felt like Flash was a passion and each
    release took it forward.
    With Adobe in charge each release is MUCH MORE EXPENSIVE that
    the last and it seems almost exclusively geared to the developers
    and app builders while ignoring the designers.
    AS2 left most designers behind and before you knew it we're
    onto AS3.
    TellTarget worked fine - now I can't write the simplest code
    to make a movie clip play without looking
    it up on Google.
    Is this really progress ?
    Flash was very exciting once. Now it feels like just another
    geeky tool for coders and nerds which
    is inaccessible for designers / animators / artists and
    creatives of most types.
    I think that's a real shame.
    Learning French was hard - learning AS3 - I won't bother.
    How many animators are going to learn the massive amount of
    useless nonsence contained in Flash these days ?
    If you have a version of Flash 5 or MX fire it up and check
    out how easy it was to use the Action Script panel - now compare
    that to 8 or anything called "CS".
    Adobe are actually alienating the very people who should be
    drawn to this software by pandering to the developers, code
    warriors and geeks. Who, given that the Flash Player is so powerful
    now, don't really need Flash as an authoring environment anyway...
    Just my two pennys worth.
    Grrrrrrr....

    PICKING UP FROM WHERE I LEFT OFF.
    // Recap:
    > Because cheese is derived from milk, you could
    > honestly say that cheese *is* milk -- it's just
    > milk that has been cultured, curdled, and pressed.
    > But it *is* milk! Because we're so familiar with
    > this dairy products, the concept isn't confusing.
    In a similar way, movie clips are sprites; they're just
    sprites that have a timeline. Ice is water; it's just water of a
    particular sort -- water that has been frozen. If you look at the
    methods of the MovieClip class (methods are things an object can
    do), you'll see a list of features familiar to any long-time Flash
    designer: stop(), play(), gotoAndStop(), etc. It's a short list if
    the inherited methods are hidden, because the default view only
    shows you the things that make movie clips different from sprites.
    Look at properties, and you'll see a similar phenomenon:
    non-inherited properties include currentFrame, totalFrames,
    currentLabel, etc. -- again, timeline-related features, because
    movie clips are effectively just sprites with a timeline -- but you
    won't see glaringly obvious things like width and height. Don't
    movie clips *have* width and height? Of course they do, but width
    and height (and other properties) aren't something unique to movie
    clips. Only the timeline-related features make a movie clip a movie
    clip. To see the other stuff, you have to show inherited properties
    (or methods, or events), so click the "Show Inherited Public
    Properties" hyperlink.
    Doing so reveals numerous other properties, including
    familar characteristics like rotation, scaleX, scaleY, x, y, width,
    height, and so on. These are, in fact, properties of the MovieClip
    class; it's just that they're inherited from other classes up the
    family tree. In the same way, cheese *has* calcium; but the only
    reason for that is because *milk* has calcium, and cheese
    "inherits" that feature from milk.
    If you're coding up a movie clip with keyframe code (or even
    with a custom class), it really doesn't matter what the movie
    clip's heritage is. It doesn't matter, for example, that it's the
    Sprite class that introduces the startDrag() and stopDrag() method
    ... because movie clips *are* sprites, so those methods rightfully
    belong to all movie clips. It doesn't matter that the addChild()
    method is introduced by the DisplayObjectContainer class, because
    movie clips *are* display object containers (because sprites
    inherit directly from the DisplayObjectContainer class, and all
    movie clips are sprites).
    Does that help? AS3:QRG covers inheritance in numerous
    chapters, so there's more information to be had in the book, but
    I'm also happy to keep rambling here, if it helps.
    >> A serious look at not only the new Display List
    model,
    >> but how it compares in relation to the timeline and
    the
    >> old AS2 model is crucial.
    This is a really good point, and I agree that the display
    list concept is essential to successful coding in AS3. AS3:QRG goes
    into the display list concept in several chapters, with examples
    that include sample files.
    >> Do this without using any reference to classes.
    I'm curious why this matters? Even in AS2, it's important to
    understand the concept of classes, if only because (to me) it helps
    with consulting the Help docs. You might not actually write custom
    classes of your own -- that's perfectly fine -- but it helps
    tremendously to understand how classes inherit from each other, and
    that classes define objects. If you're working with a movie clip
    symbol, then you're working with an instance of the MovieClip class
    (in AS2 or AS3, doesn't matter). Class entries typically have
    headings for properties (characteristics of the object), methods
    (things the object can do), and events (things the object can react
    to).
    >> Take a completed AS 2 timeline project and walk us
    >> through the conversion, then reuse that project and
    walk
    >> us through converting it to classes.
    AS3:QRG presents a simple particle system in AS2, then
    migrates it to AS3. Based on page constraints, we had to keep the
    project small. It certainly isn't what you'd call a "timeline
    project," but it does address adding particles to the display list.
    Here's the thing. If your project is currently *not* based
    on custom classes -- that is, it's entirely timeline-based -- then
    it's important you don't confuse an AS2-to-AS3 migration with a
    timeline-to-class files migration. It's a fallacy to go in assuming
    that AS3 necessarily means you're obligated to code up everything
    in class files.
    If it makes more sense to code your project with class
    files, then it makes more sense across the board: you should be
    coding with class files whether the language is AS2 *or* AS3. On
    the other hand, if it makes more sense to code your project in
    keyframes, then do that. In that case, you presumably have enough
    visual effects -- the sort that rely on manual timeline animation
    -- to merit timeline coding. That isn't a question of what version
    of the language to use. (Of course, there are hybrid projects,
    which are are often the most challenging.)
    The more insight I get into your needs, the more I suspect
    you're confusing the move to AS3 with the move toward custom
    classes. If your workflow could benefit from custom classes, then
    you should already be using them with AS2. Doing so will
    necessarily introduce significant changes to your workflow -- e.g.,
    no more on() or onClipEvent(), even though AS2 allows it -- but
    that isn't a "fault" of AS3. Make sense?
    >> Remember, many of us were not using listeners
    because
    >> they weren?t as good as onClipEvent s for many
    things.
    Even in AS2, the dot notation equivalents to onClipEvent()
    are more powerful than the onClipEvent versions (pp. 15, 16
    AS3:QRG, with more info in p. 72 and 118, and additional insight
    into event handing elsewhere throughout the book). I wrote up a
    blog entry about this awhile back that explains what I see as the
    benfits of the new(er) approach, as I see them:
    http://www.quip.net/blog/2006/flash/museum-pieces-on-and-onclipevent
    Benefits include: 11 button events, versus the previous 8
    (this is AS2); 18 movie clip events, versus the previous 9 (again,
    AS2); code may be maintained in a single frame, if desired; event
    handlers may be assigned, deleted, and changed programmatically.
    There's certainly an intuitive benefit to on() and
    onClipEvent(), because you know visually what objects you're giving
    instructions to (it's the objects you actually select by clicking).
    But how many times have you pasted half a dozen lines of code into
    two dozen buttons in a timeline? It's tedious, isn't it? And when
    it's time to change that code, you have to remember to locate all
    two dozen of those buttons, then make sure you update all the code
    manually in each button. Or consider how often you've seen
    directly-attached onClipEvent(enterFrame) code that needless
    repeats its instructions for the duration of the SWF?
    >> Be sure to discuss the necessity and strategies for
    >> listener removal. Many of us are not used to this
    level
    >> of control/error checking now required.
    There are definitely times that I remove event listeners, in
    both AS2 and AS3 -- but there are also times when it's simply not
    worth the effort, regardless what language I'm using. If I code up
    a button to respond to mouse clicks, I may very well want it to
    keep doing that until the user closes the browser. In a case like
    that, there's just no need to remove the listener.
    If I'm using an enterFrame handler to move around a movie
    clip, I'll unhitch the listener when the clip arrives where I want
    it to go, in both AS2 and AS3. (In contrast, if I'm using
    onClipEvent(), I'll probably rely on reducing to zero the number of
    pixels my clip is supposed to travel when it comes to its
    destination. Sure, it'll stop traveling, but its onClipEvent
    function will continue to trigger 12 or 24 times a second,
    depending on framerate, for no good reason.
    >> Compiler, errors, and trace.
    >>
    >> Teach us how to use this. For those of us familiar
    with trace,
    >> it doesn?t return the information we would expect,
    it causes
    >> unexpected errors when it never did before.
    Help me understand this. Are you saying that trace() (and
    probably the Compiler Errors panel) gives you errors that are
    harder to understand? If that's what you mean, then I agree that
    AS3 is more challenging. Or rather, the error messages and warnings
    can be harder to interpret than the ones you get in AS2. For one,
    AS3 is considerably more verbose than AS2, so it has the potential
    to point out errors more often than AS2; it communicates more. AS3
    gives you both runtime errors and compile time errors, which is
    more than AS2 does.
    AS3:QRG has a chapter on debugging that goes into the
    differences among compiler warnings, compiler errors, and runtime
    errors, including a (probably too short) list of warnings/errors
    likely to be encountered by folks used to AS2 (pp. 231-263). This
    topic probably merits several chapters of its own, and I would have
    liked to include more in this particular book.
    >> Classes:
    >>
    >> Ok, well I think that the usual examples do a pretty
    >> good job of trying to explain the Theory behind
    classes
    >> and class (object) structure. People get the plane
    >> metaphor.
    I've never heard of the plane metaphor. I'm curious to hear
    it! :)
    SPLITTING THE MESSAGE AGAIN. SEE THE NEXT MESSAGE TO
    CONCLUDE.

  • Error #1009 - the most stupid AS3 loader issue ever !!!

    Hi,
    (It's about AS3 / Flash CS4)
    As a developer I often have no controll what is the content of a movie being runtime-loaded. I must presume I have no control on it at all - movie clips are marketed and sold and the only thing expected is that they play nice. And they are supposed to be runtime-loaded by a simple "progress-bar" style loader.
    The loader movie itself is fine. Though it's not sort of these tricky "no timeline, document-class only" it used to do the job.
    The main code is as folllows:
    FRAME 2:
    var thisRequest:URLRequest = new URLRequest("movie.swf");
    var thisLoader:Loader = new Loader();
    var newContent:MovieClip;
    thisLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, doneLoading);
    function doneLoading(evt:Event):void{
        newContent = MovieClip(thisLoader.content);
            //stage.addChild(newContent); -- please notice I commented this line !!!
    FRAME 3:
    thisLoader.load(thisRequest);
    As you may see, it's nothing special - just regular loader stuff here...
    But the issue is that it throws errors just in case of some loaded SWFs.
    Another words - the content and structure of movie.swf impact the loader performance!
    Too often I notice this kind of error being thrown right after "thisLoader.load(thisRequest);" is execuded:
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at movie_fla::MainTimeline/frame8()
    Right after - that means BEFORE adding loaded movie to the Stage childlist etc.
    I said - right after movie.swf is invoked by the "load" command !
    This is really rediculous!
    I do not expect this sort of behavior! I expect the loaded movie to be quiet unless explicitly added to stage with:
    stage.addChild(newContent);
    But in a contrary - it seems the loaded movie becomes somewhat active right after being loaded - even before being added to stage. And in some cases this prematured activity leads to hard-to-controll errors! Please notice the error is thrown despite line where loaded content is added to stage is commented!
    I said what I wanted to say - now dear Flash AS3 experts and mastahakas please - give me some advice what to do in this situation.
    I am really, really confused as I want to write clean, error-free code and I get run out of ideas how to deal with this nasty issue.
    Rgs,
    Ziggi

    Yeap,
    I found the solution:
    thisLoader.contentLoaderInfo.addEventListener(Event.INIT, initLoading);
    function initLoading(e:Event){
        newContent = MovieClip(thisLoader.content);
        newContent.stop();
    So, stopping the loaded movie in this handler do the job...
    Stupid anyway!

  • Keyboard Simulation tutorial and snippets

    There are were several developers on the forums who asked various questions about keyboard simulation in Flash.
    While waiting for Godot I have posted a quick tutorial with a working example and code for both timeline and class-based app. Just pasted the code on timeline or make class a document class.
    http://as3-blog.net/snippets/keyboard.html

    What source link? All the code is on the page below demo:
    http://as3-blog.net/snippets/keyboard.html

  • How do I recerence Movie Clips on the Main Timeline from inside a class?

    Hey everyone, this might be a stupid question but I thought
    I'd ask cause it's making me nuts. I'm all of 2 days into AS3
    (coming from not using Flash at all in YEARS) so feel free to
    consider me ignorant. I do have plenty of application development
    experience in other areas though.
    I can't seem to create a class that can reference an instance
    of a movie clip on my main timeline. I'd post code of what I've
    tried but I've gone through so many desperate edits & wild
    guesses that it was just garbled junk before I deleted it all.
    Basically here's how I figured Flash could work, though maybe
    it doesn't work this way at all.
    I'm assuming that with AS 3 being so big on being a true
    object oriented environment, I wouldn't need to mix my code and
    interface together. Preferably I'd be using the Flash authoring
    tools just to design my interface. Create a button... place it
    somewhere... give it an instance name. Roughly the equivilant of
    Apple's InterfaceBuilder for those of you that might be familiar
    with Cocoa development. I can see maybe having to put a few lines
    of ActionScript onto frame 1 (though really I'm hoping Flash would
    have a better method of kicking off the application at this point
    that using code tied to frames) to load my classes & such, but
    after that I'd like all of my code to be held in external class
    files.
    So maybe I've got:
    Interface.fla - My interface
    Button_1
    Button_2
    TextField_1
    Main.as - My main controller class using to handle all of my
    applications behavior
    SomeClass.as - Some helper Class
    SomeOtherClass.as - Some helper Class
    Main.as would have instructions in its initialization method
    to go ahead & attach events to buttons & initialize
    anything else that needs to happen when the application starts.
    From there on it would all be objects communicating back &
    forth. Button_1 would get clicked with would fire
    Main.someMethod(). Main.someMethod() would then do it's thing and
    set the value of TextField_1. All very clean & code is very
    separated from interface.
    Unfortunately I can't for the life of me figure out how AS3
    classes reference each other like that. There doesn't seem to be
    any kind of a global 'root' or '_root' I can use to locate any
    movie clips on the stage. I've searched the help & the web for
    any kind of simple tutorial but to no avail. My job has tasked me
    with building a flash app for a project but I'd really rather not
    have a tone of ActionScript just shoved into frame 1. That just
    seems... ugh! (::shudder::)
    Can someone maybe point me in the right direction here? I'm
    really willing to do my homework but I can't seem to locate the
    info I need to get started. Also, is there an ActionScript IRC
    channel or something maybe?
    Thanks,
    Cliff

    I worked with the problem last night and the solution I
    started coming to involved creating my own custom document class
    based off which extends MovieClip. My thought is that way I have
    access to the initialization routine of the timeline itself and
    that all of the elements on the main timeline should be
    "properties" of my custom class.
    Is this correct? Is there a down side to doing this & if
    so what is it & why?
    Also, just for my reference, the last time I did anything
    with ActionScript I think I was using '_root' to target the main
    timeline. WHat are the global variable names in AS 3? Is it just
    'root' & 'stage' or 'Root' & 'Stage' or what?

  • Playing FLV files on the timeline in a secondary scene?

    I'm currently working on a project where I mix animation sequences with short videos. My project also has two scenes and the FLV will be placed on the main time line of the second scene. The problem I am having is, if the movie is previewed from the first scene, or exported, the FLV on scene 2 won't load. the timeline on the playhead will just spin. I'm currently using "Load external video with playback component" as the method for importing the flv file.
    I have already worked with this video multiple times in other flash files and have never had a problem loading the video. Is there a limitation to FLV playback in multiple scene movies?

    The first scene doesn't contain a video just graphic animation. The second scene contains an flv video on the main timeline. When I preview, publish or export the video in the second scene won't load. And if I make the playhead visible it appears as if the video is trying to load but won't.
    If I just preview the second scene the video will play immediately with no problem, but it won't play at all when if the second scene starts after the first. The way I have it set up is, on the main timeline of the first scene there is actionscript in a frame at the end of the animation that tells flash to gotoAndPlay the second scene.

  • Document Class vs Timeline code differences...

    I'm trying to hunt down some kind of class conflict I seem to be having when using TweeLite easing and found out the same code that errors in a document class works fine if I place it in the timeline.
    Example - this works in frame one of the timeline:
    import com.greensock.TweenLite;
    import com.greensock.easing.*;
    TweenLite.to(obj, 1, { x:200, ease:Bounce.easeOut } );
    If however I make a very simple document class like so:
    package
          import com.greensock.TweenLite;
          import com.greensock.easing.*;
          import flash.display.MovieClip;
          public class Main extends MovieClip
               public function Main()
                    TweenLite.to(obj, 1, { x:200, ease:Bounce.easeOut } );
    I get an error when compiling:
    1119: Access of possibly undefined property easeOut through a reference with static type Class.
    So what's the differences between using a document class and timeline code?

    Odd... seems to have been a caching issue. I renamed the class, rebooted, and deleted ASO files and now it's working. Funny thing is that I never need to delete ASO files before... any thoughts on why this would stay cached?
    And, after rebooting I can make changes and don't need to delete ASO files either.
    Thanks!

  • How to call a function in a class from the main timeline?

    Hey Guys
    I have a project in Flash with four external AS files, which are linked to items in the library using AS linkage.
    What I want to do is call a function in one of these files from the main timeline, how would I go about doing this? I'm not currently using a document class, most of the code is in Frame 1 of the main timeline.
    Thanks

    // change type to the class name from the instance
    ClassNameHere(this.getChildByName('instance_name')).SomeFunction();

Maybe you are looking for

  • I forgot my security question answer and i need it to download an album

    It ask me to put the answer cause is the first time I buy something in the app store with this iphone, but the problem is that i dont know what the answer is..

  • IMG TSC

    Hi Guru,    Please tell me how to find the IMG TSC such as: VTAA. The link is: SAP IMG/SD/sales/maintain copy control for sales document/copying control:sales document to sales document .   If I only know the link,how can I find the related transacti

  • Dynamic Animation Assignment

    I don't know if this is something Edge does, or if I just missed it outlined in the docs somewhere. In a project based on something like Marionette (or Backbone) AKA, I have a view/templating system. Is it possible for me to take an animation produce

  • "Error loading VectorScribe.aip"

    I've looked in previous threads on plugin loading errors, but can't quite find the advice I'm looking for. I'm running VectorScribe 2.0 in Illustrator CS5.1 (Win7 64), and until recently had no difficulties. Now, on loading, Illustrator gives me an e

  • Finding the correct JDK release

    Hi, I am trying to locate a JDK release which contains a bug fix ( #2121401 http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=2121401 ). according to the bug page the problem is fixed in relase: 5.0u2(b04) since i can't find this bug id in the jdk u