Results 1 to 2 of 2

Thread: AS question

  1. #1
    Join Date
    Dec 2007
    Location
    Mississauga
    Posts
    166
    Thanks
    13
    Thanked 0 Times in 0 Posts

    Default AS question

    I am working with a site that has zoomable floor plans, problem is the client wants to change the site from flash to html. The zoomable floor plans are seperate swf files but the controls to zoom and chose other floor plans etc are part of another swf file, that for some reason when I double click it, it does not work the same as it did on the site.

    (*note: I have copied all the files from the original site to my server like XML, image files etc and it still will not allow me to open one swf file seperately from the main swf file.)

    Below is the code on the swf file that contains the controls for the floor plans but when I try to view does not open the way it does on their server.

    Frame 1
    Code:
    function loadimg () {
    	imgviewer.gotoAndPlay(2);
    	imgviewer._visible = 1;
    }
    function closeimg () {
    	imgviewer._visible = 0;
    	imgviewer.gotoAndStop(1);
    }
    Frame 13
    Code:
    if(_root.modelsxml.length > 2){
    	gotoAndPlay("loadcommunity");
    }
    Frame 72
    Code:
    loadMovie("_swf/"+_root.sitemap,"canister");
    //loadMovie(_root.sitemap,"canister");
    if(_root.Cdetail == "Unit Detail"){
    	_root.backtxt = "Select Another Unit";
    }
    if(_root.Cdetail == "Model Detail"){
    	_root.backtxt = "Select Another Model";
    }
    Frame 84
    Code:
    loadMovie("_swf/"+_root.sitemap,"canister");
    //loadMovie(_root.sitemap,"canister");
    if(_root.Cdetail == "Unit Detail"){
    	_root.backtxt = "Select Another Unit";
    }
    if(_root.Cdetail == "Model Detail"){
    	_root.backtxt = "Select Another Model";
    }
    Frame 88
    Code:
    movieSize = canister.getBytesTotal();
    moviePercent = movieSize/100;
    current = canister.getBytesLoaded();
    if (movieSize>0) {
    	PercentLoaded = Math.round(current/moviePercent);
    } else {
    	PercentLoaded = 0;
    }
    if (PercentLoaded > 99) {
    	play();
    } else {
    	gotoAndPlay(_currentFrame - 1);
    }
    Frame 89
    Code:
    /// initialization is (zoomable clip, zoom max, zoom speed)
    ScrollbarClip.init("canister",1.4,6);
    
    CorrectWidth = canister._width;
    CorrectHeight = canister._height;
    CorrectX = canister._x;
    
    CorrectY = canister._y
    Frame 90
    Code:
    canister.gotoAndPlay(2);
    Frame 121
    Code:
    canister.gotoAndPlay(2);
    Frame 136
    Code:
    loadMovie(_root.ModelPlan1,"canister");
    Frame 139
    Code:
    movieSize = canister.getBytesTotal();
    moviePercent = movieSize/100;
    current = canister.getBytesLoaded();
    if (movieSize>0) {
    	PercentLoaded = Math.round(current/moviePercent);
    } else {
    	PercentLoaded = 0;
    }
    if (PercentLoaded > 99) {
    	play();
    } else {
    	gotoAndPlay(_currentFrame - 1);
    }
    Frame 140
    Code:
    /// initialization is (zoomable clip, zoom max, zoom speed)
    ScrollbarClip.init("canister",2.5,6);
    
    CorrectWidth = canister._width;
    CorrectHeight = canister._height;
    CorrectX = canister._x;
    CorrectY = canister._y
    Frame 149
    Code:
    minfo.gotoAndStop(_root.modelinfo);
    
    trace(_root.planbgcolor);
    var colorful = new Color("planbg");
    colorful.setRGB(_root.planbgcolor);
    Frame 168
    Code:
    stop();
    Frame 183
    Code:
    canister._width = CorrectWidth;
    canister._height = CorrectHeight;
    canister._x = CorrectX;
    canister._y = CorrectY;
    ScrollbarClip.Slider._y = ScrollbarClip.BeginY;
    Frame 187
    Code:
    loadMovie(_root.plan,"canister");
    Frame 191
    Code:
    movieSize = canister.getBytesTotal();
    moviePercent = movieSize/100;
    current = canister.getBytesLoaded();
    if (movieSize>0) {
    	PercentLoaded = Math.round(current/moviePercent);
    } else {
    	PercentLoaded = 0;
    }
    if (PercentLoaded > 99) {
    	play();
    } else {
    	gotoAndPlay(_currentFrame - 1);
    }
    Frame 192
    Code:
    /// initialization is (zoomable clip, zoom max, zoom speed)
    ScrollbarClip.init("canister",2.5,6);
    
    CorrectWidth = canister._width;
    CorrectHeight = canister._height;
    CorrectX = canister._x;
    CorrectY = canister._y
    Frame 213
    Code:
    stop();
    I am drawing blanks here and need serious help, if anyone has any idea where things are going wrong here, please let me know.

    Thanks for looking over my post.

    -- Nate

  2. #2
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    I'm sorry.

    I don't quite understand your problem. Is it essentially that the controls .swf isn't loading within the container .swf?

    Are you sure that the relative paths are all the same as they are on your client's webserveR?

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •