files and clips in AS2.0 class

Hello forum members
I have a real lack of understanding on how to perform actions on a clip from movie help
a class file. I like the concept of using a class instead of actionscript (2.0 for this application) on the timeline of my fla file.
I'm using AS2.0 TweenLite of greensock.
I have a movieclip in the library fla, link to the clip is "quiz_bg".

I wish I could put the clip on the stage in the class file using "attachMovie".
Once on the scene, I want to move it.

My questions are: How do I correctly reference the clip in the library in the class file?
How correctly to instantiate the class in the fla? It's one thing, put a trace statement in a constructor, and see the route displayed, it's something else to put a movieclip on the stage and then do something with it! (at least for me). Here's the code I'm trying to use to accomplish this task:

class RdoRotate extends MovieClip
{
private var clip: String;
private var rdo_mc:MovieClip;
rdo_mc = this;

public void RdoRotate(mc:String)
{
rdo_mc.attachMovie (MC, "XDO", getNextHighestDepth ());
TweenLite.to (mc, 4, {_alpha:0, _xscale:50, _yscale:50, _x:0, _y:0, onComplete:showMe});})
Clip = mc;
MC._x = 50;
trace ("built");
}
function showMe()
{
TweenLite.to (clip, 2, {_alpha:100, _xscale:45, _yscale:45, _x:225, _y:150, onComplete:turnMe});})
}

function turnMe()
{
TweenLite.to (clip, 4, {_rotation:366, ease:Elastic.easeOut, onComplete:turnBack});})
}

function turnBack()
{
TweenLite.to (clip, 4, {_rotation:-360, ease:Elastic.easeIn,overwrite:true});})
}

}

and in the fla file, I use: var x_mc:RdoRotate = new RdoRotate ("quiz_bg");
I know there is something basic that here, I'm missing. Advice will help me to do it properly.

Thank you
eholz1



If tweenlite is located in a directory called gs, you must import this class in your RdoRotate class:

import of gs. TweenLite;

to associate a movieclip library with RdoRotate, click with the right button on the movieclip in the library, click on the link and assign RdoRotate as the class and attribute to him a ID link, too.

to create an instance of your class, just use attachMovie() (and your ID link) in your fla to instantiate an instance of your class.

Tags: Adobe Animate

