Bar loading/Progress Bar AS3 CS3

Hello world

I am in a big bind... I'm going Alph Sierra on this one.

I'm a newbie trying to create a loading bar that indicates the percent remaining time or both (preferably) and instructions only I can find on the web on how to create is all AS2 that does not support my AS3 flash site. URGH! is there a way to get around this? does anyone know of a good bar loading AS3 that you can use in Flash CS3? Or how to create a loading bar AS3?

Desperately need help.



Murdock

He comes to the conclusion:

Simply change the FILENAME the filename of your SWF file
create a MovieClip Gauge and Gauge the instance name
_____________________________________________________________

var request: URLRequest = new URLRequest ("FILENAME.swf");
var loader: Loader = new Loader();

loader.contentLoaderInfo.addEventListener (ProgressEvent.PROGRESS, loadProgress);
loader.addEventListener (Event.COMPLETE, onComplete);
function loadProgress(event:ProgressEvent):void {}
var percentLoaded:Number = event.bytesLoaded/event.bytesTotal;
percentLoaded = Math.round(percentLoaded * 100);
trace ("loading:" + percentLoaded + "%");
LoadBar. Width = percentLoaded;
}
function onComplete(event:Event) {}
trace ("Done");
}
Loader.Load (request);
addChild (loader);

Tags: Adobe Animate

