Load flash movie by executing javascript
Hi all,
I am having one html file that is showing flash movie on
brawser.
I want to load that flash movie into my flash application
movie clip. How can I do that. Please guide me...
here is html code... put it in ad.html file and open it.
<script language='JavaScript' type='text/javascript'
src='file:///D:/SportingBet-Widget/ExtraStuff/Documents/adx.js'></script>
<script language='JavaScript' type='text/javascript'>
<!--
http://ads.sportdog.gr/ads/adx.js
if (!document.phpAds_used) document.phpAds_used = ',';
phpAds_random = new String (Math.random()); phpAds_random =
phpAds_random.substring(2,11);
document.write ("<" + "script language='JavaScript'
type='text/javascript' src='");
document.write ("
http://ads.sportdog.gr/ads/adjs.php?n="
+ phpAds_random);
document.write ("&what=zone:218");
document.write ("&exclude=" + document.phpAds_used);
if (document.referrer)
document.write ("&referer=" +
escape(document.referrer));
document.write ("'><" + "/script>");
//-->
</script><noscript><a href='
http://ads.sportdog.gr/ads/adclick.php?n=a1ffd680'
target='_blank'><img src='
http://ads.sportdog.gr/ads/adview.php?what=zone:218&n=a1ffd680'
border='0' alt=''></a></noscript>
Did you upload the Flash movie (the SWF file)? Doesn't appear
to be on
your server.
Alec Fehl, MCSE, A+, ACE, ACI
Adobe Community Expert
AUTHOR:
Microsoft Office 2007 PowerPoint: Comprehensive Course
(Labyrinth
Publications)
Welcome to Web Design and HTML (Labyrinth Publications)
CO-AUTHOR:
Microsoft Office 2007: Essentials (Labyrinth Publications)
Computer Concepts and Vista (Labyrinth Publications)
Mike Meyers' A+ Guide to Managing and Troubleshooting PCs
(McGraw-Hill)
Internet Systems and Applications (EMC Paradigm)
Similar Messages
-
Hello
ISorry to say this but I am a newbie in Flash.
I have made a flash movie with playback control.
I hosted it on my website but the problem is whenever someone
visit the website it loads automatically even if you don't press
play.
I was just wondering how i can make the video starts loading
only after somebody press play. It is eating my bandwidth at the
moment everytime somebody visits my website because it loads
automatically even if you don't press play.
Do I have to edit the fla or flv? and how?
Thank you for your help!craete two different swf one with play back control and other
with all main content. And just load playpack swf first and write a
code on play button to load content swf like
play.onPress=function(){
loadMovie("content.swf","_root");
} -
Load flash movie which with sound problem
Hi, all,
I am doing a flash which with audio, the audio about 3-4 mins. But when i use another flash movie to load that flash mov with sound (using load movie function), cannot hear any voice. Why is it?
The flash movie with sound is use actionscript to attach the sound, when i test the movie, it is work. When it comes to load from another movie, it doesn't work. Anyone can help me to solve it?
Thanks.What version of Actionscript are you using?
-
How to load flash movies in a "series"
Basically, I have 5 external swf movies.
I want to load them on another swf container one after
another, with the container being able to detect the last frame of
a certain movie and load the next randomly. I can load them easily
by individually assigning the length of each movie into the
container.
But the problem is that the external movies varies in lengh.
I want to be able to update an external movie and the container
would still be able to detect the last frame of it.
Hope someone can help. Thanks in advance.i would create 2 arrays. one with the SWF names, and one with
interval times based on the length of the movies, then use a for
loop to load the movies into the container based on setInterval...
you can try using _totalframes if that is going to be to difficult,
but im not sure how successful that will be. -
How to control a loaded flash movie? Please help!!!
Hello everyone
I'm creating a web site with multiples swf files, the navigation is controlled via drop down menu, i have resolved the script for the drop down menu main buttons and i need to control the timeline of the movies loaded with the drop down menu main sub buttons to navigate into specific frames
this is what i got:
stop();
var myrequest:URLRequest=new
URLRequest("HomeSonny.swf");
var myloader:Loader=new Loader
myloader.load(myrequest);
stage.addChild(myloader);
//main buttons
menu.nosotros.addEventListener(MouseEvent.CLICK, clickmouse);
//menu.islas.addEventListener(MouseEvent.CLICK, clickmouse);
//subButtons
menu.historia.addEventListener(MouseEvent.CLICK, subMenu);
//event listener main buttons
function clickmouse(evt:MouseEvent):void {
trace("click")
myloader.load(new URLRequest("swf/"+evt.target.name+".swf"));
//listener loaded movie
myloader.contentLoaderInfo.addEventListener(Event.COMPLETE, subMenu);
//event listener sub buttons control loaded movie
function subMenu(evt:MouseEvent):void {
trace("clickSub")
var mycontent:MovieClip=evt.target.content;
mycontent.gotoAndStop("historia");
the problem is when i click the drop down menu sub button, does not go to the label frame of the loaded swf fil.
What am i doing wrong?
sample in the file....
thanks for watching.........See code and comments below. I don't guarantee that it will fix all your troubles though - you have big flaws in the logic:
stop();
// declare this var here so that is accessible
var mycontent:MovieClip;
var myrequest:URLRequest=new URLRequest("HomeSonny.swf");
var myloader:Loader = new Loader();
// you need to add listener here - before you start loading
// also you shouldn't mix loading with mouse click
myloader.contentLoaderInfo.addEventListener(Event.COMPLETE, onFileLoad);
myloader.load(myrequest);
// since your content changes - you shouldn't add it here
// stage.addChild(myloader);
//main buttons
menu.nosotros.addEventListener(MouseEvent.CLICK, clickmouse);
//subButtons
menu.historia.addEventListener(MouseEvent.CLICK, subMenu);
function onFileLoad(e:Event):void {
// remove previous content
if (mycontent) {
removeChild(mycontent);
mycontent = null;
mycontent = evt.target.content as MovieClip;
addChild(mycontent);
function clickmouse(evt:MouseEvent):void {
trace("click")
myloader.load(new URLRequest("swf/"+evt.target.name+".swf"));
function subMenu(evt:MouseEvent):void {
trace("clickSub")
mycontent.gotoAndStop("historia"); -
How Do I Execute An exe or an msi Install file From a Button in Flash Movie
Issue:
I have a flash movie that runs as a standalone player on a
Demo CD... I also have an install msi file(same as an exe) that
when the user is done viewing the flash movie they can click on a
menu button in the flash movie that executes the msi or exe located
on the root of the CD which starts the install process.
Question: What is the action script (FOR FLASH 8) that i
apply to the button that will initiate or call the MSI or exe
install file.
Anyhelp would be great... even a link to an example... or
anything... thanks
Thanks in advance...fscommand("exec","myexe.exe");
Should run the program myexe.exe inside a directory called
fscommand
which must be a subdirectory of whereever your projector is
located.
In windows:I know you can run .bat files with fscommand. But
I'm not sure about msi files.
You can often get around the limitations by having a .bat
file that will a) show a cmd window briefly and b) do the thing
that you couldn't do from flash.
If running the msi doesn't work from flash directly you may
want to try using a bat file...
There's some information here.
http://livedocs.adobe.com/flash/9.0/main/00001177.html#wp143348 -
Loading/Caching Flash movies
Hello,
Using Actionscript 2, I'm a bit new to all the scripting stuff.
I have a loader loading a couple of flash movies like this:
loadMovieNum("sound.swf", 1);
loadMovieNum("logo.swf", 2);
loadMovieNum("mainmenus.swf", 3);
Those 3 movies I need to go to the main section of the site. However, I would like the loader to also load the remaining movies needed to further navigate the site, but without displaying them now. Kind of like 'caching' the rest of the site, so when the access is needed, there's no load time.
How can can I do this? How would I tell it to cache movies in the background?
Hope this makes sense, thank you!
-=m.Hi thanks for bearing with me ;-)
I've looked up the function createEmptyMovieClip in the help but I'm still unsure of the syntax I should be using.
On frame 3 I'm loading flash movies like this:
loadMovieNum("sound.swf", 5);
loadMovieNum("ogo.swf", 4);
loadMovieNum("menus.swf", 3);
loadMovieNum("graphics.swf", 1);
loadMovieNum("outside_info.swf", 7);
The movies I would like to load on background:
something.swf
thisthat.swf
map.swf
etc....
Can I put a createEmptyMovieClip function right after my loadMovieNum commands? If so, what would it look like?
Thanks so much!
-=m. -
Javascript error when adding Flash movie to DWCS3
When I try to add a Flash movie to a page in DW CS3, I get
the following message:
When executing onClick Options.htm, the following Javascritp
Error(s) occurred:
At line 55 of the file "I:\Program FIles\Adobe\Adobe
Dreamweaver CS3\Configuration|Commands|Object|Object Options.js":
Cannot fine the file I:\Program FIles\Adobe\Adobe|adobe
Dreamweaver CS3\Configuration\Shared\Common\Cache\Empty.htm.
At line 55 of the file "I:\Program FIles\Adobe\Adobe
Dreamweaver CS3\Configuration\Commands\Object Options.js":
getDocumentDOM: Argument number 1 is invalid.
If I click through the error messages, I finally get the
movie on the page and it seems to display okay in IE6 ahd FX.
I don't get the error when I load a Flash movie if I use DW
8.
Do I need to reload DWCS3? Or is there a fix that I can
download. It seems to be a problem with DWCS3.
Regards,
Bill SchaepeTroubleshooting JavaScript errors in Dreamweaver
http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_19105#dat
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
==================
"TurboBill" <[email protected]> wrote in
message
news:flrsjd$6kh$[email protected]..
> When I try to add a Flash movie to a page in DW CS3, I
get the following
> message:
>
> When executing onClick Options.htm, the following
Javascritp Error(s)
> occurred:
>
> At line 55 of the file "I:\Program FIles\Adobe\Adobe
Dreamweaver
> CS3\Configuration|Commands|Object|Object Options.js":
> Cannot fine the file I:\Program FIles\Adobe\Adobe|adobe
Dreamweaver
> CS3\Configuration\Shared\Common\Cache\Empty.htm.
>
> At line 55 of the file "I:\Program FIles\Adobe\Adobe
Dreamweaver
> CS3\Configuration\Commands\Object Options.js":
getDocumentDOM: Argument
> number
> 1 is invalid.
>
> If I click through the error messages, I finally get the
movie on the page
> and
> it seems to display okay in IE6 ahd FX.
>
> I don't get the error when I load a Flash movie if I use
DW 8.
>
> Do I need to reload DWCS3? Or is there a fix that I can
download. It
> seems
> to be a problem with DWCS3.
>
>
> Regards,
> Bill Schaepe
>
> -
Flash movie not loading in IE 8....??
Hi, ive made a flash site in Flash CS4 .The flash movie doesnt load either on my computer or on web server, but only in IE 8 ??, in all other browsers(FF,Safari,opera) it works????
Why does this happen?
This is the page http://www.fragojo-nekretnine.com/
and the code
<script language="JavaScript" type="text/javascript">
AC_FL_RunContent(
'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0',
'width', '1280',
'height', '650',
'src', 'index',
'quality', 'high',
'pluginspage', 'http://www.adobe.com/go/getflashplayer',
'align', 'middle',
'play', 'true',
'play', 'true',
'loop', 'true',
'scale', 'showall',
'wmode', 'window',
'devicefont', 'false',
'id', 'index',
'bgcolor', '#242424',
'name', 'index',
'menu', 'true',
'allowFullScreen', 'false',
'allowScriptAccess','sameDomain',
'movie', 'index',
'salign', ''
); //end AC code
</script>
<noscript>
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0" width="1280" height="650" id="index" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="allowFullScreen" value="false" />
<param name="movie" value="index.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#242424" /> <embed src="index.swf" quality="high" bgcolor="#242424" width="1280" height="650" name="index" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" />
</object>
</noscript>
</body>
</html>
Please help!!!
Thankswww.micca.co.uk/1871productions/showreels.html
If you try any in IE8, they stop half way and do not give a smooth stream. I am wondering if I have to stream differently and not via the progressive download stream as I have??! -
Flash Movie Doesn't Load in Dreamweaver
I'm trying to center my flash movie withing a 3 row table in
an HTML file that has the "Flash Detection" javascript embedded
within it. I'm really not sure if I've put the table formatting
HTML in the correct place or not. When I test the movie everything
is fine but it doesn't load online. I'll attach the code to this
post. The website is www.elkhornpeakcellars.com if you'd like to
see what this code currently produces. Thanksdvdbsqt;
You asked>
I'm really not sure if I've put the table formatting HTML in
the correct
place or not.
I don't see any html table related tags in your posted
script, or in the url
page source-Perhaps you found an acceptable solution--your
flash appears OK
(ie7/winxp/fp9)...
-Tom Unger -
Error Msg: Flash Movie not Loaded
Hi,
For some reason my flash movie will not load. I right click
it and I see the following
"Movie not loaded" it is greyed out. I can run this same .swf
file from my local hard drive, but when I try to view it from
http://localhost/mysite/header.swf,
it does not work. I am using Windows XP Home edition which uses IIS
5.1
The HTML page I am running and the .swf file are in the same
directory so its not a path issue.
Here is the code:
<script type="text/javascript">
AC_FL_RunContent( 'codebase','
http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','wid th','487','height','308','src','header','quality','high','pluginspage','http://www.adobe.c om/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','header'
); //end AC code
</script>
<noscript><object
classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="
http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0"
width="487" height="308">
<param name="movie" value="header.swf">
<param name="quality" value="high">
<embed src="header.swf" quality="high" pluginspage="
http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash"
type="application/x-shockwave-flash" width="487"
height="308"></embed>
</object></noscript>Hi,
Its quite strange, after further testing, the code works just
fine at my hosting company, but when I run it locally, the flash
movie does not load.
I am running XP Home with IIS 5.1 I believe. I am not sure
why this is happening.
Any help appreciated?
-Westside -
Flash movie doesn't load properly in IE only
I have a simple flash movie which transitions through text and photos. I have a preloader (AS3) on frame 1, which sends the playhead to frame 2, after the movie has loaded 100%. For some reason, in Internet Explorer, the preloader bar will load all the way, but fail to move the playhead to frame 2, so it'll just sit there, with the preload bar at 100%. However, this does not happen every time. For instance, right now, the flash movie will play when I initially go to the website, but when I click on another page, the same flash header (same swf on each page) will just show the preloader bar but will not play the rest of the movie. Reloading the page doesn't help. Closing the browser and reopening it doesn't help. Clearing the browser cache doesn't help either. So, the flash movie will play correctly on the first page of the website I go to (whether it be the home page or another page) but then when I go to any other page which has the flash movie, it won't play, just sits there with the preloader bar showing. And then when going back to the initial page I entered the site on, the flash movie no longer plays there, either. I haven't seen this problem in any other browser than Internet Explorer (6 and 7). I've checked in Firefox on Mac and PC and Safari on Mac. I'm using flash player 10.0.22.87 on my Mac and PC. The flash movie was made in Flash CS3, for flash player 9, actionscript 3 code.
So, to see the problem, go here in Internet Explorer: http://demo.matthewpavkov.com/adairsolar. Wait for the movie to load and start playing. It works. Then, navigate to one of the other pages and you'll see that the same swf will not play. Navigate back to the home page, the swf does not play.
Here is the preloader code:
import flash.display.*;
this.stop();
this.loaderInfo.addEventListener(ProgressEvent.PROGRESS, PL_LOADING);
function PL_LOADING(event:ProgressEvent):void {
var pcent:Number=event.bytesLoaded/event.bytesTotal*100;
lbar.scaleX=pcent/100;
lpc.text=int(pcent)+"%";
if (pcent>=100) {
this.gotoAndStop(2);
Also, if I remove the preloader actionscript code, the flash movie plays correctly. You can see that here: http://demo.matthewpavkov.com/adairsolar/no-preload
The .fla is available to anyone who wants to take a closer look.mjjp,
In may just be that in IE, the ProgressEvent never fires -- because your content is already cached. See what happens if you add the following new lines (very end of the code sample):
this.stop();
this.loaderInfo.addEventListener(
ProgressEvent.PROGRESS, PL_LOADING
function PL_LOADING(event:ProgressEvent):void {
var pcent:Number=event.bytesLoaded/event.bytesTotal*100;
lbar.scaleX=pcent/100;
lpc.text=int(pcent)+"%";
if (pcent>=100) {
this.gotoAndStop(2);
if (this.loaderInfo.bytesLoaded >= this.loaderInfo.bytesTotal) {
this.gotoAndStop(2);
See what's going on? This way, even of the ProgressEvent handler never fires, you're still comparing the bytesLoaded property against the bytesTotal property.
David Stiller
Adobe Community Expert
Dev blog, http://www.quip.net/blog/
"Luck is the residue of good design." -
How to detect end of flash movie (SWF file) in Javascript
I have used Dreamweaver CS4 to integrate my SWF file as shown
below. So far so good. See GoToNext()
my website
What I wouldd like to do is have the SWF movie trigger a
javascript function in my html page when the video is stopped
playing (i.e. when it is finished) There are no controlls in that
SWF file - it is basically am add banner. I would think this would
be easiest done by rasinng an event in SWF that is communicated to
javascript, where I can add an event listener, and thus trigger my
function.
How can this be done in the simplest way?
<div id="bodyFlash"
class="clearfloat"><p> </p>
<object
classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="760"
height="150" id="FlashID" title="Chillifire Banner">
<param name="movie" value="flash/chillifire.swf" />
<param name="quality" value="high" />
<param name="wmode" value="transparent" />
<param name="swfversion" value="6.0.65.0" />
<!-- This param tag prompts users with Flash Player 6.0
r65 and higher to download the latest version of Flash Player.
Delete it if you don’t want users to see the prompt. -->
<param name="expressinstall"
value="Scripts/expressInstall.swf" />
<!-- Next object tag is for non-IE browsers. So hide it
from IE using IECC. -->
<!--[if !IE]>-->
<object type="application/x-shockwave-flash"
data="flash/chillifire.swf" width="760" height="150">
<!--<![endif]-->
<param name="quality" value="high" />
<param name="wmode" value="transparent" />
<param name="swfversion" value="6.0.65.0" />
<param name="expressinstall"
value="Scripts/expressInstall.swf" />
<!-- The browser displays the following alternative
content for users with Flash Player 6.0 and older. -->
<div>
<h4>Content on this page requires a newer version of
Adobe Flash Player.</h4>
<p><a href="
http://www.adobe.com/go/getflashplayer"><img
src="
http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif"
alt="Get Adobe Flash player" width="112" height="33"
/></a></p>
</div>
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</object>
</div>
...on the last frame in the banner file you can use the
ExternalInterface class to call a specific JS method, and even pass
data if needed. -
How can I get my Flash movie to load correctly in Internet Explorer?
I loaded an swf into an html. It loads fine in Safari, Firefox and Opera. However, in Internet Explorer the swf covers up part of the copy. I tried everything with the css to get it to work, but it nothing has helped. Among other things, I tried changing the z-index in the css, but that doesn't do anything. Is there a specific code I need to add to my html regarding the importing of the flash movie that would be specific to IE?
This thread should be in either the Flash Pro forum or the Dreamweaver forum.
This is for Flash Player and Flash Player related issues, not Flash or browser or HTML issues. -
I have a huge movie clip to be imported, its pretty huge so I
divided them to smaller pieces and tried to import, everything my
PC gets hung and does not respond after import. What is the best
method to import a single huge movie clip? Your help is
appreciated.Problem Solved.
To everyone that has experienced some version of this issue,
whether it be in previewing a load progress bar, or having
animation freeze on you while loading external movie files...
In test mode in flash, whether you are doing a simple test
movie or debugging, loading progress appears to not be threaded and
will freeze you movie until the load is complete. if you preview
this movie clip in a browser after publishing it, everything should
look ok.
I've read a lot of posts about this same topic. Macromedia
(or shall i say Adobe), fix this issue in your next release. what a
pain...seriously. debugging is useless if the movie doesn't even
run the same.
very much relieved,
Al.
Maybe you are looking for
-
My contacts won't open so I can add email addresses
my contacts app won't open for me to add emails can someone please help me
-
Can I stream music to apple tv and airport express at the same time?
Does anyone know if I can stream music to both AppleTV and Airport Express (speakers) at the same time? I have a TV in my living room and external speakers on my deck and want to stream music to both at the same time so I have the same music playing
-
HI, In S_ALR_87005830 we have authorization groups for versions. i want to know who all assigned to particular authorization group. how is this possible,is there any t-code? thanks, vani
-
How do I set the printer to print a 4 by 6 photo This question was solved. View Solution.
-
Hi there! I'm using Illustrator CS3, trying to split a vector graphic so that it can be cut on vinyl. (The logo is too large to fit on the vinyl, so it has to be split in two pieces.) Is there a fast way to split it straight across in a horizontal li