Similar Questions

  • Classes and edition: differences AS2/AS3

    Hello

    It s not clear for me, where I have to define Classes and Constructoremethods. In AS2, it was possible to define a class 'light' by defining a constructormethod. In AS3, I read, a class can only be set in an external AS file. It is still possible to use the constructormethod in the Flash file or do I source on all my constructormethods and HAVE their implementation in real classes in an external file?

    Thanks for your replies

    In AS3, all classes must be defined in an external actionscript file and the class must exist within a package. Just do a quick search for "class as3 tutorial" and you should find enough to help you get started.

  • Cannot add files to Clip + but no error message and Clip Sport works fine on the same machine

    I used successfully the Clip + 4 GB for years without any problem, currently using Windows 7 Prem 64 bit.  Now when I try to add files using MS Explorer it shows the added file (in the Green window scroll bar) but never ends adding the file!  I waited 15 minutes for a short file without success.  Also, I started to use a Sport Clip 8 GB and it works fine, just can't get the Clip + to add more files.  I can delete files and can also use files that remain on the Clip + but can not add new ones.  Any help would be greatly appreciated!  Thanks in advance.

    I tried to reload the firmware and this time it worked well and is not only all my old stuff still on the Clip + but I was able to add a small file without problems and properly access all folders of files, so THANKS for the suggestion and the problem solved!  BTW, I had 318MB of space on the Clip +, not KB... Sorry about that

  • Difference between an ActionScript file and ActionScript class

    Hello

    Could you get it someone please let me know what is the difference between a file Action and the Action Script class

    On the Flex Builder it offers the possibility to create an ActionScript file as well as
    an ActionScript class.

    Can someone please let me know what is the difference between these two?


    Thanks in advance.

    Kiran,

    ActionScript file is basically something that you can include in your mxml file is similar as you write the code in the tag. Where class actionscript will behave as an object for which you can create the new instance.

    Ankur Arora

    Project Manager (Flash and Flex)

    http://flashdeveloper.blogspot.com

    http://www.Ankur-Arora.com

  • Recording and clip files wav in sound recorder in Windows 7.

    Original title: he had to use the tape recorder without attaching another device on my computer

    I'm doing the wave files and fix them. I used to be able to do this with the sound recorderin WinXP, now I can not in Win7. Is there a way to get the XP a return or to change the Win7 to do what I need it to do?

    Thank you!

    Amanda

    Hi Amanda,.

    In Windows 7 sound recorder is intended only for end of record. You cannot change the songs in sound recorder. You will have to go to his editing for this effect of third party software. You can take deadmanwalking86 into account recommendation.

    Here are answers to some frequently asked questions about recording audio in sound recorder.

    Audio recording in sound recorder: frequently asked questions
    http://Windows.Microsoft.com/en-us/Windows7/recording-audio-in-sound-recorder-frequently-asked-questions

    Note: Microsoft cannot guarantee that problems resulting from the use of third-party software can be resolved. Software using third party is at your own risk.

    Kind regards

    Shinmila H - Microsoft Support

    Visit our Microsoft answers feedback Forum and let us know what you think.

  • XML file and flvplayback AS2

    I use the flvplayback component with Flash CS4.

    To use xml with a file, it indicates that all I have to do is enter the name of the file in the contentPath, what I've done (videostest.xml)

    The Flash files, the html file and xml file are in the same directory, so the path name should be good.

    When I go to see the file, nothing is displayed. If I get the name of the actual FLV file it works fine, but I need to use an xml file.

    Text in the following XML file:

    <? XML version = "1.0" encoding = "utf-8"? >
    < FlvPlayer >
    < item >
    < file > WLA_Now_Fall_2008_Introduction.flv < / file >
    < / point >
    < / FlvPlayer >

    I gave the component on the stage, name the instance FlvPlayer, but I don't think that counts.

    Should I have any other script on this page. Knowledge of Adobe Center does not have to do this.

    TIA

    If the name of this xml file is flv.xml and the name of the instance you component flvplayback flv, you can use:

    var xml = new XML();
    xml.ignoreWhite = true;
    xml.onLoad = parseXML;
    XML. Load ("FLV.xml");

    parseXML() {} function
    flv.contentPath = this.firstChild.firstChild.firstChild.firstChild.nodeValue;
    }

  • In a sequence of CTF, is it possible to obtain a text file of sequence clips display? There is a display of text file for clips (cmd-9). Zoom the timeline cancels the ability to see the whole sequence of the time line.

    In a sequence of CTF, is it possible to obtain a text file of clips in sequences display (name and duration)? There is a display of text file for clips (cmd-9). Zoom the timeline makes this visible annotation for shorts, cancels but the ability to see the whole sequence of the time line. Of course, it would help my editing.

    TIA

    In Final Cut Pro 7, you can use editing > find command to search on used clips in the sequence. See if there is an equivalent command in FCE. Unfortunately, I can't determine that at first hand on my system. (In addition, if you are still interested whereas FCP X, there the so-called Timeline index which provides quick access to a list of markers, clips, effects, etc..)

    Good luck.

    Russ

  • I did this after intro animation effects and it was made entirely from photoshop files and my comp settings in AE is HDV 1920 x 1080 25, then I was asked to the release of the film in 1920 X 1080 MPEG H.264 NTSC 29.97 progressive, someone has an idea how?

    I did this after intro animation effects and it was made entirely from photoshop files and my comp in AE settings is HDV 1920 x 1080 square pixels 25,.

    Then they asked me out of the movie at 1920 X 1080 MPEG H.264 NTSC 29.97 progressive, someone has an idea how?

    1. to adjust for NTSC composition without affecting the report l / h.

    2 - this film must be rendered in RGB + ALPHA, and yet the mpeg does not support this definition, it seems that the record will be in the video codec animation or other.

    I am bit confused if I need to adjust the model, or leave it and set the video codec only.

    Thank you

    If you have (or get) MPEG Streamclip, which is free, you can open the anamorphic clip and resize it to 1080 true. You will be able to choose H.264 as a codec. It will be if necessary deinterlacing. Suppose that the MPEG card is a MP4 container.

    Good luck.

    Russ

  • Audio files and movies in my iMac, how to find them?

    It seems that my iMac HD have Audio files and movies.

    I do not remember that I downloaded from these files.

    How can I find / manage them please?

    Maybe my iOS devices?  (synchronization via iTunes)?

    Thank you.

    Disk utility class files by type. They can be found anywhere, as in e-mail messages and attachments, Photos, downloads, your library, iTunes etc. Look in these places. If you are unsure where to start there are some utilities that you can use as WhatSize. It is available in the App Store. This is just one example; There are other similar products.

  • build a Visual Studio C++ 2008 .dll file and use it in labview

    Hello

    A few days I tried to create a .dll with c code file and use it with a call library function node in LabView. But I could never do it with success. I use Visual Studio 2008 and labview 8.6.

    I had a look at some tutorials, but they were written for different versions of Visual Studio. And because I'm a newbie to Visual Studio, it was difficult for me to do in another version the turtrial is written for.  However, I have a lot of experience in programming c for processor atmel (AVR Studio).

    Is there someone who could help me step by step hollow Visual Studio C++ 2008 and later versions also help me configure my call library function node?

    I'm form Switzerland, my English may have a few errors. Sorry for that.

    What I've done so far:

    * I opened VisualStudio 2008 and created a new project.

    * For this I used the model ' class library ' (because I live in Switzerland, I have German versions of visual studio, and labview. So, probably, it is not called exactly "class library" in the English version)

    * The project is created and I can insert my functions.

    * but here I have some difficulties: in my tutorials, they say that a function should be defined as follows:

    type name (arguments) WINAPI

    {

    code

    }

    for example

    unsigned int WINAPI multiply (unsigned char, unsigned char b).

    {

    unsigned int c;

    c = a * b;

    return c;

    }

    but when I try to compile the project I get the errormessage:

    SyntaxError: missing; prior to "multiply".

    * When I remove WINAPI, it creates the dll file

    * but when I try to open this dll with a "call library function node" in labview, I get an errormessage labview, that my multiply function is not found in the dll.

    I'd be happy if someone could help me with this.

    You need adorn your statements with extern "C". LabVIEW manages only the C dll; It cannot manage the C++ dll, which is what you will get if you do not have extern "C". I do not understand why you are trying to use 'stdcall '. For a normal DLL just stick to C-calls.

    The link provided by Red rooster is for Visual C++ 6, which is a very old version. I suggest you look at instead, because it deals with Visual Studio 2005.

  • Store other types of file on Clip +?

    Just curious, it may use the Clip + (especially an external micro SD card) to store other types of files (images, word processing documents and other files that are not readable/playable by the Clip +, IE)? Indeed, it would be like using the Clip + fact card reader or USB key. She would even agree to transfer the files, and if so, the presence of unrecognized file types would somehow screw up the media database? The method to my madness, it's that if possible, it would make for a convenient way to transfer files between my home and work PC, since I use the Clip + at both locations.

    Thanks in advance.

    Yes. I did it myself on files larger than is practical to send an e-mail to my work address, or vice versa.  

    Just be sure to use the MSC on the Clip +. This makes it appear like just another (drive) storage device on your computer.

  • Fuze and Clip back audiobook and takes over the functions of podcast

    I would like to see a podcast of resumé and a function of recovery audiobook on the Clip and the "rocket" so that I can play the part of a podcast or audio book, play music, then go back where I was in the podcast or audio book without having to remember what audiobook or podcast file played last , and how to navigate. I also want players to mark podcast and audiobook files as read when they are listened to completely, the capacity of the list only unread audiobook or podcast files and a function on the player to remove all the podcasts or books that have been read.

    Apparently, this issue has been addressed on the rocket, Clip and Clip +. I had not read that it was addressed and assumed that it was not. When you play a 'audio book' Park then some music files, then go back to the "book", it highlights the last file read in the book. In the past, I had made my series of podcasts in the audiobook on the Clip and the rocket record, but then ceased to do this. Now, I have a good reason to put them there once again. It's in the notes of the firmware and I missed it, or if it was not documented? In any case, I am pleased that this has been addressed.

    I am pleased that Sandisk responds to our requests when they are reasonable. I wish I had known earlier that this question is dealt with.

  • went to the command and put in findstr/c: "[SR]" %windir%\logs\cbs\cbs.log &#62; sfcdetails.txt to find the corrupted file and nothing happened

    I had a problem with my laptop. I let a friend use it and she got a virus. The screen is black. She took it to get fixed. When she returned I couldn't open some files. (Always have this problem with some files) my shortcut icons are no longer there. Then I get this message on the Catalyst Control Center does not work. In any case, I did a scan and he told me that I had corrupted in my cbs log files so I tried to do the command findstr/c: "[SR]" %windir%\logs\cbs\cbs.log > sfcdetails.txt to find the corrupted file and nothing happened. Help!

    Hello

    Departure - in the search box, type-> order

    at the top of the list to find COMMAND - CLICK RIGHT to it - RUN AS ADMIN

    Type the following commands (or copy and paste one at a time), each followed by pressing on enter.

    ipconfig/flushdns

    nbtstat-r

    nbtstat - RR

    netsh int Reinitialis

    netsh int ip reset

    netsh winsock reset

    RESET

    That resets your TCP/IP stack

    It might also be a good idea to updare drivers network - NETWORK card (wired) and WiFi (wireless)
    by checing at the site of the manufacturer of the system/card mother and/or sites of the manufacturer of the real device.
    Methods for manual update of driver at the end of this response.

    --------------------------------------------------------------------------------------
    --------------------------------------------------------------------------------------

    For settings.ini as this article sets out the question may be totally ignored.

    The SFC.exe command reports Settings.ini file errors in the CBS.log file after that you add gadgets
    for the Sidebar of Windows Vista by using the Sysprep tool and an Autounattend.xml file.
    http://support.Microsoft.com/kb/947595

    -----------------------------------------------------------------------------------------------------------------------------

    These errors only are in the settings.ini for the sidebar and are not a serious problem by all means.

    Close the sidebar for that.

    Something else for the settings.ini - run AutoRuns and look at the entries SideBar Gadget - y at - it
    all pointing to is no longer present as temp files or uninstalled gadgets or not running?
    Those who will reflect the "yellow icons" on the left side and the files/folders will not exist. If so just
    Click on it and delete - Reboot. This may correct the errors that you see.

    Autoruns - free - see what programs are configured so that it starts automatically when your system
    boots and you login. Autoruns shows you the full list of registry and file locations where
    applications can configure Auto-start settings.
    http://TechNet.Microsoft.com/en-us/sysinternals/bb963902.aspx
    -------------------------------

    Another process to try is to remove everything except a gadget - everything what you think is the most simple, that you use.
    Maybe the calendar. Then RESTART - use another simple gadget, and delete the first class used
    -RESTART again. See if that helps.

    Rarely, the error causing the problem with the sidebar and not not affect the system in general.

    The SFC.exe command reports Settings.ini file errors in the CBS.log file after that you add gadgets to
    the Sidebar of Windows Vista by using the Sysprep tool and an Autounattend.xml file.
    http://support.Microsoft.com/kb/947595

    -------------------------------

    Another method to try with the SideBar works does not is to copy the Settings.ini to another folder and
    and then delete - then start sidebar.

    --------------------------------

    For tcpmon.ini and settings.ini:

    You can also try to restore any copy of a Vista DVD (even 32 or 64 bit however).

    Access files on your Vista installation DVD
    http://www.Vistax64.com/tutorials/86959-access-Vista-install-DVD-files.html

    How to extract system files missing from the DVD of Windows 7/Vista.
    http://blog.NirSoft.NET/2009/09/17/how-to-extract-missing-system-files-from-the-DVD-of-Windows-7vista/

    ===================================================
    ===================================================

    Also update your drivers: (WiFi (wireless), NIC (Wired) and others as required)

    This is my generic how updates of appropriate driver:

    This utility, it is easy see which versions are loaded:

    -Free - DriverView utility displays the list of all device drivers currently loaded on your system.
    For each driver in the list, additional useful information is displayed: load address of the driver,
    Description, version, product name, company that created the driver and more.
    http://www.NirSoft.NET/utils/DriverView.html

    For drivers, visit manufacturer of emergency system and of the manufacturer of the device that are the most common.
    Control Panel - device - Graphics Manager - note the brand and complete model
    your video card - double - tab of the driver - write version information. Now, click on update
    Driver (this can do nothing as MS is far behind the certification of drivers) - then right-click.
    Uninstall - REBOOT it will refresh the driver stack.

    Repeat this for network - card (NIC), Wifi network, sound, mouse, and keyboard if 3rd party
    with their own software and drivers and all other main drivers that you have.

    Now in the system manufacturer (Dell, HP, Toshiba as examples) site (in a restaurant), peripheral
    Site of the manufacturer (Realtek, Intel, Nvidia, ATI, for example) and get their latest versions. (Look for
    BIOS, Chipset and software updates on the site of the manufacturer of the system here.)

    Download - SAVE - go to where you put them - right click - RUN AD ADMIN - REBOOT after
    each installation.

    Always check in the Device Manager - drivers tab to be sure the version you actually install
    presents itself. This is because some restore drivers before the most recent is installed (sound card drivers
    in particular that) so to install a driver - reboot - check that it is installed and repeat as
    necessary.

    Repeat to the manufacturers - BTW in the DO NOT RUN THEIR SCANNER device - check
    manually by model.

    Look at the sites of the manufacturer for drivers - and the manufacturer of the device manually.
    http://pcsupport.about.com/od/driverssupport/HT/driverdlmfgr.htm

    Installation and update of drivers to 7 (update drivers manually using the methods above is preferred
    to make sure that the latest drivers from the manufacturer of system and device manufacturers are located)
    http://www.SevenForums.com/tutorials/43216-installing-updating-drivers-7-a.html

    I hope this helps.

    Rob Brown - Microsoft MVP<- profile="" -="" windows="" expert="" -="" consumer="" :="" bicycle="" -="" mark="" twain="" said="" it="">

  • "Can not open AsIO.sys (2)" I get this message when I log in after a reboot. I have search for the file, but can't find it with the research or the command prompt. What do do in this file, and can be created and put into the appropriate folder?

    "Can not open AsIO.sys (2)" I get this message when I log in after a reboot.  I have search for the file, but can't find it with the research or the command prompt.  What do do in this file, and can be created and put into the appropriate folder?

    Hi Jack,

    This driver belongs to AsIO.sys Asus Probe. Try to uninstall Asus Probe and if you need, install again. If this does not help, uninstall Asus Probe and other tools of control such as Speedfan. Open the registry (regedit.exe) editor and search for AsIO.sys and remove all the entries that you can find.

    André
    "A programmer is just a tool that converts the caffeine in code" Deputy CLIP - http://www.winvistaside.de/

  • Why sometimes Eclipse do not generate alx file and cod?

    Hello everyone, I have a strange question, sometimes, when I'm programming and to run my applications in the Simulator, everything seems fine, but sometimes after making some changes in my source (add new classes) and running againg the application simply don't change absolutely nothing, I saw my files and I have notice that when this happens because the alx file and cod are not generated by eclipse why this, happen is because of the way of programming?

    Thanks for your time!

    See the link below:

    http://www.BlackBerry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/796557/800738/800901/...

    And also check out the link in my signature for some basic tips on the installation program.

Maybe you are looking for

  • IMac running very slow

    Hello ~ We had had this IMac for more than 7 years and recently started running very slowly.  I do not understand, by EtreCheck the RAM we are weak, but someone else can guide me on what else can do, by this report, to fix the slowness? EtreCheck ver

  • I can only access my two sparse bundles

    Hello I have 2 Mac book pro and a time capsule. Time machine comprising a back from my Mac. I see different 2 sparse bundles in the finder, but now I can access only the first of my mac A few days the of there it was the same problem but I was able t

  • update of security for microsoft works 9 (KB2092914)

    Remember - this is a public forum so never post private information such as numbers of mail or telephone! Ideas: Programs that you have problems with the update of ms works 9 Error - mobile messages have no cd drive, but asking to insert ms works 9 c

  • Print to the file will appear asking the name of output file how can I change this?

    Cannot print

  • Balancing problem

    Hello.I configured the cluster unicast and WKA. Also - I start proxy services 3 raised on 3 different nodes. On the client, I say as a remote proxy only 1 address, because in written documents of coherence that all proxy in the cluster services know