Flash as2 reference

I downloaded the as2 langueage reference pdf and I'm
completely baffled. I
look in the index under video and it lists nothing that has
to do with
playing, stopping or pausing a video, the current time, the
duration, etc.
I looked up "playHeadTime" in the index and that didn't exist
although it
can be used in as2. I'm completely frustrated with this whole
process of
learning Flash. What am I missing?
Craig

Thanks David, that's a great start.
Certainly, the search engine seems to be of no help in
unravelling what you
have unravelled here...or, I suppose, until I learn how to
use it based on
what you've mentioned.
Craig
"David Stiller" <[email protected]> wrote in
message
news:[email protected]...
> Craig,
>
>> I downloaded the as2 langueage reference pdf and I'm
completely
>> baffled.
>
> It can be baffling at first. For me, the breakthrough
came when I
> realized that -- for the most part -- the Language
Reference is organized
> around something called classes. Classes define objects,
and generally
> (though not always) have three categories: properties
(characteristics of
> the object), methods (things the object can do), and
events (things the
> object can react to).
>
> So if you're looking up movie clips, consult the
MovieClip class entry.
> If you're looking up text fields, consult the TextField
class, and so on.
> In the case of video, you have a few choices. You might
be using the
> FLAPlayback component, in which case you'll have to
consult the
> FLVPlayback class. If that's your ticket, you'll find
that class -- as
> with all component classes -- in the ActionScript 2.0
Components Language
> Reference. Same goes for the Media components, if by
chance you're using
> those.
>
> On the other hand, if you're dealing with an actual
video object,
> you'll want to consult the Video class entry of the
ActionScript 2.0
> Language Reference (it's not a component). The Video
class is a bit
> different from most of the classes you'll find, because
video objects work
> in cahoots with two other objects: one instance apiece
of the
> NetConnection and NetStream classes. There's a hint --
admittedly not an
> easy one to spot -- in the listing for the
Video.attachVideo() method.
> Click on that, and you'll see that a video instance can
be attached to a
> NetStream instance, a Camera instance (for webcams), or
null.
>
> It sounds like you're after pre-recorded video, so your
next stop will
> be the NetStream class, which features a number of
properties, methods,
> and events you're after (play(), pause(), etc.).
>
>> I looked up "playHeadTime" in the index and that
didn't exist although
>> it can be used in as2.
>
> The FLVPlayback class features a playheadTime property.
Remember,
> though, the FLVPlayback class is listed in the
Components Language
> Reference, which might be why you didn't immediately
find it.
>
>> I'm completely frustrated with this whole process of
learning Flash.
>> What am I missing?
>
> It may be that all you're missing a leg up. It's tough
if you don't
> know how to get started. For what it's worth, I wrote an
article on
> tackling the AS2 Language Reference (free article) at
CommunityMX.com.
> Maybe it can help you get your bearings.
>
>
http://www.communitymx.com/abstract.cfm?cid=01B54
>
> It was written for Flash 8, but the principles still
apply.
>
>
> David Stiller
> Co-author, Foundation Flash CS3 for Designers
>
http://tinyurl.com/2k29mj
> "Luck is the residue of good design."
>

Similar Messages

  • Cross domain scripting at run time using local connection flash AS2

    Hi
         I want to do live video streaming using FMS and FMLE in Flash As2. Suppose 100 users watching video online and I want to show message to  all 100 users using the Local connection.
    If I am sending message using different browser in same pc then I can get the message which was send from another swf file but I am checking from another pc then message not coming in receiver swf file.
    Please find the code below. 
    receievemovie.swf
    // Code in the receiving SWF file
    this.createTextField("result_txt", 1, 10, 10, 100, 22);
    System.security.allowDomain("*")
    System.security.allowInsecureDomain("*")
    var my_lc:LocalConnection = new LocalConnection();
    my_lc.allowDomain = function(sendingDomain:String) {
    domain_txt.text = sendingDomain;
    return true;
    my_lc.allowDomain = function(sendingDomain:String) {
    return (sendingDomain == "*");
    my_lc.allowInsecureDomain = function(sendingDomain:String) {
    return (sendingDomain == "*");
    my_lc.methodToExecute = function(param1:String) {
        result_txt.text = param1
    myResult.text=param1
    my_lc.connect("lc_name");
    sendmovie.swf
    System.security.allowDomain("*")
    System.security.allowInsecureDomain("*")
    var sending_lc:LocalConnection;
    var sending_lc:LocalConnection = new LocalConnection();
    sending_lc.allowDomain = function(sendingDomain:String) {
    return (sendingDomain == "*");
    sending_lc.allowInsecureDomain = function(sendingDomain:String) {
    return (sendingDomain == "*");
    myButton.onRelease = function(){
    sending_lc = new LocalConnection();
    sending_lc.send("lc_name", "methodToExecute", sendMsg.text);
    sendMsg.text="Message has been sent"
    If you have any other way to do it please suggest me to do that.
    Thanks & regards
    Sunil Kumar

    Hi, go to
    Flash Resources , you can
    find a java application that can serve policy files to resolve this
    problem.

  • Re-sizing, align right while keeping the menu fixed using flash AS2

    contact
    khuon
    mau
    My problem is recreating the align right effect while keeping
    the menu fixed using flash AS2 mostly for re sizing as well as
    different screen sizes.
    While i can do one or the other but both is just not
    happening.
    I have tried all sorts of weird and wonderful things but as
    yet, alas no easy/simple solution :(
    I must admit it has been a long time since i have been here
    but.. I thought if someone could have a quick look and maybe please
    give me a few pointers ??
    Anything at all would be better than what i have now ...
    Thanks for your time

    The link again is I forgot to add http to the link before, but it should have worked.
    http://www.lipowiec.org/test/index.php
    a) used Dreamweaver to create new site selected 1 column, elastic, centered, header, and footer
    b) used spry to add horizontal menu to header
    c) followed instructions from Spry Help
    http://livedocs.adobe.com/en_US/Spry/SDG/index.html?lang=en_US ->
    working with spry widgets -> working with the menu bar widget -> Customize the dimension of menu items as indicated
    To change the dimension of menu items by changing the width properties of the menu item’s li and ul tags.
    Locate the ul.MenuBarVertical li or ul.MenuBarHorizontal li rule.
    Change the width property to a desired width, or change the property to auto to remove a fixed width, and add the property and value white-space: nowrap; to the rule.
    Locate the ul.MenuBarVertical ul or ul.MenuBarHorizontal ul rule.
    Change the width property to a desired width (or change the property to auto to remove a fixed width).
    Locate the ul.MenuBarVertical ul li or ul.MenuBarHorizontal ul li rule.
    Add the following properties to the rule: float: none; and background-color: transparent;.
    Delete the width: 8.2em; property and value.
    Under IE it's broken, under the other browsers it works.
    There need to be more IE HACKS added.

  • Insert image from file in Adobe Flash AS2

    Hello!
    I am working on one project in Adobe Flash AS2 and I would like to know, is it possible to create such button in the flash movie, that when is pressed on, opens a file browser for the computer. After that, the user chooses an image to insert in the flash movie. And the image changes from the old one (apple) to the new one (flower).
    For better understanding I added pictures. I hope You understand what I mean..
    I have searched in web how to do this, but no success at all..Hoping on Your advice. Thanks!!!

    Update - I tried using the loadMovie() function and it works, but not exactly as I was imagining. To be more precise with my planned option I will give this example for better understanding :
    Lets say, that I make a Flash project for other users who have no programming skills. In this project (the swf movie) there is a place(a button "Insert image")
    to upload an image and save it to the swf file, but it can't be done through typing the image URL in the actionscript (like doing an actual coding), but simply by opening the file browser in computer within the swf file.
    I hope You understand what I mean.
    I would like to know is this option even possible in Adobe Flash AS2
    I am thankful for Your replies and advices.

  • Flash, AS2 fscommand not working

    hi,
    I have a flash application working fine in a html page. i want to add javascript interaction.
    I see that i have to use fscommand . when i compile and execute my flash application inside flash CS4 and test it directly from the generation directory (D:\dev\flash\myApp), it work find.
    If i copy my project directory in another directory (D:\dev\flash\release\myApp), it's not working.
    I don't understand why !
    I never reach the javascript code.
    Thanks for your help.

    If I understand you correctly, I think the 'shared object' might be what you need.
    The AS2 Language Reference in F8 starts off like this:
    "The SharedObject class is used to read and store limited amounts of data on a user's computer. Shared objects offer real-time data sharing between objects that are persistent on the user's computer. Local shared objects are similar to browser cookies. ....."
    hope that helps.

  • Retrieving variables from Captivate 4 in Flash (AS2)

    I've found a couple threads in this forum on this topic, but none of the code suggested in these threads seems to work.  I have a quiz created in Captivate 4.  The 'Results' slide changes a user-defined variable, varCAPChp1Test to 1 on enter of the slide (I use the 'Assign' command from the dropdown in slide properties to assign this variable a value of 1).  I want to reference this variable in my .fla file using AS2.  I load the Captivate swf into an empty movieclip using the following code:
    var myMCL = new MovieClipLoader();
    myMCL.loadClip("supporting_SWFs/Quizzes/Chp1_Quiz.swf", "mc_EmptySWF"); //the swf loads and functions just fine
    checkCompletion = function():Void
        var test = mc_EmptySWF.varCAPChp1Test;
        if(test != null && test == 1)
            trace("Chapter 1 Test completed!");
        else
            trace("?");
    addEventListener(Event.ENTER_FRAME, checkCompletion);
    //Here is the output when I publish the .fla:
    Branching::script:varTotalPts = varTotalPts + 10
    rdcmndResume = 1;
    deepak branching : scripteval:[object Object];
    Branching::script:rdcmndResume = 1;
    deepak branching : scripteval:[object Object];
    Branching::script:varTotalPts = varTotalPts + 10
    rdcmndResume = 1;
    deepak branching : scripteval:[object Object];
    Branching::script:rdcmndResume = 1;
    deepak branching : scripteval:[object Object];
    Branching::script:varTotalPts = varTotalPts + 10
    rdcmndResume = 1;
    deepak branching : scripteval:[object Object];
    Branching::script:varUserPts = varUserPts + 10
    rdcmndResume = 1;
    deepak branching : scripteval:[object Object];
    Branching::script:varTotalPts = varTotalPts + 10
    rdcmndResume = 1;
    deepak branching : scripteval:[object Object];
    Branching::script:varUserPts = varUserPts + 10
    rdcmndResume = 1;
    deepak branching : scripteval:[object Object];
    Branching::script:varTotalPts = varTotalPts + 10
    rdcmndResume = 1;
    deepak branching : scripteval:[object Object];
    Branching::script:varCAPChp1Test = 1 //so the value is assigned properly in Captivate, but Flash doesn't "listen" for it.
    rdcmndResume = 1;
    deepak branching : scripteval:[object Object];

    I've changed the code below to just trace the value of a variable in Captivate when it's completely loaded in Flash and I keep getting 'undefined.'  I'm also using a system variable instead of a custom user variable this time.
    var myMCL = new MovieClipLoader();
    myMCL.loadClip("Chp1_Quiz.swf", "mc_contentHolder");
    myMCL.onLoadComplete = function(target_mc:MovieClip)
        var test = mc_contentHolder.rdinfoSlideCount;
        trace(test)
    //Here's the output I receive:
    undefined
    Branching::script:varChp1Test = inprogress
    varTotalPts = varTotalPts + 10
    rdcmndResume = 1;
    deepak branching : scripteval:[object Object];
    I know that myMCL.onLoadComplete is working b/c I am receiving the trace output, but Flash is not reading the variable from Captivate.  Can anyone help me see what I'm doing wrong?  I've been doing research on this for several days with no success.  This should be pretty simple and I keep getting 'undefined.'
    Thanks.

  • Problem with Preloader in my Flash AS2 Game

    I have been using this tutorial to make a preloader:
    http://www.republicofcode.com/tutori.../preloader_bc/
    I have run into one problem though.
    When I simulate the download, it just shows the background color of the game while it loads, and when it finished loading, it shows the loading screen fully loaded. I have followed the tutorial exactly, except added my file names into the AS2 code.
    Here is the ActionScript in Frame 1 I have for the preloader:
    if (_root.getBytesTotal() != _root.getBytesLoaded()){
    stopAndGoto(1);
    preloaderBar._xscale=(_root.getBytesLoaded()/_root.getBytesTotal())*100;
    loaderTxt.text=Math.round((_root.getBytesLoaded()/_root.getBytesTotal())*100)+"%";
    Any hints or answers to what i'm doing wrong?
    Thanks, MrA615.

    Your description of what you've done and the code you show does not match what the tutorial says to do and what code to use... (there is no stopAndGoTo() function in Flash).
    Right-click the second frame on the upper layer labeled Actions and select Actions. Copy and paste the code below to make our preloader functional.
    if (_root.getBytesTotal() != _root.getBytesLoaded()){
    gotoAndPlay(1);
    bar_mc._xscale=(_root.getBytesLoaded()/_root.getBytesTotal())*100;
    loader_txt.text=Math.round((_root.getBytesLoaded()/_root.getBytesTotal())*100)+"%";

  • How To insert Day And Time In flash AS2?

    I want to display Day and time in flash with AS2
    not only that i want to put certain event on certain date and time
    that means
    i have a movie clip with object on it ,when i run it,
    it changes its position
    BUT now i want to change movie clip position on certain date and time
    for eg;
    I have made a simple move clip of firework i want it auto play when it is
    (01.01.2012) (12:00 AM)
    Help Me.....

    user time is easiest.  the following checks if it's between 12am and 1am jan 1, 2012.
    var d:Date=new Date();
    if(d.getMonth()==0&d.getDate()==1&&d.getFullYear()==2012&&d.getHours()<1){
    // fireworks

  • Help! Convert simple Flash AS2 code to AS3

    Hi everyone,
    I'm a Flash beginner and followed a tutorial: http://www.webwasp.co.uk/tutorials/018/tutorial.php ... to learn how to make a "live paint/draw" effect. I didn't realize  that if I made something in AS2, I wouldn't be able to embed it (and  have it work) into my root AS3 file, where I've got a bunch of other  stuff going on. I've tried following tips on how to change AS2 code to  AS3, but it just doesn't work. I know it's simple code, and that some  genius out there can figure it out, but I'm at a loss. Please help!
    Here's the AS2 code:
    _root.createEmptyMovieClip("myLine", 0);
    _root.onMouseDown = function() {
       myLine.moveTo(_xmouse, _ymouse);
       ranWidth = Math.round((Math.random() * 10)+2);
       myLine.lineStyle(ranWidth, 0xff0000, 100);
       _root.onMouseMove = function() {
          myLine.lineTo(_xmouse, _ymouse);
    _root.onMouseUp = function() {
       _root.onMouseMove = noLine;
    Thanks in advance!
    Signed,
    Nicolle
    Flash Desperado

    Considering the code is on timeline:
    var myLine:Sprite = new Sprite();
    addChild(myLine);
    var g:Graphics = myLine.graphics;
    addEventListener(MouseEvent.MOUSE_DOWN, onMouseDown);
    function onMouseDown(e:MouseEvent):void {
         var ranWidth:Number = Math.round((Math.random() * 10) + 2);
         g.clear();
         g.lineStyle(ranWidth, 0xFF0000, 1);
         addEventListener(MouseEvent.MOUSE_MOVE, onMouseMove);
         addEventListener(MouseEvent.MOUSE_UP, onMouseUp);
    function onMouseMove(e:MouseEvent):void {
         g.lineTo(mouseX, mouseY);
    function onMouseUp(e:MouseEvent):void {
         removeEventListener(MouseEvent.MOUSE_MOVE, onMouseMove);
         removeEventListener(MouseEvent.MOUSE_UP, onMouseUp);

  • Switching from Flash-AS2 to Flex

    Hello !!! I am new in this flex tech
    I have made a project in AS2 with Flash. and communicating with the data through XMLs
    here is that link http://sanjoghelpline.in/Application_RWSS/default.asp
    Now I have to play with large set of data with graphs, grids, different options etc on this maps. I think Flex will be best for it. it will directly connect to the database to fetch datas. I am planning to use webservice.
    So I need your suggestion and tips for this. And what serverside language I should choose.

    Good choice. Best you can do is making a new project with Flex Builder.
    Probably you can use (parts of) your existing AS2 code (be aware of the differences with AS3).
    Is there a particular reason why you want to use webservices?
    If not, you can considering calling the data-XML's directly by HTTPService for example.
    This tool will help as well:
    http://www.adobe.com/devnet/flex/tourdeflex/web/#sampleId=0;illustIndex=0;docIndex=0

  • Flash Relative Reference

    I share maintenance responsibilities for a site with someone else.  We both have Dreamweaver CS4.  She uses Win 7 and I'm on XP.  We had been getting warning messages about Flash objects (swf) possibly not working, so she deleted and reinserted some of the swf files.  Now the swf files do not work when the pages are loaded from my computer, even though they work OK when I load the pages from the site.  I tracked the problem to the relative reference for the swf files.  When she re-inserted the Flash files, Dreamweaver created:
    <param name="movie" value="/images/MyBanner.swf">
    However, when I reinsert the swf files, Dreamweaver creates:
    <param name="movie" value="../images/MyBanner.swf">
    I can change the references in the pages she created from '/' to '../' and the swf files work fine when loaded from my computer.  I have tested this in IE 8.0.6 and Firefox 3.6.2.
    Any ideas.

    I share maintenance responsibilities for a site with someone else.  We both have Dreamweaver CS4.  She uses Win 7 and I'm on XP.  We had been getting warning messages about Flash objects (swf) possibly not working, so she deleted and reinserted some of the swf files.  Now the swf files do not work when the pages are loaded from my computer, even though they work OK when I load the pages from the site.  I tracked the problem to the relative reference for the swf files.  When she re-inserted the Flash files, Dreamweaver created:
    <param name="movie" value="/images/MyBanner.swf">
    However, when I reinsert the swf files, Dreamweaver creates:
    <param name="movie" value="../images/MyBanner.swf">
    I can change the references in the pages she created from '/' to '../' and the swf files work fine when loaded from my computer.  I have tested this in IE 8.0.6 and Firefox 3.6.2.
    Any ideas.

  • Preloading a published captivate recording to flash AS2

    Hi,
    I have a video recording made in adobe captivate 4 and disabled the preloader on the publish preferences. The reason why I disabled this is because other people cannot see the preloader while the captivate movie is loading but the preloader displays when I view it online usign my computer (Do you have any idea on how I can fix this?). As an alternative/workaround I created a movieclip loader class and load the external captivate movie in flash. The preloader that I created works. However, the captivate movie plays at once even if the movieclip loader hasn't reached 100%. How can I prevent the captivate movie to play while the preloader isn't 100%? I also get an error on flash while simulating download in flash. The error says:
    Branching::script:;;
    deepak branching : scripteval:[object Object];
    When I get that error, that is the time that the captivate movie plays. Below is my code in flash it is in AS2.
    var linking:MovieClip = _root;
    var level2 = linking.attachMovie("captivateHolder", "captivateHolder", this.getNextHighestDepth());
    var loader:MovieClipLoader = new MovieClipLoader();
    loader.loadClip("captivate/prequalified_contractors.swf", level2.captivateMovie);
    var preload:Object = new Object();
    loader.addListener(preload);
    preload.onLoadStart = function(target){
      trace("Started Loading");
    preload.onLoadProgress = function (target, loadedBytes, totalBytes){
      level2.captivatePreloader.text = Math.floor((loadedBytes/totalBytes)*100)+"%";
      level2.captivateMovie.rdcmndNextSlide = 0;
    preload.onLoadComplete = function(target){
      level2.captivatePreloader.text = " ";
      level2.captivateMovie.rdcmndNextSlide = 1;
    I tried to restrict the captivate movie from playing by putting rdcmndNextSlide = 0;
    My question is, how can I restrict the captivate movie from playing while the event is still on the onLoadProgress and make it play once the preloader reaches 100%.
    This is the first time that I used adobe captivate 4.
    Thank you.
    Regards,
    Harry

    You could pause the Captivate project when you start to preload it by using the Captivate system variables. Then when your file has been loaded 100% you could resume it again by using a different system variable.
    You can see a list of the various system variables here: http://www.cpguru.com/2009/04/28/system-variables-in-captivate-4-%e2%80%93-a-complete-list /
    The relevant variables for you would be:
    rdcmndPause = 1; (to pause the project)
    rdcmndResume = 1; (to resume playback)
    Naturally you need the instancename (where you load your Captivate movie into) infront of the variable name.
    myLoaderContainer.rdcmndPause = 1;
    /Michael

  • How to upload single heavy video file by flash AS2.0

    How can I upload single heavy video file by AS2.0 with php backend?
    I have video file of 200 GB but flash officially supports 100MB.
    http://help.adobe.com/en_US/AS3LCR/Flash_10.0/flash/net/FileReference.html
    Then how this can be achieved?

    As far as I know edge is always going to create that whole set of files. that's just the way it works. You had said that your problem stemmed from the fact that you had a lot of these animations or what you called "flashcards" and you didn't want to have to upload a whole set of project files for each card.  right?? My suggestion was just a way to package all your "flashcard" animations into a single edge project so you only have to upload a single set of files for all your "flashcards" . that said, not knowing what your application is or the way the user interacts with the cards this approach might not work for you at all. But I don't think there is a single file (like a swf) solution for edge projects.
    Joel H

  • Open PDF from Flash (AS2)?

    I have a button inside my flash movie and I would like to give the user the option to download a pdf on clicking the button.
    I am using Flash CS4 and AS2.
    What options do I have if I want one of these-
    a) Open the pdf in a new browser window/tab
    b) Give user the option to save the pdf to their computer instead of it opening in the browser automatically.
    I am not smart with coding so any help with the code would be appreciated. Thanks.

    The easiest approach is to use getURL and open the pdf in another browser window...
    getURL("your.pdf", "_blank");
    For the second part you could use the FileReference class to provide downloading, but it is more complicating to configure.  The getURL approach will give the same net result since the file is downloaded and saveable via the browser window anyways.

  • SharedObject in flash AS2.0

    Dear all,
    I have a problem with SharedObject. I created SharedObject using AS2.0 it's working fine.... my question is can it possible to store the variable values in an .txt file where the flash file is saved... basically the SharedObject will store the vallues in localdrive with file extention .so or .sol...if any posibility is there help me please... not only using SharedObject if any other way to store the vaules in .txt file will be helpfull for me... so, please help me if any one know the solution...my requirement is to store the the position of the swf file and when the time it reopen, it should start from  previous position.
    Thanks in advance
    Regards
    Santhosh Kumar Mallepaddy...

    no, you can't use the sharedobject to save in any format other than the so format.
    using the filereference class you can save a local file.

Maybe you are looking for