Flv xml Stream Playlist action script help

So if you go to this site:
click here
you will see a FLV player that has a list of videos that are
pulled from a .xml file...
The action script for this player is as such:
var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);
theVideo.attachVideo(ns);
rewindButton.onRelease = function() {
ns.seek(0);
playButton.onRelease = function() {
ns.pause();
var videoInterval = setInterval(videoStatus,100);
var amountLoaded:Number;
var duration:Number;
ns["onMetaData"] = function(obj) {
duration = obj.duration;
function videoStatus() {
amountLoaded = ns.bytesLoaded / ns.bytesTotal;
loader.loadBar._width = amountLoaded * 194.5;
loader.scrub._x = ns.time / duration * 194.5;
var vlist:XML = new XML();
vlist.ignoreWhite = true;
vlist.onLoad = function() {
var videos:Array = this.firstChild.childNodes;
for(i=0;i<videos.length;i++) {
videoList.addItem(videos
.attributes.desc,videos.attributes.url);
ns.play(videoList.getItemAt(0).data);
videoList.selectedIndex = 0;
var vidList:Object = new Object();
vidList.change = function() {
ns.play(videoList.getItemAt(videoList.selectedIndex).data);
videoList.addEventListener("change",vidList);
vlist.load("videos.xml");
I want to action script something that will make the videos
play one after the other, get rid of the list on the right and have
buttons on player that allow you to go to the next/previous video
listed in the .xml file
Its sort of like the player at
click
here
I know this is a lot to ask, but I am currently in a jam and
any help would be greatly appreciated...
Thanks
Matthelm88

gotoAndLearn is a fantastic base to build off of.
but
i'm looking for the same thing... how do you get the files
to play one after another?
i've looked for everyhting ns. related and i can find any
doc's on this one.
i 've found the
function complete_listener(eventObject:VideoEvent):void {
if (my_FLVPlybk.source == "rentv1.flv") {
my_FLVPlybk.play("rentv2.flv");
else if (my_FLVPlybk.source == "rentv2.flv") {
my_FLVPlybk.play("rentv3.flv");
on the flash video live docs.. but i can't find anything on
how to tie it into the XML.
anything anyone can offer would be a huge help ...

Similar Messages

  • Help... link URL from XML to Flash Action Script 2

    I am trying to link a different URL to each of my files in XML and use this XML in Flash were I created a carousel. In the carousel, when you click on a picture I would like to insert a specific URL. Each picture will have a different URL (http://------------).
    Here are my codes:
    XML:
    <icons>
    <icon image="icon1.png" tooltip="Planning" />
    <icon image="icon2.png" tooltip="Investments" />
    <icon image="icon3.png" tooltip="Education" />
    <icon image="icon4.png" tooltip="Insurances" />
    <icon image="icon5.png" tooltip="Mortgages" />
    <icon image="icon6.png" tooltip="Retirement" />
    <icon image="icon7.png" tooltip="Business Owner" />
    <icon image="icon8.png" tooltip="Banking" />
    </icons>
    Flash Action Script 2:
    import mx.utils.Delegate;
    var numOfItems:Number;
    var radiusX:Number = 250;
    var radiusY:Number = 75;
    var centerX:Number = Stage.width/2;
    var centerY:Number = Stage.height/2;
    var speed:Number = 0.01;
    var perspective:Number = 60;
    var home:MovieClip = this;
    var tooltip:MovieClip = this.attachMovie("tooltip","tooltip",10000);
    tooltip._alpha = 0;
    var xml:XML = new XML();
    xml.ignoreWhite = true;
    xml.onLoad = function()
    var nodes = this.firstChild.childNodes;
    numOfItems = nodes.length;
    for(var i=0;i<numOfItems;i++)
      var t = home.attachMovie("item","item"+i,i+1);
      t.angle = i * ((Math.PI*2)/numOfItems);
      t.onEnterFrame = mover;
      t.toolText = nodes[i].attributes.tooltip;
      t.icon.inner.loadMovie(nodes[i].attributes.image);
      t.ref.inner.loadMovie(nodes[i].attributes.image);
      t.icon.onRollOver = over;
      t.icon.onRollOut = out;
      t.icon.onRelease = released;
    function over()
    home.tooltip.tipText.text = this._parent.toolText;
    home.tooltip._x = this._parent._x;
    home.tooltip._y = this._parent._y - this._parent._height/2;
    home.tooltip.onEnterFrame = Delegate.create(this,moveTip);
    home.tooltip._alpha = 100;
    function out()
    delete home.tooltip.onEnterFrame;
    home.tooltip._alpha = 0;
    function released()
    function moveTip()
    home.tooltip._x = this._parent._x;
    home.tooltip._y = this._parent._y - this._parent._height/2;
    xml.load("icons.xml");
    function mover ()
    this._x = Math.cos(this.angle) * radiusX + centerX;
    this._y = Math.sin(this.angle) * radiusY + centerY;
    var s = (this._y - perspective) / (centerY+radiusY-perspective);
    this._xscale = this._yscale = s * 100
    this.angle += this._parent.speed;
    this.swapDepths(Math.round(this._xscale) + 100);
    this.onMouseMove = function()
    speed = (this._xmouse-centerX)/10000;
    Thanks so much for the help.

    You should be able to add that data into your xml tags and then extract it in the AS2 onLoad function...
    XML:
    <icons>
    <icon image="icon1.png" tooltip="Planning" linkURL="http://www.someURL.com/somePage.html" />
    AS2:
    xml.onLoad = function()
    etc....
    t.onEnterFrame = mover;
    t.toolText = nodes[i].attributes.tooltip;
    t.urlLink = nodes[i].attributes.linkURL;
    etc...

  • XML Action Script Help

    Im taking over a job and I was given the original flash file
    that doesnt seem to be working properly.
    It a thumbnail menu that loads through xml...the images work
    fine but the Links & Titles do not load.
    Nor does the rollover effect. Here what I have.
    Action Script:
    Stage.align = "TL";
    Stage.scaleMode = "noscale";
    preloader._visible = true;
    thumbs_line._visible = false;
    import mx.transitions.Tween;
    import mx.transitions.easing.*;
    my_xml = new XML();
    my_xml.ignoreWhite = true;
    if (_parent.xml_file == undefined) {
    my_xml.load((String(_url.slice(0, (_url.length-3))))+"xml");
    } else {
    my_xml.load(_parent.xml_file);
    my_xml.onLoad = function(ok) {
    if (ok) {
    process_xml();
    } else {
    trace("XML not loaded");
    function process_xml() {
    total_images = my_xml.childNodes[1].childNodes.length-1;
    gallery_width =
    Number(my_xml.childNodes[0].childNodes[0].attributes.gallery_width);
    gallery_height =
    Number(my_xml.childNodes[0].childNodes[0].attributes.gallery_height);
    max_thumb_height =
    Number(my_xml.childNodes[0].childNodes[0].attributes.max_thumb_height);
    thumbs_space =
    Number(my_xml.childNodes[0].childNodes[1].attributes.thumbs_space);
    thumb_border =
    Number(my_xml.childNodes[0].childNodes[1].attributes.thumb_border);
    image_border =
    Number(my_xml.childNodes[0].childNodes[1].attributes.image_border);
    fade_in_seconds =
    Number(my_xml.childNodes[0].childNodes[2].attributes.fade_in_seconds);
    fade_out_seconds =
    Number(my_xml.childNodes[0].childNodes[2].attributes.fade_out_seconds);
    thumb_fade_seconds =
    Number(my_xml.childNodes[0].childNodes[2].attributes.thumb_fade_seconds);
    fade_in_seconds += 0.01;
    fade_out_seconds += 0.01;
    thumb_fade_seconds += 0.01;
    thumbs_line._y =
    gallery_height-max_thumb_height-(4*thumbs_space);
    thumbs_line.thumbs_bg._width = gallery_width;
    thumbs_line.thumbs_mask._width = gallery_width;
    thumbs_line.thumbs_bg._height =
    max_thumb_height+thumbs_space*2+thumb_border*2;
    thumbs_line.thumbs_mask._height =
    max_thumb_height+thumbs_space*2+thumb_border*2;
    thumbs_line._visible = true;
    load_thumb(0);
    preloader._x = int((gallery_width-preloader._width)/2);
    preloader._y = int(thumbs_line._y/2-preloader._height/2);
    max_image_height =
    gallery_height-max_thumb_height-thumbs_space*6;
    load_image(0);
    this["link"+t] =
    my_xml.childNodes[1].childNodes[t].attributes.link;
    function load_thumb(t) {
    thumbs_line.thumbs.createEmptyMovieClip('thumb'+t,
    thumbs_line.thumbs.getNextHighestDepth());
    thumbs_line.thumbs['thumb'+t]._y =
    thumbs_space+thumb_border;
    thumbs_line.thumbs['thumb'+t]._x =
    thumbs_space+thumb_border;
    if (t>0) {
    thumbs_line.thumbs['thumb'+t]._x =
    thumbs_line.thumbs['thumb'+(t-1)]._x+thumbs_line.thumbs['thumb'+(t-1)]._width+thumbs_spac e;
    thumbs_line.thumbs['thumb'+t].image_number = t;
    thumbs_line.thumbs['thumb'+t].onRollOver =
    thumbs_line.thumbs['thumb'+t].attachMovie("thumbov_mc",
    "thumbov_mc", 10);
    thumbs_line.thumbs['thumb'+t].onRelease = function() {
    tellTarget (thumbs_line.thumbs['thumb'+t]) {
    var loadListener:Object = new Object();
    loadListener.onLoadInit = function(target_mc:MovieClip) {
    preloader.visible = false;
    thumbs_line.thumbs['thumb'+t].attachMovie("border_grey",
    "border_grey", 10);
    thumbs_line.thumbs['thumb'+t].border_grey._x -=
    thumb_border;
    thumbs_line.thumbs['thumb'+t].border_grey._y -=
    thumb_border;
    thumbs_line.thumbs['thumb'+t].attachMovie("border_white",
    "border_white", 20);
    thumbs_line.thumbs['thumb'+t].border_white._x -=
    thumb_border-1;
    thumbs_line.thumbs['thumb'+t].border_white._y -=
    thumb_border-1;
    if (target_mc._height>max_thumb_height) {
    ratio = target_mc._width/target_mc._height;
    target_mc._height = max_thumb_height;
    target_mc._width = int(target_mc._height*ratio);
    thumbs_line.thumbs['thumb'+t].border_grey._width =
    target_mc._width+thumb_border*2;
    thumbs_line.thumbs['thumb'+t].border_grey._height =
    target_mc._height+thumb_border*2;
    thumbs_line.thumbs['thumb'+t].border_white._width =
    target_mc._width+thumb_border*2-2;
    thumbs_line.thumbs['thumb'+t].border_white._height =
    target_mc._height+thumb_border*2-2;
    if (t<total_images) {
    t++;
    load_thumb(t);
    thumbs_width = thumbs_line.thumbs._width;
    thumbs_right_limit = 0;
    thumbs_left_limit =
    0-thumbs_width+int(gallery_width-thumbs_space-thumbs_space);
    var thumb_fade_in:Tween = new Tween(target_mc, "_alpha",
    none.easeIn, 0, 100, thumb_fade_seconds, true);
    var thumb_loader:MovieClipLoader = new MovieClipLoader();
    thumb_loader.addListener(loadListener);
    createEmptyMovieClip("img", 30);
    thumb_loader.loadClip(this.my_xml.childNodes[1].childNodes[t].attributes.small,
    img);
    thumbs_line.onMouseMove = function() {
    if (_xmouse>=thumbs_line.thumbs_bg._x and
    _xmouse<=thumbs_line.thumbs_bg._width and
    _ymouse>=thumbs_line._y and
    _ymouse<=thumbs_line._y+thumbs_line._height) {
    onRollOver =
    thumbs_line.thumbs['thumb'+t].attachMovie("thumbov_mc",
    "thumbov_mc", 10);
    onEnterFrame = function () {
    if (_xmouse<(gallery_width/2)-10 and
    thumbs_line.thumbs._x<thumbs_right_limit) {
    thumbs_line.thumbs._x -=
    int((_xmouse-thumbs_line.thumbs_bg._width/2)/(100-scroll_speed));
    if (thumbs_line.thumbs._x>thumbs_right_limit) {
    thumbs_line.thumbs._x = thumbs_right_limit;
    if (_xmouse>gallery_width/2+10 and
    thumbs_line.thumbs._x>thumbs_left_limit) {
    thumbs_line.thumbs._x -=
    int((_xmouse-thumbs_line.thumbs_bg._width/2)/(100-scroll_speed));
    if (thumbs_line.thumbs._x<thumbs_left_limit) {
    thumbs_line.thumbs._x = thumbs_left_limit;
    } else {
    onEnterFrame = undefined;
    this["link"+t] =
    my_xml.childNodes[1].childNodes[t].attributes.link;
    this["the_target"+t] =
    my_xml.childNodes[1].childNodes[t].attributes.target;
    XML File
    <?xml version="1.0" encoding= "UTF-8" ?>
    <options>
    <option gallery_width="730" gallery_height="450"
    max_thumb_height="96"/>
    <option scroll_speed="75" thumbs_space="0"
    thumb_border="1" image_border="2"/>
    <option fade_in_seconds="1.5"
    thumb_fade_seconds="1.5"/>
    </options>
    <gallery>
    <img small="../flash/hosts/images/pic7.jpg" title="Name
    1" link="hosts.asp"/>
    <img small="../flash/hosts/images/pic1.jpg" title="Name
    2" link="bio1.asp"/>
    <img small="../flash/hosts/images/pic2.jpg" title="Name
    3" link="bio2.asp"/>
    <img small="../flash/hosts/images/pic3.jpg" title="Name
    4" link="bio3.asp"/>
    <img small="../flash/hosts/images/pic5.jpg" title="Name
    5" link="bio4.asp"/>
    <img small="../flash/hosts/images/pic6.jpg" title="Name
    6" link="bio5.asp"/>
    <img small="../flash/hosts/images/pic8.jpg" title="Name
    7" link="bio6.asp"/>
    <img small="../flash/hosts/images/pic9.jpg" title="Name
    8" link="bio7.asp"/>
    </gallery>
    Thier is a dynamic Text field in the roll over effect that
    should contain the "title"
    the rollover MC name is: thumbov_mc
    the dynamic text field is labeled: title
    And the links are not working either?
    Does anyone see the problem?
    Thank You So Much for you help in Advance

    If you think you can help just let me now and ill email you
    the link to where this menu is...i dont want to post it for
    everyone to see..thanks

  • Action Script Help (Flash 8 ONLY)

    My department currently has a host of training videos we use
    for online courses. Of course, these are all being delivered as
    FLVs. Through the Developer's communities, I found a script that
    allowed me to add a caption file to the video (XML).
    Now I'd like to take it to another level. I'd like to be able
    to have my one SWF player play a series of FLVs AND include the
    caption file. I began to look at using an Array, but have not been
    successful in making it work. I'm not too sure, but I think the way
    I coded it started to affect the video - started getting "stuck" at
    times. Another attempt caused the caption file from the previous to
    be seen in the current video.
    I have attached my script and would appreciate any
    assistance.
    Finally, I need to stick to a Flash 8 and Action Script 2.0
    solution. I realize that Flash 9 and Action Script 3.0 would be
    helpful, but our district PCs are all imaged with a Flash 8 player.
    Sorry.
    Thank you for your help.
    Frank Erazo ([email protected])

    Whatever approach you take will depend heavily on the document(s) you have for the bible element of the design.  You somehow need to be able to seek within it and determine where matched elements can be found and how to extract the information you intend to present.
    I don't think your issue currently lies with how to do this in Flash as much as first coming up with a gameplan that identifies the players and how you can interact with and within them.

  • XML Driven Photo Gallery (Action Script Help)

    Hi,
    I need to make a XML Driven Photo slide in Flash CS5.
    It needs to have a Box that contains 5 Thumbnails(by XML) act as buttons.
    The  Box sits on top of the Main photo area and shrinks (or close out) when  user click its close button. And it opens out by clicking on a open  button.
    I'm sure it can be done by using timeline, Tweening or you name it..But what about the Thumbnails that run from the XML file?
    Can they disappear with the Box and retrieve when it opens? is it possible?
    If yes, what would be the best way to do that?
    Any comment would be greatly appreciated!
    Here is the ActionScript.
    import flash.net.URLRequest;
    import flash.net.URLLoader;
    import flash.events.Event;
    import fl.controls.Button;
    import flash.display.Shape;
    import flash.events.MouseEvent;
    import flash.display.MovieClip;
    import flash.display.Loader;
    import flash.text.TextField;
    import fl.transitions.*;
    import fl.transitions.easing.*;
    import flash.display.Shader;
    var hasloaded:Boolean = false;
    var firstLoaded:Boolean = false;
    var barWidth:int;
    var barHeight:int;
    var images;
    var imageCount:int;
    var thumbnailArray:Array = new Array();
    var bigImageArray:Array = new Array();
    var descriptionArray:Array = new Array();
    var xmlLoader:URLLoader = new URLLoader();
    var imageXML:XML = new XML();
    xmlLoader.addEventListener(Event.COMPLETE, LoadXML);
    xmlLoader.load(new URLRequest("slideshow.xml"));
    function LoadXML(e:Event):void {
         imageXML = new XML(e.target.data);
         ParseImages(imageXML);
      Populates the arrays with the image values
      and the text for each picture.
    function ParseImages(imageInput:XML):void {
         var iconList:XMLList = imageInput.image.icon;
         var mainImageList:XMLList = imageInput.image.mainimage;
         var descriptionList:XMLList = imageInput.image.description;
         for (var i:int = 0; i < iconList.length(); i++) {
             var imageElement:XML = iconList[i];
             //trace(imageElement);
             thumbnailArray[i] = imageElement;
         for (var j:int = 0; j < mainImageList.length(); j++) {
             var mainimageElement:XML = mainImageList[j];
             //trace(mainimageElement);
             bigImageArray[j] = mainimageElement;
         for (var l:int = 0; l < descriptionList.length(); l++) {
             var descriptionElement:XML = descriptionList[l];
             //trace(descriptionElement);
             descriptionArray[l] = descriptionElement;
         loadImages();
    function loadImages():void{
         trace("inside of loadimages function.");
         trace(thumbnailArray.length);
         for(var i:int=0; i < thumbnailArray.length; i++){
             trace(thumbnailArray[i]);
             populateContainers(thumbnailArray[i], i);
             //populateContainers2();
             trace("Loaded " + thumbnailArray[i]);
    var loader:Loader;
    var xStart = -210;
    var ypos = -34;
    var currentPos = xStart;
    var incrementValue = 66;
      This takes in the name of the image file and
      displays it within the newly created movie clip
    function populateContainers(file:String, pos:int):void{   
         //create a movie clip to hold the image
         var mc:MovieClip = new MovieClip();
         mc.graphics.beginFill(0xFFFFFF);
         mc.graphics.drawRect(0, 0, 50, 51);
         mc.graphics.endFill();
         mc.buttonMode = true;
         mc.x = currentPos;
         mc.y = ypos;
         mc.name = "thumb_" + pos;
         mc.addEventListener(MouseEvent.CLICK, clickHandler); 
         loader = new Loader();
         //loader.mask = imagemask;
        var url:URLRequest = new URLRequest(file);
         loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadInitialImage);
         loader.load(url);
         //add the image to the movie clip
         mc.addChild(loader);
         this.imageBar.addChild(mc);
         //increment the currentPos
         currentPos += incrementValue;
    function clickHandler(e:MouseEvent):void{
         var str:String = e.currentTarget.name;
         var index:int = int(str.substr(6,1));
         if(hasloaded) {
             this.mainWindow.removeChild(loader);
         loader = new Loader();
         loader.load(new URLRequest(bigImageArray[index]));
         this.mainWindow.addChild(loader);
         TransitionManager.start(this.mainWindow,{type:Fade, direction:Transition.IN, duration:2, easing:Regular.easeOut});
         //setChildIndex(loader, 0);
         hasloaded = true;
         loadText(index);
    function loadText(index:int):void {
         Object(this).imageBar.txtdescription.text = descriptionArray[index];
    function loadInitialImage(event:Event):void {
         if(!firstLoaded) {
             loader = new Loader();
             loader.load(new URLRequest(bigImageArray[0]));
             this.mainWindow.addChild(loader);
             TransitionManager.start(this.mainWindow,{type:Fade, direction:Transition.IN, duration:2, easing:Regular.easeIn});
             //setChildIndex(loader, 0);
             hasloaded = true;
             loadText(0);
         firstLoaded = true;
    /*  This section defines the buttons that control the image bar */
    Object(this).imageBar.btnBarOpen.addEventListener(MouseEvent.MOUSE_UP, openImageBar);
    function openImageBar(event:MouseEvent):void {
         this.gotoAndPlay(1);

    Well Thats what i know but you might be able to use flash player 10 in your browser i think the file system works on it fine im not sure i mostly work on air glad i could help
    James

  • Playlist action script woe

    i'm having a problem with the following code:
    var xml:XML = new XML ();
    xml.ignoreWhite = true;
    xml.onLoad = function () {
    var nodes = this.firstChild.childNodes;
    for(i=0;i<nodes.length;i++) {
    list.addItem(nodes
    .attributes.desc,nodes.attributes.flv);
    vid.play(list.getItemAt(0).data);
    list.selectiveIndex = 0;
    xml.load("videos.xml");
    var lList:Object = new Object();
    lList.change = function() {
    vid.play(list.getItemAt(list.selectedIndex).data);
    list.addEventListener("change",lList);
    for some reason when I click on the next video in the
    playlist shrinks the FLV player window, this happens each time I
    click on another video.
    Any help would be greatly appreciated.
    Thanks,
    Nate

    gotoAndLearn is a fantastic base to build off of.
    but
    i'm looking for the same thing... how do you get the files
    to play one after another?
    i've looked for everyhting ns. related and i can find any
    doc's on this one.
    i 've found the
    function complete_listener(eventObject:VideoEvent):void {
    if (my_FLVPlybk.source == "rentv1.flv") {
    my_FLVPlybk.play("rentv2.flv");
    else if (my_FLVPlybk.source == "rentv2.flv") {
    my_FLVPlybk.play("rentv3.flv");
    on the flash video live docs.. but i can't find anything on
    how to tie it into the XML.
    anything anyone can offer would be a huge help ...

  • Document Class / Action Script Help

    Dear all,
    From a tutorial page, i manage to built this flash page with
    xml capabilities. but when i add more scene to the flash page, i
    have errors like this.
    TypeError: Error #1009: Cannot access a property or method of
    a null object reference.
    at MyContent/init()
    at MyContent()
    TypeError: Error #1009: Cannot access a property or method of
    a null object reference.
    at MyContent/onComplete()
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at flash.net::URLLoader/onComplete()
    How do i edit the "MyContent.as" file so that i can add more
    scene to the flash.
    I understand that, once i put the "MyContent.as" in the
    document class, it will load immediately, is there any way to tell
    it to load only in scene 2 (which is where the xml is needed).
    Thanks. Any help will be very grateful.
    Attach is the actionscript

    other then defining the document class, can i "call up" the
    MyContent.as (external script) when needed?
    If this can be done, what must i do to add into the .fla file
    and the .as file..
    Sorry, i'm very new to AS3.
    Thanks!!!

  • XML and/or Action Script

    i'm creating a photogallery which has 10 photos viewed
    through XML. I've got next and previous buttons aswell. How can I
    do to detect if its on the 10th photo the next button disappears
    and if its viewing the first button the previous button disappears?
    help pls help! 10x

    I assume you are building an array containing the photos that
    are on the XML file, withit you also know the length of the array,
    or even the length of the items on your XML, so you just need to
    create a simple if/else statement.. be aware that you also need to
    check how many times a user has clicked each button.. sounds
    complex but it isn't.. I think I can get you a piece of code soon..

  • Action Script Help

    Hi to all,
    This is vertical xml gallery code, where the mouse will move
    up, then the scoller will move up and vice versa. now i want the
    reverse . if it move up , then the scoller come down and if it move
    down , then the scoller move up.
    Can anyone please help me.
    Thanks
    Krishna
    quote:
    this.onEnterFrame = function()
    mask_y = _root.main.verti.mask._y;
    mask_h = _root.main.verti.mask._height;
    mask_middle = (mask_y + mask_h) / 2; // take middle of mask
    as reference
    roller_y = _root.main.verti.roller._y;
    roller_h = _root.main.verti.roller._height;
    ymouse = _root.main.verti.mask._ymouse;
    // if mous out of range
    if (ymouse < mask_y || ymouse> mask_y + mask_h)
    speed = 0;
    else
    speed = (ymouse - mask_middle)/ 10;
    // calculate speed -> the closer to middle-> slower,
    closer to edges-> faster
    // if roller bottom reaches mask bottom and scroll up, stop
    if ((roller_y+roller_h)<(mask_y+mask_h) && speed
    < 0)
    speed = 0;
    // if roller top reaches mask top and scroll down, stop
    if (roller_y > mask_y && speed > 0)
    speed = 0;
    _root.main.verti.roller._y += speed;
    stop();

    try:

  • Loadmovie action script help

    Hey there, just putting together a website using flash.
    Everythings ok except, my website is one flash file, i've
    done a new document which is a page for my movie to
    play in. So i have jesl homepage.swf and now charles.swf
    On my homepage scene 3 theres a button you press
    using loadmovie script and it goes straight to the
    charles.swf
    and from charles.swf theres a go back button that goes
    straight back
    to my jesl homepage.swf
    using this from charles back to homepage
    on (release) {
    loadMovieNum("jesl homepage.swf", 0);
    Now all i would like to do is from charles.swf
    go back to my jesl homepage.swf like it does,
    but go to scene 3. Maybe its simple and im stupid
    but i cant figure it out. Cause scene 3 is where the
    info and buttons are about my movie and it would
    make sense to go back where you started from...
    So yeah it goes back fine to my scene 1 homepage
    but i want scene 3 guys...
    Any help would be greatful
    As im pulling my hair out..

    Hi there jestone and welcome to the on-line community
    I know this forum category says "FlashHelp", but note that
    both words "Flash" and "Help" are run together. This is a forum
    where people using FlashHelp output from the Adobe RoboHelp product
    ask questions. Most of the folks here are developers of the
    Microsoft Help technology. FlashHelp is simply one possible output
    from this product.
    I think you are probably looking for the Flash forum, so I'll
    give you a magic link to take you over there where you can post
    your question and be more likely to find an answer.
    Click
    here to visit the Flash forum
    Good luck! Rick

  • Action script help: Quiz that uses an array needs to be changed.

    Hi,
    I have a quiz that was created by someone else, and now I (inexperienced with flash) need to make some edits. The quiz has 4 questions, and each answer the user clicks on will show a green ball, and then other text appears to let them know if they are right or not. Also, when they click the right answer "next" appears in the bottom right corner.
    Now I need to make the wrong answers red balls, and have the green ball only for the right answer. However it seems there is only one "green ball" and the code creates an array and that's all I can understand. I will need to make this changes to about 15 quiz questions, so hopefully the solution is something I can replicate easily on my own.
    Thanks!
    Here is the code:
    function doAnswer(n){
        //d or 4 is the correct answer.
        var bArray:Array = n.split("_");//split the button's name to array
        var butNum = bArray[1];//retrieve the button's number from the array
        //reset any answers that may have already been answered
        for (i=1;i<=4;i++){
            var currAns = "ans1_" + i;//current looped mc answer
            var currBut = "btn_" + i;
            if (this[currAns].actv == 1){
                this[currAns].play();
            if (this[currBut].actv == 1){
                this[currBut].play();
        this["ans1_" + butNum].play();
        if (butNum==4){
            next_mc._visible = 1;
        }else{
            next_mc._visible = 0;
    Flash CS5.5

    kglad,
    I'm not exactly sure what you mean. When the user clicks on the circle next to each answer, the colored ball fills the space. When they click on another answer, the ball from the previous answer disappears, so there is only one colored ball on the screen at a time. Does that help?

  • Newbie Action Script Help

    Hello List.
    This is my first try at Flash.
    I tried the drag and drop demo at
    http://monkeyflash.com/tutorials/flash-drag-and-drop/.
    It works well allowing me to drag an item and have it register when
    it is dropped on the correct target.
    I want to modify it so that I can drag an item to multiple
    locations... not just one.
    My desired application is the ability to drag pendents or
    charms onto a bracelet or chain and have them "snap" to the chain.
    With the above demo, I can see how 90% of it would work, but I
    cannot figure out how to have multiple targets named the same. The
    bulk of the code is attached.
    The line I believe needs to changed is this one:
    if (event.target.dropTarget != null &&
    event.target.dropTarget.parent == myTarget){
    I need this part :event.target.dropTarget.parent == myTarget
    to read something to the affect of:
    if item being dropped is over object A OR object B OR object
    C OR object D than ... rest of my code
    Can this be done?
    Any help is greatly appreciated.

    if drag1MC is one of your dragable movieclips and has
    acceptable drop-targets mc1, mc2,mc3:
    drag1MC.droptargetA = [mc1,mc2,mc3];
    function dropIt(event:MouseEvent):void {
    var mc:MovieClip = MovieClip(event.currentTarget);
    mc.stopDrag();
    var success:Boolean = false;
    for(var ind:int=0;ind<mc.droptargetA.length;ind++){
    if(mc.dropTarget!=null&&mc.dropTarget==mc.dropTargetA[ind]){
    success = true;
    mc.x = mc.dropTargetA[ind].x;
    mc.y = mc.dropTargetA[ind].y;
    break;
    if (success){
    reply_txt.text = "Good Job!";
    } else {
    reply_txt.text = "Try Again!";
    }

  • Flash Professional Action Script help?

    I am try to create a website where people can view an online bible and search for within it for certain passages using a search box, but I don't know how to begin to make that happen, in flash professional. Please help.

    Whatever approach you take will depend heavily on the document(s) you have for the bible element of the design.  You somehow need to be able to seek within it and determine where matched elements can be found and how to extract the information you intend to present.
    I don't think your issue currently lies with how to do this in Flash as much as first coming up with a gameplan that identifies the players and how you can interact with and within them.

  • Action Script Help Please

    I am trying to figure out the proper verbage for this. If I
    want to have a button gotoAndPlay "home" but then immediately
    after, without stopping, gotoAndPlay something else, What is the
    code for that?
    I.E.:
    on (press) {
    gotoAndPlay ("home");
    [what do I put in next to make it go play something else
    without pausing?]
    Text
    Text

    You need to see that task with different eyes, as soon as the
    script reaches the gotoandplay line, the playhead will jump
    instantly to that location and you need to write the next jump on
    that home frame.
    Why don't you rather set a variable saying where it should go
    after home like:
    on(press){
    gotoAndPlay("home");
    var nextGoTo = xxx;
    and on your home frame you have an case statement runnning
    checking which variable you activated so it will jump directly to
    it.
    If you don't undestand what I mean with it, you can send me
    the fla file and I will show you how to create it.

  • FlashGame, "sniper"-game, Action script help!

    Hello!
    I was trying to create a simple shooter game in Flash.
    And i want it to be very simple and not good looking if you
    now what i mean.
    Now to my problem.
    The game is all about to aim at a target and then fire/click
    and if you have hit the target, it should go to another frame. I
    want it to go to frame 5 after that you have hit the target.
    The sight is very simple, it´s a circle whit a cross in
    it. And it have a transparent background.
    The mouse is "hide" and the grafic (sight) show instead.
    BUT the moues is not "hide" in the midle of the sight. I want
    to decide where the mouse should be hide in the sight.
    I now that it can be hard to understand what i mean,
    so download the FLA file so that you have a better overview
    of my problem.
    http://rapidshare.com/files/90288167/SkjutTest.fla.html
    Please take time and help me solve my problem.
    Sorry for my eng. , i´m Swedish.
    Thanks!
    //SweFille

    you can't control where the hidden mouse is located. you can
    control where you sight is located.
    so, if you want the mouse to be at the lower left of the
    sight, place the sight movieclip at the _xmouse+whateverX,
    _ymouse-whateverY. though, i can't think of any reason you would
    want to do that unless you just want to aggrevate your users so
    they shut down your game sooner rather than later.

Maybe you are looking for

  • NVIDIA GeForce 8800 GS upgrade...

    Is this available to install on iMacs yet? I have the 24" 2.8ghz Intel iMac, and love it (minus the subpar gaming graphics). Is it as easy as taking the iMac down to my local Apple store to have the new video card installed? I'm VERY excited that App

  • MBP Airport consistently disconnecting from the Web, but not the network

    My MacBook Pro Airport has been cutting in and out - or at least the Web access has - when I use it in combination with a DLink router. The local wireless network connection always seems to stay connected (or at least it says it's connected), but I c

  • Mac app shop refund

    I have reversed the charge for "Call of Duty® 4: Modern Warfare™". You will see a store credit of $49.99 in three to five business days. You may need to sign out of the iTunes Store and then sign back in before you see the credit in your account. Doe

  • Linux flavors for oracle 10gR2 RAC setup

    Hi, Oracle10gR2 Which are the alternate Linux flavors (most similar to RHEL 5.5) that can be used for Oracle10gR2 RAC setup ?? Regards

  • Problem in hosting Siebel application after configuration

    Hi All I was able to configure Siebel gateway, database , server and web server extension successfully. But after the web server extension configuration the PUBLIC folder in SWEApp is not having any files in it. The IIS default website in not having