Need help with FLV type SWF playback in flash movie

Hi,
I have three external SWF files from a client without FLA
sources. The SWFs were done 3 years ago by someone else so there is
no way to modify the existing SWF files. These contain no
interactivity but may involve nested clips on the main timeline.
They are AS1 or AS2 files so they need to be done with AS2
scripting to keep it simple.
I need to call these SWF files inside another flash movie and
play them in a player window as if they were video files with
play/pause, seekbar and volume controls. The needed functionality
is similar to FLV players. My controls will use custom graphic
buttons and sliders mimicking the look of CNN video player window.
Does anyone know a good tutorial on how to script these
controls for SWF?
Most likely I think I will load it in a clip and I am
thinking that I will need to get the duration of the loaded swf in
order to set up the seekbar.
Thanks in advance,
Attila

I think your professor, or somebody, gave you directions with ActionScript 2 programming. In AS2, what oyu have here would have worked just fine. But, in AS3, you need to use a fairly different approach. Your buttons, and their instance name, can remain the same. But now, in AS3, you have to add event listeners in the following manner:
yourButtonName.addEventListener(MouseEvent.CLICK, yourListenerFunction);
In your case, you can do one of two things - A) assign a unique listener function to each button, or B) assign the same listsner to both functions:
A)
start_btn.addEventListener(MouseEvent.CLICK, startPolygon);
stop_btn.addEventListener(MouseEvent.CLICK, stopPolygon);
function startPolygon(e:MouseEvent):void{
    polygon.play();
function stopPolygon(e:MouseEvent):void{
    polygon.stop();
B)
start_btn.addEventListener(MouseEvent.CLICK, controlPolygon);
stop_btn.addEventListener(MouseEvent.CLICK, controlPolygon);
function controlPolygon(e:MouseEvent):void{
   if (e.target.name == "start_btn") {//Test for the name of the object that dispatched the CLICK event
      polygon.play();
   } else if (e.target.name == "stop_btn") {
      polygon.stop();
When I'm using several buttons that do the same/nearly similar things, I favor approach B over A, as it keeps me to jsut one single function to deal with.

Similar Messages

  • I need help with controlling two .swf's from third.

    Hi, thanks for reading!
    I need help with controlling two .swf's from third.
    I have a problem where I need to use a corporate designed
    .swf in a digital signage solution, but have been told by the legal
    department that it can not be modified in any way, I also can't
    have the source file yada yada. I pulled the .swfs from their
    website and I decompiled them to see what I was up against.
    The main swf that I need to control is HCIC.swf and the
    problem is it starts w/ a preloader, which after loading stops on a
    frame that requires user input (button press) on a play button,
    before the movie will proceed and play through.
    What I have done so far is to create a container swf,
    HCIC_container.swf that will act as Target for the HCIC.swf, and
    allow me to send actionscript to the file I'm not allowed to
    modify.
    I managed to get that done with the help of someone on
    another forum. It was my hope that the following script would just
    start HCIC.swf at a frame past the preloader and play button, and
    just play through.
    var container:MovieClip = createEmptyMovieClip("container",
    getNextHighestDepth());
    var mcLoader:MovieClipLoader = new MovieClipLoader();
    mcLoader.addListener(this);
    mcLoader.loadClip("MCIC.swf", container);
    function onLoadInit(mc:MovieClip) {
    mc.gotoAndPlay(14);
    But unfortunately it didn't solve my problem. Because there
    is a media-controller.swf, that is being loaded by HCIC.swf that
    has the controls including the play button to start HCIC.swf.
    Here's a link to a .zip file with all 3 .swf files, and all 3
    .fla files.
    http://www.axiscc.com/temp/HCIC.zip
    What I need to do is automatically start the HCIC.swf file
    bypassing the pre-loader and play button without editing it or the
    media-controller.swf in anyway. So all the scripting needs to be
    done in HCIC_container.swf.
    I know this is confusing, and its difficult to explain, but
    if you look at the files it should make sense.
    ActionScripting is far from my strong point, so I'm
    definitely over my head here.
    Thanks for your help.

    Got my solution on another forum.
    http://www.actionscript.org/forums/showthread.php3?t=146827

  • Need Help with data type conversion

    Hello People,
    I am new to java, i need some help with data type conversion:
    I have variable(string) storing IP Address
    IPAddr="10.10.103.10"
    I have to call a library function which passes IP Address and does something and returns me a value.
    The problem I have is that external function call in this library excepts IP Address in form of a byte array.
    Here is the syntax for the function I am calling through my program
    int createDevice (byte[] ipAddress).
    now my problem is I don't know how to convert the string  IPAddr variable into a byte[] ipAddress to pass it through method.

    Class InetAddress has a method
    byte[]      getAddress() You can create an instance using the static method getByName() providing the IP address string as argument.

  • Need help with ext. SWF and XML

    I'm trying to create an External SWF to load into my main
    site (photography).
    Home | Portfolio | Published Work | Bio | Contact
    The SWF I want to load externally is Portfolio because it has
    5 sections
    Those 5 sections are:
    -Editorial
    -Adventure
    -Fly Fishing
    -Multimedia
    -Weddings
    I'm looking to keep this dynamic as possible, but I'm one of
    those guys who doesn't write code from scratch, but knows AS well
    enough to modify a base or a generic template if ever given. It
    would be easier to use one subsection as an example, which could be
    applied to all others.
    e.g. "Fly Fishing" 1-Main container; 5-10 thumbnails (1
    dyanamic thumbnailcontainer)
    - I don't know XML (but can modify it). basically having an
    ID tag for each image, possibly dynamically generate a thumbnail
    too. Also have a spot for dynamic text to load in (captions with
    multiple text lines for images upon onRelease - maybe this could be
    it's own MC that loads on top of the main photo container)
    - on (release) on a thumbnail: there would be a little
    information icon that would appear. If you mouse over, it would
    overlay a layer over that specific ID photo, and the text appear.
    RollOut it would fade out the layer above that specific ID photo.
    - Transition: FadeOut/Blur/Exposure Blur, something
    interesting to that nature.
    - Thumbnails: is it just easier to create thumbnail images
    manually, and just create a separate container?
    - Image folders: I would imagine each section would have
    it's own watch folder. For example "Fly Fishing" would be a folder
    "/swfImg_flyFishing/", but perhaps having one XML file.
    - XML file details
    id
    location
    caption summary
    title
    As you can see, if I had one template to build off of, I
    could repeat it self for the others. I need help and if there is a
    flash component (free or purchase) that does at least 70% of what I
    need, please share information. thank you!Portfolio

    I know doing a pushback to the client requires Flex Data
    Services, but since I don't use FDS I can't tell you exactly how.
    But look in the documentation about "pushing" data to the client.
    Once you've figured out how to do that, you can trigger that push
    once you've finished editing the xml file. You may want to ask over
    in the FDS forum.

  • Need help with loading child .swf into parent .swf

    Hello,
    I am having trouble with an external .swf that isbeing loaded
    into the master.swf. All of the files loads perfectly. However the
    .swf that has the contact form movieclip in it will not work. The
    combobox does that display any of the items listed and the form is
    not being sent to the server. Can anyone give me a hand with
    this?

    can you post your code

  • Can't get Progressive FLV's to playback in flash movie

    Developing a flash resource which runs FLV files from within it as pro
    gressive. It works ok on my local testing computer/network server. But when I put it online it does not play.
    I opened up the components panel for each FLV and noticed they were absolutely linked to my network drive (obviously when online this linking will now work). So i changed all the linking to be relative and some warning windows did come up and say i was breaking the link but i ignored them because i don't care about how it runs locally...i want this resource to work online!
    But now the FLVs will not playback locally or online! I need some help....something that it might also be is I am uploading this resource to an LMS called Janisons (perhaps they are not FLV through flash playback - friendly).
    Is there any particular path of troubleshooting I could go along? Because I have just about tried everything i know!
    Thanks in advance.
    UPDATE: I changed back one of the FLVs parameters to link to local drive in the component parameters - and as expected, it runs fine locally but when previewd in chrome (which might i add has some great debugging features that you could only dream of finding in IE) i get the following message:
    SecurityError: Error #2148: SWF file http://my.tafe.qld.gov.au/GLC/GLC_Food_Hospitality/GLC_SITHFAB009A_TQC_A/Scenario/barMenu.swf cannot access local resource G:\Resource Development\RD\2009-2010\ITG 4\Food&Bev\RSA\Online\Resources\Scenario\Scenario4_Staff_Responsibility\ExpensiveArvo2.flv. Only local-with-filesystem and trusted local SWF files may access local resources.
    at flash.net::NetStream/play()
    at fl.video::VideoPlayer/http://www.adobe.com/2007/flash/flvplayback/internal::_play()
    at fl.video::VideoPlayer/http://www.adobe.com/2007/flash/flvplayback/internal::_setUpStream()
    at fl.video::VideoPlayer/http://www.adobe.com/2007/flash/flvplayback/internal::_load()
    at fl.video::VideoPlayer/load()
    at fl.video::FLVPlayback/doContentPathConnect()

    Geez I feel like a numbskull.
    I had identified the problem correctly (linking) - but i only just found out that the linking is relative to the placement of the SWF file within the folder structure - NOT THE HTML FILE IT IS EMBEDDED WITHIN. I'm just so used to considering everything relative to the HTML page in previous versions of Flash (i.e. when coding external website links).
    This site gave me the quick answer I needed:
    http://forums.creativecow.net/thread/190/862395
    I can have a good sleep tonight now!
    PS - I have never answered my own question before....

  • Need help with output type EDI for ERS

    All,
    I want to be able to run and ERS settlement and have the invoices created sent via EDI/XML to the supplier.   I have several questions on the set up.
    1)  I have output type ERS6 which is defined as ERS EDI.  I assume because it does not start with Z* this is SAP standard, so I shouldn't have to modify any of this.
    2)  I've added my supplier to this output type. 
    3)  I assume I need to create a partner profile for this supplier?  If so can someone tell me the message type to use?
    Is there any set up I'm missing in this process?   I've executed ERS but do not get an idoc and I'm fairly certain it's because I haven't done the partner profile set-up.
    Thanks for your help.
    Sandra

    Hi,
    You don't have to modify thise setup unless you have any customized requirement.
    You are missing partner profile setup.Carry out the setup and run MRRL tcode to create the idocs
    Enter the following values using tcode WE20.
    Field                                       Value
    Message type                         GSVERF
    Partner type                             LI (vendor)
    Partner function                        LF (vendor)
    Port                                         SUBSYSTEM ( Port to your middleware)
    Output mode                            such as Collect IDocs
    Basic type                                GSVERF01
    Application                                 MR
    Output type                                ERS6 or the type you have defined
    Regards,
    Karuna

  • Need help with DOC type web service

    hi,
    I am trying to write a simple message style ( doc type ) web service but no success so far. I have tried to search for examples but no use. I already implemented some simple RPC style web services like calculator etc and able to use them. I am more interested in the DOC type ( which sends SOAP message and receives SOAP message back). Can Anybody give me an example for implementing this type of service ( very-simple say HellowWorld ) or point me to some website . I am not able to generate the response envelope. I can write the client program which will send a SOAP Envelope to this services with one parameter NAME and the services should return Hello Name but in a SOAP envelope form. I can create a SOAP message in this Client using SOAPConnection and MessageFactory etc. Your help will be really appreciated. There is very little stuff about webservices on the internet as well on this forum.
    Thanks
    Vinod

    Hello kwilding2,
    Thanks for the quick response and pointing to some useful websites. I downloaded the code from web service essentials BUT all the examples are using SOAP RPC calls. They create a call object and call one of the service methods and a response is returned. I am little confused about this stuff. I am looking for something which returns the response in a SOAP envelope for which i think i need to use JAXM API which I already have downloaded. I have created a client which composes a SOAP envelope using SOAPConnection and other MessageFactory classes etc and can send this SOAP envelope to a web service. In return I want the web service to give the SOAP envelope.
    I have gone thru xmethods.net and picked the following stock quote request and response:
    Sample Request envelope:
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsd="http://www.w3.org/1999/XMLSchema">
    <SOAP-ENV:Body>
    <ns1:getQuote xmlns:ns1="urn:xmethods-delayed-quotes" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
    <symbol xsi:type="xsd:string">IBM</symbol>
    </ns1:getQuote>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    Sample Response Envelope:
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsd="http://www.w3.org/1999/XMLSchema">
    <SOAP-ENV:Body>
    <ns1:getQuoteResponse xmlns:ns1="urn:xmethods-delayed-quotes" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
    <return xsi:type="xsd:float">133.625</return>
    </ns1:getQuoteResponse>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    I also want the things in this order. This webservice at xmethods just returns the price for a stock, so how they say it returns this Response Envelope. Is this Envelope something implied. I am getting more confused.
    any help will be appreciated.
    Thanks
    Vinod

  • Need help with Premiere Pro CS6 playback problem

    Can somebody help me please? My premiere pro cs6 does not play plenty video in the time line for editing irrespective of using fast 64 bit, intel core i7, 16gb ram pc. Please what could I use to make it more stronger?
    Edited by: Kevin Monahan
    Reason: Changed title for better search ability.

    More information needed for someone to help... please click below and provide the requested information
    -Premiere Pro Video Editing Information FAQ http://forums.adobe.com/message/4200840
    Exactly what is INSIDE the video you are editing?
    Codec & Format information, with 2 links inside for you to read http://forums.adobe.com/thread/1270588
    Report back with the codec details of your file, use the programs below... A screen shot works well to SHOW people what you are doing
    http://forums.adobe.com/thread/592070?tstart=30 for screen shot instructions
    Free programs to get file information for PC/Mac http://mediaarea.net/en/MediaInfo/Download

  • Need help with flv file

    I have a webinar file(flv)that I'm trying to open that said it needed Flashplayer. I downloaded flashplayer. It's in my add/remove programs window, but it doesn't show anything on the right side(file size). Does that mean that it isn't installed?  I tried uninstalling and download/install. I tried to open with Swiff, but had no success. I'm about to delete the file because I'm wondering if the information is worth the time I have into it.

    You try downloading a tool like this: http://richapps.de/?p=48 to run the video file, to see if it is working or not.

  • NEED HELP WITH CHOPPY TYPE AFTER BURNED TO DVD

    I have about 20 jpgs (RGB) of just copy on a black background. I've brought those jpgs into iMovie HD and they look fine.
    When I render those jpgs as a movie (basically a slideshow) to a DVD and play it back on your average television...each slide of copy on a black background, comes out horrible. Grainy, pixelated, and out of focus.
    Please, I need to know if there is anything anyone has tried and had work. I feel that I've exhausted quite a few methods for executing the problem...but still nothing better.
    G5   Mac OS X (10.4.9)  

    I don't think the problem is happening in the
    "burning" of the DVD, it is happening right when I am
    previewing. I can see that the text I have currently
    up on screen looks great, it's fine, nothing is wrong
    with the copy. But as soon as I view it before I put
    it to disc, it becomes completely distorted and
    choppy. Like I've imported a low res file to begin
    with or something.
    The preview function in iDVD should be though of as a 'for position only' function. It DOES NOT represent how the final mpg-2 compressed DVD will look.
    Preparing images for DVD slideshows at http://docs.info.apple.com/article.html?path=iDVD/6.0/en/17.html will give you some recommendations on image sizes to use.
    F Shippey

  • Need help with specifying type range in dynamic text box

    is it possible to specify my type range in a dynamic text box
    that is loading images as well as type? Everytime i specify the
    range flash quits. if i take out the image loading actionscript
    then it's fine. grrrrr

    I assume that you have added this field to the field catalog, so make sure that the name in the field catalog is exactly the same as in the internal table which holds your data, and make sure that you are filling the field name as uppercase.
    Regards,
    RIch Heilman

  • Newbie needs help with flv project

    I have several small video clips, roughly 10-16, all
    converted to FLV or in MOV formats, that I am looking to put
    together into a single FLV that allows each of the videos to run in
    a loop, on display at the same time. The effect is to create a grid
    of videos that all play simultaneously, in a loop. They files have
    no sound, so it's just video. Does anyone have a clue how I can do
    this?

    Sheilad83 it will depend on the program.  Some plug-ins and features may still only be available in the 32-bit version of the application.  I would recommend posting in the forum specific to the product you are referencing for additional information.  You can find a list of available forums at https://forums.adobe.com/welcome.

  • Need Help with Contact Book to Mysql in Flash

    Hi... this is a lil over my head. If you go to
    www.rampagesoundstudios.com and click on the contacts tab, there is
    a guestbook. I am not that experienced in flash to get this to work
    with the mysql databases on the webserver.
    What I need to have done is when you click the submit button,
    it sends it to a text file, then I would guess to a php script and
    then when I want to retrieve it, have a html file queue the
    database for retrieval.
    Can anyone assist me or teach me how to do this? I would be
    willing to pay you via paypal if needed.
    Please reply off list to ramtazz(at)comcast.net
    Thanks,
    Bill

    Visit gotoandlearn.com. There are a few video tutorials that
    take you thru the process of loading data into Flash.
    The general scheme for a MySQL database is... Flash calls a
    php file that collects the data and writes (echoes) it into an xml
    format which Flash can read using its xml processing function(s).
    Putting new data into the database follows a similar path,
    where Flash sends the variables to a php file and that file places
    the data into the database.

  • Need help with simple Quicktime 8 Batch Save As Mov script

    I'm new with AppleScript and would like to create a simple script that will take MEPG, AVI, and other video files and wrap them as an MOV file. I thought I used to have a script that would allow me to drop multiple files or folders onto it and it would batch "save as" to the MOV container. Any help is appreciated!
    Thanks,
    Eric

    Hi,
    See these:
    http://stackoverflow.com/questions/11690142/how-to-call-a-vbscript-from-a-batch-file-without-opening-an-additional-command-p
    http://stackoverflow.com/questions/11899730/running-vbscript-from-batch-file
    Don't retire TechNet! -
    (Don't give up yet - 13,225+ strong and growing)

Maybe you are looking for