Swfs embedded in an html will not play when opened locally.
hi all, has been issue while work seems pressing. make instructional animations in flash published online. way have standardized navigation within these swfs 2 buttons - forward , -- utilize simple code in first frame of actions layer in main timeline references lables on various key frames throughout movie (slide1, slide2 etc.) code strips word "slide" , uses remaining number locate play head on timeline. updates counter user knows slide on (3/10 etc.) (i'll attach code @ bottom reference.)
this has worked great when publish online when open container html locally buttons not work , dynamic text counter associated reads # / # . using as3 , publishing flash player 10. i'm running chrome have tried popular browsers.
i totally @ dead end. should point out im not coder, im designer/animater code found on line , tweaked our needs.
anyway, suggestions of @ dead end other flash player, reason not reading actionscript when local. in advance --
here code, ive commented out:
_______________________________________________
fscommand("allowscale", "false");
stage.quality = stagequality.best;
stop();
// button listeners
btnnext.addeventlistener(mouseevent.click, nextsection);
btnback.addeventlistener(mouseevent.click, prevsection);
///////////////////////////////////////////////////////////////////////////
function nextsection(event:mouseevent):void {
var thislabel:string = currentlabel; // gets current frame label string
var thislabelnum:string = thislabel.replace("slide", ""); // cuts leading letters off of number
var curnumber:number = number(thislabelnum); // converts string number real number
if (curnumber < 10) {
var nextnum:number = curnumber + 1; // adds 1 number can go next frame label
gotoandstop("slide" + nextnum); // allows go next frame label
}
}
///////////////////////////////////////////////////////////////////////////
function prevsection(event:mouseevent):void {
var thislabel:string = currentlabel; // gets current frame label string
var thislabelnum:string = thislabel.replace("slide", ""); // cuts leading letters off of number
var curnumber:number = number(thislabelnum); // converts string number real number
var prevnum:number = curnumber - 1; // subtracts 1 number can go previous frame label
gotoandstop("slide" + prevnum); // allows go previous frame label
}
//////////////////////////////////////////////////////////////////////////
// enter_frame event gets slide number
addeventlistener(event.enter_frame,updatecounter);
// function update #/# slide counter whatever
function updatecounter(e:event):void{
var thislabel:string = currentlabel; // again, gets current frame label string
var thislabelnum:string = thislabel.replace("slide", ""); // cuts leading letters off of number
this.counter_txt.text = thislabelnum + " / 10";
}
just wanted bump this.
nobody has encoutered this? question this:
why doesn't swf located locally , loaded html container function when works great on when hosted on server? how make work locally?
More discussions in Using Flash Player
adobe
Comments
Post a Comment