Similar Questions

  • Attempts to create a progress bar As3.0

    Yes, I am doing... a... for a swf preloader progress bar... things are a different song in... AS2.0... need help with coding

    I wrote a class ContentLoader in AS3 that is posted on my site...

    http://SD-Dezign.com/blog/?p=7

  • Is it easy to progress to Dreamweaver CS3, now I'm training in MX

    Hello

    As promised, I started night school learning Web Design using Dreamweaver MX. After ten hours, I'm getting on great. One of the frequently asked questions on my course is "how easy would it be to make progress on CS3 after becoming effective with MX? The program is designed to pretty much work the same way?

    You can certainly use HTML and CSS knowledge in current versions of Dreamweaver.

    CSS has changed much more than HTML.

    The CSS in MX has probably been CSS1. Since then, we have climbed CCS2 and CSS3 is now fashionable in modern browsers (e.g., IE9 and IE10, 12 of Firefox and Chrome 18)

    Adobe will come out CS6 all its products week next (probably around 7) so this would be the version to invest in.

  • Loading movies with AS3

    I'm trying to understand how works AS3 than AS2 when using the navigation buttons to load external .swf files.

    In AS2, I have 5 menu buttons. Each button contained a script to load an external .swf file into layer 2 (on top of my existing film). It also contains a line of code to unload a movie that was already in layer 2. This way new movies arrived head and are easy to identify when it came time for them to be discharged.

    Now in AS3, I can't find a similar way to work with external movies, since there is no more layers. I create a movieLoader and add a child so it loads my external .swf - that works very well.

    But how can I say each button to remove all children already exist before loading the new child? The way it works now, the movies just keep stilts above the other whenever I click on a button.

    Here is the code that I put with each key, activated by a mouse event listener. "requested_movie_name" would be different for each button.

    var movieRequest:URLRequest = new URLRequest ("' requested_movie-name.swf" ");

    var movieLoader:Loader = new Loader ();

    movieLoader.load (movieRequest);

    addChild (movieLoader);

    Thanks for any help

    You do not need to identify what film to unload, a charger can contain only a single child display both object.  To unload the loader for the code you showed that you would simply use...

    movieLoader.unload ();

    Because you load swf files, you should look through the help documentation for the Loader class and the unload method because it has a few special remarks that might help your scenario.

  • load swf AS2 AS3 swf problem

    I have a flash with AS3 and inside the swf I load in an AS2 swf file.

    to load a swf works fine, but the problem is when I load it in that I want to go

    a specific part of it, for example, I want to go to frame 3 in the loaded swf file.

    I need to check this in the AS3 swf, does anyone know if this is possible?

    Thanks in advance

    Yes, it is possible.  Use the localconnection class to communicate between the two rulers.

  • SWF CAN load progressive jpg files

    Ive just tried to load a progressive JPG - with a SWF compiled as Player 7, AS2 - leave a local, trusted domain (authorized security) using the MovieClipLoader class and running in flash player 9...

    .. .and it load!

    like, a progressive jpg! that is not supposed to happen, right?


    Progressive JPEG images are possible player verson 8 upwards.

  • load and unload as3 problem

    Hi all

    I'm hard to a project: I have a movie that loads other principal according to theframework. In each framework I put the following code:

    var loader:Loader=new Loader();
    loader
    .contentLoaderInfo.addEventListener(Event.COMPLETE,f);
    loader
    .load(new URLRequest("file#.swf"));
    addChild
    (loader);

    function f(e:Event):void{
    loader
    .scaleX=0.50;
    loader
    .scaleY=0.50;
    }

    The problem , it's that when I charge the next film , an overlay it happens . That's why need of download the swf that cheek and then load the other. I tried un bunch of stuff ()unload /unloadAndStop / removeChild() , but does not. Could someone give a help? Thank you.

    Take the first four lines of your code and simply leave them as what in the first image, loading of any other file you want to load it.

    var loader: Loader = new Loader();
    loader.contentLoaderInfo.addEventListener (Event.COMPLETE, f);
    Loader.Load (new URLRequest("file#.swf"));
    addChild (loader);

    Then just have the line where you load new in the following frames:

    Loader.Load (new URLRequest("file##.swf"));

  • How the loading image in as3 without XML?

    Hey Hi,

    Can someone help me please, I want to load image wihout using XML.

    How can I do this?

    Thank you


    JaxNa

    The only thing you need XML for is to load in a list of images... it isn't as you need. You load images and swf with a Loader object files - and there is a lot of info in the help. In short, if you can simply do:

    var myLoader:Loader = new Loader();

    myLoader.load (new URLRequest ("myimage.jpg"));

    addChild (myLoader);

  • Loading info on AS3 text fields text files

    Hey guys, I'm following some examples of help files for Flash CS3 and ActionScript 3.0 Cookbook on TextFields parts. Here is the code that I currently have on my first frame of the timeline. When I have the test file, I get ' TypeError: Error #2007: text parameter must be non-null. " "to flash. text::TextField / set htmlText() to textFields_fla::MainTimeline/textFields_fla::frame1() '

    What's wrong?

    Ahh well, thank you. It works now after listening for COMPLETE:

  • I have the tab progress bar missing in the tabs, even with safe mode of loading. Why is this?

    Page loading progress bar should normally be displayed on tabs. I don't have it. With all active modules or in Safe Mode.

    I've upgraded to Firefox 4 from a previous version. I got Tab Mix Plus installed before provided FF4 a tab loading progress bar itself.

    After upgrading Firefox, I decided I didn't like the look of the new progress bar and it turns off in Tab Mix Plus. I disabled and deleted from Tab Mix Plus later, opting to use the utilities tab instead. Since I removed the Tab Mix Plus, tab load bars are missing.

    I tried to reinstall Tab Mix Plus, which makes progress bars to reappear... until I removed the TMP it's (without disabling the progress bar in TMP this time).

    Y at - it an option of chrome that I disabled because of Tab Mix Plus?

    Firefox 4 does not include a loading tab progress bar. Mozilla testing one for Firefox 4 development but removed because of performance issues. You will need to use an add-on like Tab Mix Plus or status-4-Evar to get a progress bar.

    https://addons.Mozilla.org/firefox/addon/status-4-EVAR

  • Tablet in the form of progress bar during the return from sleep mode

    When I start my iMac mode 'sleep', it takes forever to load initially. When lights up the screen, this pill in the form of loader/progress bar appears on the display of connection with all inactive until it ends. When it is finished, I am able to connect successfully. I also got the gray screen of death twice now, assuming it's related.

    I wiped the computer and reinstalled the operating system last night and already the problem persists. No matter which other experienceing this issue or know a solution?

    Thank you.

    Mac computers: progress bar appears after waking from sleep - Apple Support

  • How to make the progress bar display in the icon in the taskbar for WIN 7?

    How to make the progress bar display in the icon in the taskbar for WIN 7? I see Eclipse Helios can show the loading progress bar in the icon in the taskbar of WINDOWS 7 at startup.

    Is not the feature that provides JavaFX, you must write a native connection called technology such as JNI to make specific Windows API call for updating the icon in the taskbar for the application.

    Maybe you could go through the Eclipse source code to see how Eclipse and see if you can make use of the same mechanism in your application.

    More tips on how you can implement this are outside my area of expertise.

  • Dynamically drawn centering on stage progress bar

    Hello

    I am trying to add a progress bar tied to the timer for 60 seconds (for a lesson in e-Learning). Found a good sample of progress in AS3 (http://ammarz.org/stuff/TimedProgressBar.zip) bar and I'd like to adapt it to a scene more large (1024 X 768).

    Given that the project will be deployed under the name AIR on Android devices, would Center the bar of progress on the scene. Have you tried many variations of

    xyzprogressbar.x = stage.width/2-progressbar.width/2

    xyzprogressbar.y = stage.height/2-progressbar.height/2

    without success.

    The following based on the codes above example AS3 hard bar of progression to the center of the stage to a stage of 1024 X 768:

    var dimentions:Rectangle = new Rectangle (362 374, 300,20);

    drawProgressBar (_drawingCanvas.graphics, dimensions, 5, 0, 0 x 990000, 0xFF9900, 0x000000);

    But this does not solve the problem of the progress bar for playback resized on screens different centering device.

    If someone can take a look (adapted example FLA: http://eLearningprojects.com/ProgressBar.zip), offer a way to center the bar in AS3 (without the specific coding x hard = 362, y = 374 dimensions above)?

    Thank you very much for your help.

    Kind regards

    The dimensional characteristics of the stadium shown stage.stageWidth, stage.stageHeight.

  • Scrub Bar problems

    My scrub bar is not so percise. When I scrub, the duration is off track. What I am doing wrong? Help, please.


    PS, this is the flow is NOT progressive.

    // ##########################
    // ############# CONSTANTS
    // ##########################
    
    // time to buffer for the video in sec.
    const BUFFER_TIME:Number                = 8;
    // start volume when initializing player
    const DEFAULT_VOLUME:Number                = 0.6;
    // update delay in milliseconds.
    const DISPLAY_TIMER_UPDATE_DELAY:int    = 10;
    // smoothing for video. may slow down old computers
    const SMOOTHING:Boolean                    = true;
    
    // ##########################
    // ############# VARIABLES
    // ##########################
    
    // flag for knowing if flv has been loaded
    var bolLoaded:Boolean                    = false;
    // flag for volume scrubbing
    var bolVolumeScrub:Boolean                = false;
    // flag for progress scrubbing
    var bolProgressScrub:Boolean            = false;
    // holds the last used volume, but never 0
    var intLastVolume:Number                = DEFAULT_VOLUME;
    // net connection object for net stream
    var ncConnection:NetConnection;
    // net stream object
    var nsStream:NetStream;
    // object holds all meta data
    var objInfo:Object;
    
    var dur:Number;
    
    var totalBytes:Number;
    
    //rtmp of server hosting the flv
    var FLVServer:String                    = "rtmp://www.chameleon.com/vids";
    //flv file
    
    // Create a new NetConnection instance
    var conn:NetConnection = new NetConnection();
    
    // Connect with a null value for progressive FLV files
    conn.connect(null);
    
    var paramObj:Object = LoaderInfo(this.root.loaderInfo).parameters;
    
    var strSource:String                    = "6.flv";
    // timer for updating player (progress, volume...)
    var tmrDisplay:Timer;
    
    // ##########################
    // ############# FUNCTIONS
    // ##########################
    
    // sets up the player
    function initVideoPlayer():void {
        // hide buttons
        controlPanel.mcVideoControls.btnUnmute.visible    = false;
        controlPanel.mcVideoControls.btnPause.visible    = false;
        controlPanel.mcVideoControls.normalS.visible    = false;
        
        // set the progress/preload fill width to 1
        controlPanel.mcVideoControls.mcProgressFill.mcFillRed.width = 1;
        controlPanel.mcVideoControls.mcProgressFill.mcFillGrey.width = 1;
        
        // add global event listener when mouse is released
        stage.addEventListener( MouseEvent.MOUSE_UP, mouseReleased);
        stage.addEventListener(FullScreenEvent.FULL_SCREEN, onFullscreen);
        
    // ##########################
    // ###### PB HIDEN TIMER
    // ##########################
    
        stage.addEventListener(MouseEvent.MOUSE_MOVE, cPanel);
        
        function cPanel(event:MouseEvent):void {
            
            controlPanel.gotoAndPlay(1);
            
            controlPanel.mcVideoControls.mcProgressScrubber.btnProgressScrubber.visible = true;
            
            Mouse.show();
        
        }
        
        // add event listeners to all buttons
        controlPanel.mcVideoControls.btnPause.addEventListener(MouseEvent.CLICK, pauseClicked);
        controlPanel.mcVideoControls.btnPlay.addEventListener(MouseEvent.CLICK, playClicked);
        controlPanel.mcVideoControls.btnStop.addEventListener(MouseEvent.CLICK, stopClicked);
        controlPanel.mcVideoControls.btnMute.addEventListener(MouseEvent.CLICK, muteClicked);
        controlPanel.mcVideoControls.btnUnmute.addEventListener(MouseEvent.CLICK, unmuteClicked);
        controlPanel.mcVideoControls.btnProgressBar.addEventListener(MouseEvent.MOUSE_DOWN, progressScrubberClicked);
        controlPanel.mcVideoControls.btnVolumeBar.addEventListener(MouseEvent.MOUSE_DOWN, volumeScrubberClicked);
        controlPanel.mcVideoControls.mcProgressScrubber.btnProgressScrubber.addEventListener(MouseEvent.MOUSE_DOWN, progressScrubberClicked);
        big_play.addEventListener(MouseEvent.CLICK, BIGPLAY);
        controlPanel.mcVideoControls.fullS.addEventListener(MouseEvent.CLICK, FullScreen);
        controlPanel.mcVideoControls.normalS.addEventListener(MouseEvent.CLICK, NormalScreen);
        
        // create timer for updating all visual parts of player and add
        // event listener
        tmrDisplay = new Timer(DISPLAY_TIMER_UPDATE_DELAY);
        tmrDisplay.addEventListener(TimerEvent.TIMER, updateDisplay);
        
        // create a new net connection, add event listener and connect
        // to null because we don't have a media server
        ncConnection = new NetConnection();
        ncConnection.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
        ncConnection.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
        ncConnection.connect(FLVServer);
    
        // set the smoothing value from the constant
        vidDisplay.smoothing = SMOOTHING;
        
        controlPanel.mcVideoControls.mcProgressScrubber.durationBubble.visible        =    false;
    
        // set default volume
        controlPanel.mcVideoControls.mcVolumeScrubber.x = (52 * DEFAULT_VOLUME) + 341;
        controlPanel.mcVideoControls.mcVolumeFill.mcFillRed.width = controlPanel.mcVideoControls.mcVolumeScrubber.x - 394 + 52;
    }
    
    function onFullscreen(e:FullScreenEvent):void {
        // check if we're entering or leaving fullscreen mode
        if (e.fullScreen) {
            // switch fullscreen buttons
            controlPanel.mcVideoControls.fullS.visible = false;
            controlPanel.mcVideoControls.normalS.visible = true;
    
            // bottom center align controls
            controlPanel.x = (Capabilities.screenResolutionX - 440) / 2;
            controlPanel.y = (Capabilities.screenResolutionY - 33);
    
            // size up video display
            vidDisplay.height     = (Capabilities.screenResolutionY - 33);
            vidDisplay.width     = vidDisplay.height * 4 / 3;
            vidDisplay.x        = (Capabilities.screenResolutionX - vidDisplay.width) / 2;
        } else {
            // switch fullscreen buttons
            controlPanel.mcVideoControls.fullS.visible = true;
            controlPanel.mcVideoControls.normalS.visible = false;
    
            // reset controls position
            controlPanel.x = 0;
            controlPanel.y = 330;
    
            // reset video display
            vidDisplay.y = 0;
            vidDisplay.x = 0;
            vidDisplay.width = 440;
            vidDisplay.height = 330;
        }
    }
    
    function FullScreen(e:MouseEvent):void {
        
        stage.displayState    = "fullScreen";
        
        controlPanel.mcVideoControls.normalS.visible    = true;
        
    }
    
    function NormalScreen(e:MouseEvent):void {
        
        stage.displayState    = "normal";
        
        controlPanel.mcVideoControls.fullS.visible    = false;
        
    }
    
    function BIGPLAY(e:MouseEvent):void {
        
        if( bolLoaded) {
    
            nsStream.resume();
        
        }
        
        // show video display
        vidDisplay.visible                    = true;
        
        // switch play/pause visibility
        controlPanel.mcVideoControls.btnPause.visible    = true;
        controlPanel.mcVideoControls.btnPlay.visible        = false;
        big_play.visible    =    false;
        
    }
    
    function playClicked(e:MouseEvent):void {
        // check's, if the flv has already begun
        // to download. if so, resume playback, else
        // load the file
        if( bolLoaded) {
    
            nsStream.resume();
        
        }
        
        // show video display
        vidDisplay.visible                    = true;
        
        // switch play/pause visibility
        controlPanel.mcVideoControls.btnPause.visible    = true;
        controlPanel.mcVideoControls.btnPlay.visible        = false;
        big_play.visible    =    false;
    }
    
    function pauseClicked(e:MouseEvent):void {
        // pause video
        nsStream.pause();
        
        // switch play/pause visibility
        controlPanel.mcVideoControls.btnPause.visible    = false;
        controlPanel.mcVideoControls.btnPlay.visible        = true;
        big_play.visible    =    true;
    }
    
    function stopClicked(e:MouseEvent):void {
        // calls stop function
        stopVideoPlayer();
        big_play.visible    =    true;
    }
    
    function muteClicked(e:MouseEvent):void {
        // set volume to 0
        setVolume(0);
        
        // update scrubber and fill position/width
        controlPanel.mcVideoControls.mcVolumeScrubber.x                = 341;
        controlPanel.mcVideoControls.mcVolumeFill.mcFillRed.width    = 1;
    }
    
    function unmuteClicked(e:MouseEvent):void {
        // set volume to last used value
        setVolume(intLastVolume);
    
        // update scrubber and fill position/width
        controlPanel.mcVideoControls.mcVolumeScrubber.x = (53 * intLastVolume) + 341;
        controlPanel.mcVideoControls.mcVolumeFill.mcFillRed.width = controlPanel.mcVideoControls.mcVolumeScrubber.x - 394 + 53;
    }
    
    function volumeScrubberClicked(e:MouseEvent):void {
        // set volume scrub flag to true
        bolVolumeScrub = true;
        
        // start drag
        controlPanel.mcVideoControls.mcVolumeScrubber.startDrag(true, new Rectangle(341, 19, 53, 0));
    }
    
    function progressScrubberClicked(e:MouseEvent):void {
        // set progress scrub flag to true
        bolProgressScrub = true;
        
        controlPanel.mcVideoControls.mcProgressScrubber.durationBubble.visible        =    true;
        
        // start drag
        controlPanel.mcVideoControls.mcProgressScrubber.startDrag(true, new Rectangle(0, -6, 630, 0));
    }
    
    function mouseReleased(e:MouseEvent):void {
        // set progress/volume scrub to false
        bolVolumeScrub        = false;
        bolProgressScrub    = false;
        
        controlPanel.mcVideoControls.mcProgressScrubber.durationBubble.visible        =    false;
        
        // stop all dragging actions
        controlPanel.mcVideoControls.mcProgressScrubber.stopDrag();
        controlPanel.mcVideoControls.mcVolumeScrubber.stopDrag();
        
        // update progress/volume fill
        
        controlPanel.mcVideoControls.mcProgressFill.mcFillRed.width    = controlPanel.mcVideoControls.mcProgressScrubber.x + 5;
        
        controlPanel.mcVideoControls.mcVolumeFill.mcFillRed.width    = controlPanel.mcVideoControls.mcVolumeScrubber.x - 394 + 53;
        
        // save the volume if it's greater than zero
        if((controlPanel.mcVideoControls.mcVolumeScrubber.x - 341) / 53 > 0)
            intLastVolume = (controlPanel.mcVideoControls.mcVolumeScrubber.x - 341) / 53;
    }
    
    var duration:Number;
    
    function updateDisplay(ev:TimerEvent):void {
        // checks, if user is scrubbing. if so, seek in the video
        // if not, just update the position of the scrubber according
        // to the current time
        if(bolProgressScrub)
        
            nsStream.seek( Math.round( controlPanel.mcVideoControls.mcProgressScrubber.x * objInfo.duration / 630 ) )
        
        else
        controlPanel.mcVideoControls.mcProgressScrubber.x = nsStream.time * 630 / objInfo.duration;
        
        // set time and duration label
        controlPanel.mcVideoControls.lblTimeDuration.htmlText        = "<font color='#FFFFFF'>" + formatTime(nsStream.time) + "</font> / " + formatTime(objInfo.duration);
        
        controlPanel.mcVideoControls.mcProgressScrubber.durationBubble.lblTimeDuration.htmlText        = "<font color='#FFFFFF'>" + formatTime(nsStream.time) + "</font>";
        
        // update the width from the progress bar. the grey one displays
        // the loading progress
        controlPanel.mcVideoControls.mcProgressFill.mcFillRed.width        =     controlPanel.mcVideoControls.mcProgressScrubber.x + 5;
        controlPanel.mcVideoControls.mcProgressFill.mcFillGrey.width    =    nsStream.bytesLoaded * 630 / nsStream.bytesTotal;
        
        // update volume and the red fill width when user is scrubbing
        if(bolVolumeScrub) {
            setVolume((controlPanel.mcVideoControls.mcVolumeScrubber.x - 341) / 53);
            controlPanel.mcVideoControls.mcVolumeFill.mcFillRed.width = controlPanel.mcVideoControls.mcVolumeScrubber.x - 394 + 53;
        }
        
    }
    
    function onMetaData(info:Object):void {
        
    objInfo = info;
    
    // now we can start the timer because
    // we have all the necessary data
    if(!tmrDisplay.running)
    tmrDisplay.start();
    
    }
    
    function netStatusHandler(event:NetStatusEvent):void {
        // handles net status events
        
        trace( event.info.code );
        
        switch (event.info.code) {
    
            case "NetConnection.Connect.Success":
               
               connectStream();
                
                break;
                
            // trace a messeage when the stream is not found
            case "NetStream.Play.StreamNotFound":
                trace("Stream not found: " + strSource);
                break;
            
            // when the video reaches its end, we stop the player
            case "NetStream.Play.Stop":
                stopVideoPlayer();
                trace('stoped');
            break;
        }
    }
    
    function securityErrorHandler(event:SecurityErrorEvent):void {
        
        trace("securityErrorHandler: " + event);
    
    }
    
    function connectStream():void {
        
        nsStream = new NetStream(ncConnection);
        
        nsStream.bufferTime = BUFFER_TIME;
        
        // nsStream.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
        
        nsStream.client =  this;
        
        bolLoaded = true;
        
        vidDisplay.attachNetStream(nsStream);        
        
        nsStream.seek(5);
        
        nsStream.play(strSource);
        
        nsStream.pause();
        
        // attach net stream to video object on the stage
        vidDisplay.attachNetStream(nsStream);
        
        vidDisplay.visible = true;
        
    }
    
    function stopVideoPlayer():void {
        // pause netstream, set time position to zero
        nsStream.pause();
        nsStream.seek(0);
        
        // in order to clear the display, we need to
        // set the visibility to false since the clear
        // function has a bug
        vidDisplay.visible                    = false;
        
        // switch play/pause button visibility
        controlPanel.mcVideoControls.btnPause.visible    = false;
        controlPanel.mcVideoControls.btnPlay.visible        = true;
    }
    
    function setVolume(intVolume:Number = 0):void {
        // create soundtransform object with the volume from
        // the parameter
        var sndTransform        = new SoundTransform(intVolume);
        // assign object to netstream sound transform object
        nsStream.soundTransform    = sndTransform;
        
        // hides/shows mute and unmute button according to the
        // volume
        if(intVolume > 0) {
            controlPanel.mcVideoControls.btnMute.visible        = true;
            controlPanel.mcVideoControls.btnUnmute.visible    = false;
        } else {
            controlPanel.mcVideoControls.btnMute.visible        = false;
            controlPanel.mcVideoControls.btnUnmute.visible    = true;
        }
    }
    
    function formatTime(t:int):String {
        
        var remainder:Number;
                
        var hours:Number = t / ( 60 * 60 );
        
        remainder = hours - (Math.floor ( hours ));
        
        hours = Math.floor ( hours );
        
        var minutes = remainder * 60;
        
        remainder = minutes - (Math.floor ( minutes ));
        
        minutes = Math.floor ( minutes );
        
        var seconds = remainder * 60;
        
        remainder = seconds - (Math.floor ( seconds ));
        
        seconds = Math.floor ( seconds );
        
        var hString:String = hours < 10 ? "0" + hours : "" + hours;    
        var mString:String = minutes < 10 ? "0" + minutes : "" + minutes;
        var sString:String = seconds < 10 ? "0" + seconds : "" + seconds;
                    
        if ( t < 0 || isNaN(t)) return "00:00";            
                    
        if ( hours > 0 )
        {            
            return hString + ":" + mString + ":" + sString;
        }else
        {
            return mString + ":" + sString;
        }
                
    }
    
    
    // ##########################
    // ############# INIT PLAYER
    // ##########################
    initVideoPlayer();
    

    Here you have this too

    private void thumbMove(e:MouseEvent):void {}
    main00.progBar.scrubber.x = mouseX - decalage_y;
    If (main00.progBar.scrubber.x<= ymin)="">
    main00.progBar.scrubber.x = yMin;
    }
    If (main00.progBar.scrubber.x > = yMax) {}
    main00.progBar.scrubber.x = yMax;
    }
    dispatchEvent (new ScrollBarEvent(main00.progBar.scrubber.x / yMax));
    e.updateAfterEvent ();
    }

  • Help with loading a swf from the Google Map API done in AS3 AS2 Flash site

    OK, maybe this can be done, I need to do everything in AS3, or it is a problem of the Google Map API.

    If someone could put me on the right track, I would be grateful.

    I created a Google Map API for Flash Add to my Web site.

    My site has been built using AS2 and the Google Map API was built using AS3

    My site Flash .swf works fine and the Google Map.swf, I created works very well.

    The problem is when I try and do not add the Google Map.swf on my website flash As2 will Google.swf no work.

    I'm trying just to eliminate the error.

    Is it because that...

    1. after having my site flash with AS2, I can't add a .swf with AS3

    2. I need to change the code...

    3. it has nothing to do with AS3, it's because this is a Google Map API.


    I have a button written in AS2 on my main flash site that has a a PreLoader.


    on (release) {}

    Stop behavior MovieClip
    this.gotoAndStop ("Google_Map");
    End behavior


    load film behavior
    If (this.mcContentHolder is {Number (this.mcContentHolder))}
    loadMovieNum ("PreLoaderGoogle.swf", this.mcContentHolder);
    } else {}
    this.mcContentHolder.loadMovie ("PreLoaderGoogle.swf");
    }
    End behavior
    }

    The PreLoaderGoogle.swf was then has a

    Instance of: charger

    contentPath

    Google_Map.swf

    If I change the Google_Map.swf instance in the PreLoader for an another .swf using AS2 it all works.


    or do I just have the wrong end of the stick.

    All advice appreciated.

    If you load an as3 swf into an as2 swf, none of the code in the as3 swf file will work.

    the simplest way around this is: you could create a loader swf (GER) as3 that loads your as2 swf and load your google as3 swf.

Maybe you are looking for

  • How can I disable the notification that appears again e-mail?

    When Thunderbird gets new email, a window opens advising me of new email with the new e-mail list. How to disable that? Thank you.

  • Droid razr maxx: how to uninstall flash?

    How can I uninstall adobe flash of my razr maxx? I don't want that would it be because he eats memory, use of data increases,slows down web pages, security holes. Many web sites work better without flash. Thanks in advance!

  • Do not load the profile

    Okay, so I have users on Windows XP SP3 and his profile fails to load. It keeps loading a temporary profile for him. I ran the hive UPH Clean up, but it did not help. So I thought I would just rebuild its profile. I had to connect via safe mode to re

  • S10e - loud beep on AC connect and disconnect!

    Hi everyone - first post here! My Lenovo S10e supplied with Suse Linux Enterprise Desktop, and it works now openSUSE 11.1. I love it! But I'm always in the first weeks congested and still working on the kinks. And here's one: Every time I have connec

  • Compatible antivirus for windows 7

    I was wondering if it is a certain anti-virus software which is more compatible with windows 7? I was told that Kaspersky was not so consistent.Thank you