Source Code For Expanding Ads That Work W/ Safari
Hi I'm wondering if anyone has some sample code I can check out for making a swf in AS 3 that grows over page content and is compatible with Safari (preferably 2 or higher) I've been googling and searching through these and other forums and haven't been able to find anything usable in Safari, though I'm sure it exists.Any help/direction is appreciated!
Actionscript 3.0
Posted on: Wed Mar 26, 2008 3:38 pm
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Source Code For Creating Expanding Ad Swf That Works In Safari?
Hi I'm wondering if anyone has some sample code I can check out for making a swf in AS 3 that grows over page content and is compatible with Safari (preferably 2 or higher) I've been googling and searching through these and other forums and haven't been able to find anything usable in Safari, though I'm sure it exists. I've seen it on some ads around.
Any help/direction is appreciated!
Sample Code For Expanding SWF OnRollOver - Compatible With Safari?
Hi I'm wondering if anyone has some sample code I can check out for making a swf in AS 3 that grows over page content and is compatible with Safari (preferably 2 or higher) I've been googling and searching through these and other forums and haven't been able to find anything usable in Safari, though I'm sure it exists.
Any help/direction is appreciated!
Object/embed Code Missing From Source Code
I have the wackiest problem.. its killing me. I developed a simple flash banner for a client. It works fine on 99% of all machines, but the client's machine happens to be in the 1% that it DOES NOT work on. When he pulls up the page containing the flash file, he gets nothing. He has the latest flash plugin, and can view other flash content. When I view the source code on the machine that is having the problem, all the code is there EXCEPT the object/embed code. Its just missing. What in the world could cause that? I checked for firewall issues. He is running norton firewall. I disabled it, but he still has the problem.
This is the page in question:
http://projects.newtarget.net/RELOconnections/flashtest.html
as you can see, nothing special. simple flash, simple code. the other computers in his office have no trouble, its just his computer and his parents computers. I tried the page in IE 6 and firefox. Same result, he is not getting the flash code. He's on WinXP.
Can anybody think of ANY reason why he would be being shielded from getting object/embed flash code?
-vb
Expanding The Work Area?
Been wondering this for a while now and never really ran into an issue until now.
I have a very long series of images ~ 3000 pixels wide total that I want to put in flash but the work area is way too small and the objects just get pushed off the side of the screen. Is there a solution to editing large objects or expanding the work area? Its really driving me crazy.
Thanks
Expanding Work Area
Hello. I have done the tutorial http://www.kirupa.com/developer/flash5/slidingmenu.htm.
It works great. In my flashfile I have a 7000 pixel wide slider. My problem is that in Flash I cant see whats beyond 3000 pixels. How can I expand the work area? Is this possible? I can slide the slider back and forward, but I cant work or type in any information beyond 3000 pixels.
Please help anyone.
Expanding My Work Area?
Hey all, thanks for your help on the scrolling image thread earlier, it really helped out!
I have another question, though.
How can I make my work area in FLASH bigger so that I can scroll over as far as I want?
I have a really long string of images that is upwards of 2000 pixels long and I can put them all next to each other because it wont let me go any farther to the right.
Any ideas?
Thanks a lot,
Zack
No Flash And No Embed Code In Source Code?
I really dont know whats going on here, when i try to embed my flash into a html or php document the flash movie does not appear when browsing, when i view source the code is not even there but all other code changes are reflected (i know the document has been updated). When i go direct to the swf url I can see the file. when i publish the swf with html it works fine locally but again online i cant even see the code. other flash files work fine on my site, this is a problem on IE and firefox.. whats going on???????
Expanding Sbeener's Gallery Code
I've been attempting (unsucessfully) to expand on sbeeners code for the photo gallery (on this site).
sbeener sets up an array with the photos in it and uses functions to load one photo from the array's position.
I'm trying to add some AS in there that sets up an additional array (of text strings/captions) and then sets the index of that additional array to match the array of photos and loads the value from that array into a dynamic text box.
So far I'm a little stumped on how to execute this.
I'll attach the code (sbeeners w/my alterations). Any help would be awesome! I've seen lots of people posting about this in forums and not getting any response.
Maybe if we get it working we can update the tute on kirupa!
Code:
//Code written by sbeener (suprabeener)
/*
i wrote this code, but you can use and abuse it however you like.
the methods are defined in the order which they occur to make it
easier to understand.
*/
// variables ------------------------------------------
// put the path to your pics here, include the slashes (ie. "pics/")
// leave it blank if they're in the same directory
this.pathToPics = "iraqpics/";
// fill this array with your pics
this.pArray = ["iraq1.jpg", "iraq2.jpg", "iraq3.jpg", "iraq4.jpg", "iraq5.jpg", "iraq6.jpg", "iraq7.jpg", "iraq8.jpg"];
this.cArray = ["caption1", "caption2", "caption3", "caption4", "caption5", "caption6", "caption7", "caption8"];
this.fadeSpeed = 20;
this.pIndex = 0;
// MovieClip methods ----------------------------------
// d=direction; should 1 or -1 but can be any number
//loads an image automatically when you run animation
loadMovie(this.pathToPics+this.pArray[0], _root.photo);
MovieClip.prototype.changePhoto = function(d) {
// make sure pIndex falls within pArray.length
this.pIndex = (this.pIndex+d)%this.pArray.length;
if (this.pIndex<0) {
this.pIndex += this.pArray.length;
}
this.onEnterFrame = fadeOut;
};
this.cindex = this.pindex;
caption.text = this.cindex;
MovieClip.prototype.fadeOut = function() {
if (this.photo._alpha>this.fadeSpeed) {
this.photo._alpha -= this.fadeSpeed;
} else {
this.loadPhoto();
}
};
MovieClip.prototype.loadPhoto = function() {
// specify the movieclip to load images into
var p = _root.photo;
//------------------------------------------
p._alpha = 0;
p.loadMovie(this.pathToPics+this.pArray[this.pIndex]);
this.onEnterFrame = loadMeter;
};
MovieClip.prototype.loadMeter = function() {
var i, l, t;
l = this.photo.getBytesLoaded();
t = this.photo.getBytesTotal();
if (t>0 && t == l) {
this.onEnterFrame = fadeIn;
} else {
trace(l/t);
}
};
MovieClip.prototype.fadeIn = function() {
if (this.photo._alpha<100-this.fadeSpeed) {
this.photo._alpha += this.fadeSpeed;
} else {
this.photo._alpha = 100;
this.onEnterFrame = null;
}
};
// Actions -----------------------------------------
// these aren't necessary, just an example implementation
this.onKeyDown = function() {
if (Key.getCode() == Key.LEFT) {
this.changePhoto(-1);
} else if (Key.getCode() == Key.RIGHT) {
this.changePhoto(1);
}
};
Key.addListener(this);
Expanding Sbeener's Gallery Code
I've been attempting (unsucessfully) to expand on sbeeners code for the photo gallery (on this site).
sbeener sets up an array with the photos in it and uses functions to load one photo from the array's position.
I'm trying to add some AS in there that sets up an additional array (of text strings/captions) and then sets the index of that additional array to match the array of photos and loads the value from that array into a dynamic text box.
So far I'm a little stumped on how to execute this.
I'll attach the code (sbeeners w/my alterations). Any help would be awesome! I've seen lots of people posting about this in forums and not getting any response.
Maybe if we get it working we can update the tute on kirupa!
Code:
//Code written by sbeener (suprabeener)
/*
i wrote this code, but you can use and abuse it however you like.
the methods are defined in the order which they occur to make it
easier to understand.
*/
// variables ------------------------------------------
// put the path to your pics here, include the slashes (ie. "pics/")
// leave it blank if they're in the same directory
this.pathToPics = "iraqpics/";
// fill this array with your pics
this.pArray = ["iraq1.jpg", "iraq2.jpg", "iraq3.jpg", "iraq4.jpg", "iraq5.jpg", "iraq6.jpg", "iraq7.jpg", "iraq8.jpg"];
this.cArray = ["caption1", "caption2", "caption3", "caption4", "caption5", "caption6", "caption7", "caption8"];
this.fadeSpeed = 20;
this.pIndex = 0;
// MovieClip methods ----------------------------------
// d=direction; should 1 or -1 but can be any number
//loads an image automatically when you run animation
loadMovie(this.pathToPics+this.pArray[0], _root.photo);
MovieClip.prototype.changePhoto = function(d) {
// make sure pIndex falls within pArray.length
this.pIndex = (this.pIndex+d)%this.pArray.length;
if (this.pIndex<0) {
this.pIndex += this.pArray.length;
}
this.onEnterFrame = fadeOut;
};
this.cindex = this.pindex;
caption.text = this.cindex;
MovieClip.prototype.fadeOut = function() {
if (this.photo._alpha>this.fadeSpeed) {
this.photo._alpha -= this.fadeSpeed;
} else {
this.loadPhoto();
}
};
MovieClip.prototype.loadPhoto = function() {
// specify the movieclip to load images into
var p = _root.photo;
//------------------------------------------
p._alpha = 0;
p.loadMovie(this.pathToPics+this.pArray[this.pIndex]);
this.onEnterFrame = loadMeter;
};
MovieClip.prototype.loadMeter = function() {
var i, l, t;
l = this.photo.getBytesLoaded();
t = this.photo.getBytesTotal();
if (t>0 && t == l) {
this.onEnterFrame = fadeIn;
} else {
trace(l/t);
}
};
MovieClip.prototype.fadeIn = function() {
if (this.photo._alpha<100-this.fadeSpeed) {
this.photo._alpha += this.fadeSpeed;
} else {
this.photo._alpha = 100;
this.onEnterFrame = null;
}
};
// Actions -----------------------------------------
// these aren't necessary, just an example implementation
this.onKeyDown = function() {
if (Key.getCode() == Key.LEFT) {
this.changePhoto(-1);
} else if (Key.getCode() == Key.RIGHT) {
this.changePhoto(1);
}
};
Key.addListener(this);
Why Does This Work In Explorer But NOT In Safari?
I've tried 'everything', but before from jumping off a cliff and leaving a note for my client saying "Sorry!' I ask you...
Why does my link
not work in Safari, while it works perfectly in Explorer? It's a pretty basic HTML page made in Dreamweaver with my SWF embedded in it.
Is it my preloader? Any ideas?
Please help!!
Grete x
Safari - Mac: Buttons Don't Work?
Hi,
I'm not sure what wrong here but if you follow this link My Web Page
and you have a MAC with the browser Safari in it the buttons don't work.
Can anyone tell me why this works on every other computer, but a Mac with safari?
Thanks,
Flv Player No Work In Safari
hello,
i am using a scroll panel to load swf files into my main page. These swfs all contain flvplayers and scroll panels themselves. In Safari, when i click back and forth between the thumbnails, the swfs load but eventually, in as little as 5 clicks, the player stops appearing. This seems to happen randomly on different thumbnails, at different times. Once this happens, there is no way to reload the player in the swfs unless i refresh the web page. This problem does not appear in firefox. Any ideas?
thanks,
nikolai
Can't Get This Html To Work In Safari
I want to put a boombox on one of my html pages. I have a program from Coffeecup that does this. It changes mp3 files into swf and then makes a flash player that plays the pieces. It there fore makes an html file with the flash embeded, as well as a xml file that contains the listt of pieces...and also a javascript.
When I go to the directory that Coffecup made, and click on the html file , the page comes up with the boombox and it plays fine. That is if you use firefox or Interrnet explorer. THE BOOMBOX HOWEVER WILL NOT PLAY UNDER SAFARI. I need it to run under safari becasue I want to put the boombox on a cd I want to distribute; to PC owners as ell as Macx owners. Here is the code that won't work; Can you tell me if I must add something. Thanks in advance;
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
Pop Up Doesn't Work In IE But In Safari
hi,
i followed the instructions oh how to make a centered pop up window here : http://www.kirupa.com/developer/mx/centered_popup.htm
i'm using a mac... and it works in Safari... but when i try to use explore to open it, the pop up window doesn't come up...why is that.......? did i do something wrong?
here is my website:
http://d-cage.com
and please click on 'message' to see for yourself.
i'd very much appreciate your kind help.
this page has helped me a lot with building my website thank you for your dedication.
sincerely,
ki
Pop Up Doesn't Work In IE But In Safari
hi,
i followed the instructions oh how to make a centered pop up window here : http://www.kirupa.com/developer/mx/centered_popup.htm
i'm using a mac... and it works in Safari... but when i try to use explore to open it, the pop up window doesn't come up...why is that.......? did i do something wrong?
here is my website:
http://d-cage.com
and please click on 'message' to see for yourself.
i'd very much appreciate your kind help.
this page has helped me a lot with building my website thank you for your dedication.
sincerely,
ki
Horizontal Expanding Menu, Code Mod/cleanup Help Needed
Hi There,
My actionscript knowledge is expanding by all the great tutorials here at kirupa and a lot of trial and error. I wanted to make a menu slide out horizontally and add another submenu on the click.
My movie consists of a few mainmenu buttons and some movieclips(per submenu).
clicking portfolio will expand the first submenu, clicking a button in the submenu will expand the second submenu.
With my limited actionscript knowlegde I got it to work from scratch. but it does still have a few problems.
1. clicking "portfolio" and then "print", will expand and collapse the submenu of "print". but when i roll-off the printbutton (without rolling over any other buttons) and then rollover the printbutton de click doesnt expand the submenu of "print".
2 when having "portfolio", "print" and its submenu open. When you rollover "profile" I want to have both levels collapsing, but i can't get it to work properly.
3. I cant get the swapDepth() to work properly so I had to hardcode a depth of -16368.
4. I guess my code will look pretty amateur, so if someone can help cleanup the code, that would be great!
I hope i explained myself good enough. I'll attach the movie so you guys can look (and shoot ) at my code. Any help, suggestions etc. are more than welcome. I've been staring myself blind on this, and still haven't got is to work
Thank you!
Why Does My OnclipEvent Load Pop Up , Not Work On Safari?
I'm using the following code...and it automatically launches a pop up with firefox and IE, but on safari, it don't work. What is going on? Any work around for this?
onClipEvent (load) {getURL ("javascript:NewWindow=window.open('southafrican.h tml','newWin','width='+screen.availWidth+',height= '+screen.availHeight+',left=0,top=0,toolbar=No,loc ation=No,scrollbars=No,status=No,resizable=No,full screen=No'); NewWindow.focus(); void(0);");
}
on (release) {
getURL ("javascript:NewWindow=window.open('southafrican.h tml','newWin','width='+screen.availWidth+',height= '+screen.availHeight+',left=0,top=0,toolbar=No,loc ation=No,scrollbars=No,status=No,resizable=No,full screen=No'); NewWindow.focus(); void(0);");
}
Why Does My OnClipEvent Load Pop Up, Not Work On Safari?
I'm using the following code...and it automatically launches a pop up with firefox and IE, but on safari, it don't work. What is going on? Any work around for this?
onClipEvent (load) {getURL ("javascript:NewWindow=window.open('southafrican.h tml','newWin','width='+screen.availWidth+',height= '+screen.availHeight+',left=0,top=0,toolbar=No,loc ation=No,scrollbars=No,status=No,resizable=No,full screen=No'); NewWindow.focus(); void(0);");
}
on (release) {
getURL ("javascript:NewWindow=window.open('southafrican.h tml','newWin','width='+screen.availWidth+',height= '+screen.availHeight+',left=0,top=0,toolbar=No,loc ation=No,scrollbars=No,status=No,resizable=No,full screen=No'); NewWindow.focus(); void(0);");
}
Flash Site Won't Work In Safari
HI. I have a strange problem. I created a flash site, that plays in dreamweaver. http://www.littlecoutroulis.info
it works fine in Netscape, and Explorer, but in Safari, none of the links from the homepage work.
Any idea why?
Thanks
Niko
Mouse.hide Doesn't Work On Safari
in an opening animation on the site i'm working on, i use the mouse.hide function. it works just the way i want it to on IE on a PC and on a Mac. but the mouse doesn't hide in safari, the cursor just sits right below the Mac mouse. Anyone else run into this problem, and if so, any fixes?
thanks guys.
Flash Links Don't Work In Mac Safari Or Firefox
I just finished a new site, http://www.NewYorkMultimedia.com. I made all the links in the header in Flash, and, owning a PC, tested the site in IE, Firefox, Sarfari & Mozilla, in all of which the links work fine. Then today I found out that the links don't work in Sarfari or Firefox on the Mac, although they do work in IE on the Mac. Is anyone familier with this problem and how to correct it?
Here is an example of the actionscript used on the first of the link buttons in the Flash header:
on (release) {
getURL("http://www.newyorkmultimedia.com/video");
}
Thank you very much to anyone who can help me.
[F8] Buttons Work OK In Opera, But Not In Safari/Firefox (Mac)
Hi,
I have a Flash site that uses a preloader swf, which references a ''splash-screen' - and these load OK, however the buttons on that 'splash-screen' in either Safari or Firefox (Mac) fail to work - clicking on any of them fails to load the referenced swf - even though all swf's are loose in the same directory on the server - BUT everything works OK in Opera...
Duzz any1 have any general advice as to what may be the problem with these 2 browsers? I understand there are some glitches with Flash 8 Player in Firefox, so I have the Flash 9 player installed instead...
I used Sitegrinder to create a shell for this Flash site - but since the site works OK in Opera, MediaLab have referred me to the forums to find out what I need to do...
I think there may also be some issues in IE for Windows - as one of the buttons on the splash-screen isn't visible, and the rollovers on others are behaving weirdly...
:P
Here's the URL: www.ripegraphicdesign.com.au
Any advice is greatly appreciated...
Why Doesn't My Javascript Call Work In Safari?
I've got a standard call to a javascript from inside a flash movie that works well in IE on windows and Firefox for Mac and Windows.
Usually that is good enough, but this is for a photographer client, and there will be a large number of Safari users viewing the site... and the script just wont trigger from the flash movie in Safari.
I started with externalInterface (again, this was working perfectly in IE and Firefox), then changed it to an old fashoned getURL("javascript:... which also works in IE and Firefox... but NO-Go in Safari.... I'm pulling my hair out here thinking there must be something small and simple to this that I've overlooked.
Help?
Load Movie Does Not Work In Safari But Works In IE
Please help:
I used the load movie behavior in my swf file. When I test the button in Safari, the link does not work. However, it works in Internet Explorer. Why could this be.
This is the script I used:
on (release){
loadMovieNum ("
Flash Site Does Not Work In Safari Or Firefox
Hello. I did a quick search for this and didn't find an answer. Sorry if it is a stupid question or has been answered before.
I created a site of couple years ago in Flash. Here it is: www.peetfetsch.com
I hadn't looked at it for a while. I found out recently that it doesn't work in Safari or Firefox. The site is a portfolio site for my graphic design work. I have simply created a long jpeg and by clicking the bottom titles the image scrolls to the appropriate section of the jpeg.
What is happening, though, is that there is only a red block where the projects should be.
What gives? Is there any way around this?
I am using actionscript function to scroll the clip_mc back and forth. Would this have anything to do with it?
Does it have something to do with the types of images I am using? JPEGs, etc?
Is there a way to save the .swf that would help?
I'm frustrated.
BTW, my knowledge is enough to be dangerous. In other words, I don't really know what I'm doing.
If anyone has any suggestions, I'd love to hear 'em.
Thanks y'all.
Preloader Doesn't Work Right In All Browsers But Safari
I have this preloader that takes a long time to start moving. It stays stuck on 0% for a long time, and then starts moving. The browsers that I tested this in are Firefox (win and mac), IE (win), mozilla (win), camino (mac) and the only one that works, Safari (it also works correctly in flash when testing the movie but that doesn't really count). I attached all of the code that's on the first frame of my movie. You can also see it in action here.
I'm not sure what else to say. Thanks for any help.
Attach Code
stop();
//music
_root.createEmptyMovieClip("music_mc", 1);
music_mc.music1 = new Sound(music_mc);
_root.music_mc.music1.loadSound("music1.mp3", true);
_root.music_mc.music1.stop();
music_mc.music2 = new Sound(music_mc);
_root.music_mc.music2.loadSound("music2.mp3", true);
_root.music_mc.music2.stop();
_root.music_mc.music1.onSoundComplete = function()
{
_root.music_mc.music2.start();
}
_root.music_mc.music2.onSoundComplete = function()
{
_root.music_mc.music1.start();
}
//game
var gameLoader:MovieClipLoader = new MovieClipLoader();
//used to laod clip and broadcast events
var gameListener:Object = new Object();
//generic object that will listen to movieClipLoader events
gameLoader.addListener(gameListener);
//any events from the MCL are sent to the addListener function
_root.createEmptyMovieClip("container_mc",this.getNextHighestDepth);
gameLoader.loadClip("ship.swf", "container_mc");
var percent:Number = 0;
var total:Number = 0;
var loading:Number = 0;
var percent:Number = 0;
gameListener.onLoadProgress = function()
{
loading = container_mc.getBytesLoaded();
total = container_mc.getBytesTotal();
percent = int((loading/total) * 100);
percent_txt.text = percent + "%";
_root.loadBar_mc._width = percent;
if (loading >= total)
{ _root.gotoAndPlay(2); }
}
Why Does My On Clip Event Pop Up Windown Not Work On Safari?
I'm using the following code...and it automatically launches a pop up with firefox and IE, but on safari, it don't work. What is going on? Any work around for this?
onClipEvent (load) {getURL ("javascript:NewWindow=window.open('southafrican.h tml','newWin','width='+screen.availWidth+',height= '+screen.availHeight+',left=0,top=0,toolbar=No,loc ation=No,scrollbars=No,status=No,resizable=No,full screen=No'); NewWindow.focus(); void(0);");
}
on (release) {
getURL ("javascript:NewWindow=window.open('southafrican.h tml','newWin','width='+screen.availWidth+',height= '+screen.availHeight+',left=0,top=0,toolbar=No,loc ation=No,scrollbars=No,status=No,resizable=No,full screen=No'); NewWindow.focus(); void(0);");
}
Video+XML Doesn't Work In Explorer And Safari
Hey,
I did a video player (XML feed) and it works perfectly (or almost, the loadBar doesn't work yet) in the Firefox. But for some reason it doesn't work in Explorer and Safari.
I've tried to change the AS, the XML, to export an older version, test in other computers. Always the same problem.
The test link: http://www.arpx.com.br/teste.html (click on 'PUBLICIDADE')
Does anyone know what's happening?
Thanks, thanks, thanks . abstrato
Here's my video player AS2 code:
Code:
//// VIDEOBOX ////////////////
videoBox = function (mcTarget:MovieClip) {
mcTarget.videoBarMC.loadBarVideoMC._width = 0;
mcTarget.videoBarMC.progressBarVideoMC._width = 0;
mcTarget.videoBarMC.scrubberVideoMC._alpha = 0;
mcTarget.videoBarMC.dragScrubberMC._alpha = 0;
//
//////// VIDEO SETTINGS
var videoConnection:NetConnection = new NetConnection();
videoConnection.connect(null);
var videoObject:NetStream = new NetStream(videoConnection);
mcTarget.videoContainer.attachVideo(videoObject);
var videoPlaying:Boolean = true;
//
//////// XML
var contentXML:XML = new XML();
contentXML.ignoreWhite = true;
contentXML.load(XMLfile);
contentXML.onLoad = function(ok) {
if (ok) {
var video:String = contentXML.childNodes[0].childNodes[i].childNodes[0].attributes.mediaFile;
videoObject.play(video);
//
mcTarget.arrowBackwardMC.onRelease = function() {
videoObject.close();
this._parent.videoBarMC.loadBarVideoMC._width = 0;
this._parent.videoBarMC.progressBarVideoMC._width = 0;
videoDuration = 0;
amountLoaded = 0;
videoArrowBackwardRelease(this);
};
}
};
//
//////// BUFFER
videoObject.setBufferTime(5);
videoObject.onStatus = function(info) {
if (info.code == "NetStream.Buffer.Full") {
mcTarget.bufferIconMC._visible = false;
}
if (info.code == "NetStream.Buffer.Empty") {
mcTarget.bufferIconMC._visible = true;
}
//
if (info.code == "NetStream.Play.Stop") {
mcTarget.stopMC.onRelease();
mcTarget.bufferIconMC._visible = false;
}
};
//
//////// INTERVALS
var amountLoaded:Number;
var barsMaxWidth:Number = 300;
var intervalValue:Number = 10;
//
var videoDuration:Number;
videoObject["onMetaData"] = function (v) {
videoDuration = v.duration;
};
//
function videoStatus() {
amountLoaded = videoObject.bytesLoaded/videoObject.bytesTotal;
mcTarget.videoBarMC.loadBarVideoMC._width = amountLoaded*barsMaxWidth;
mcTarget.videoBarMC.dragScrubberMC._x = videoObject.time/videoDuration*barsMaxWidth;
mcTarget.videoBarMC.progressBarVideoMC._width = mcTarget.videoBarMC.dragScrubberMC._x;
if (mcTarget.videoBarMC.dragScrubberMC._x<1) {
mcTarget.videoBarMC.progressBarVideoMC._width = 0;
}
}
var videoInterval = setInterval(videoStatus, intervalValue);
//
var scrubberInterval;
function scrubberWorks() {
videoObject.seek(Math.floor((mcTarget.videoBarMC.dragScrubberMC._x/barsMaxWidth)*videoDuration));
mcTarget.videoBarMC.progressBarVideoMC._width = mcTarget.videoBarMC.dragScrubberMC._x;
}
mcTarget.videoBarMC.scrubberVideoMC.onPress = function() {
clearInterval(videoInterval);
scrubberInterval = setInterval(scrubberWorks, intervalValue);
mcTarget.videoBarMC.dragScrubberMC._x = this._xmouse;
mcTarget.videoBarMC.dragScrubberMC.startDrag(false, 0, mcTarget.videoBarMC.dragScrubberMC._y, barsMaxWidth, mcTarget.videoBarMC.dragScrubberMC._y);
};
mcTarget.videoBarMC.scrubberVideoMC.onRelease = mcTarget.videoBarMC.scrubberVideoMC.onReleaseOutside=function () {
videoInterval = setInterval(videoStatus, intervalValue);
clearInterval(scrubberInterval);
mcTarget.videoBarMC.dragScrubberMC.stopDrag();
};
//
//////// AUDIO SETTINGS
mcTarget.createEmptyMovieClip("videoSoundContainer", mcTarget.getNextHighestDepth());
mcTarget.videoSoundContainer.attachAudio(videoObject);
var videoSound:Sound = new Sound(mcTarget.videoSoundContainer);
videoSound.setVolume(100);
//
//////// BUTTONS ACTIONS
mcTarget.playPauseMC.onRelease = function() {
videoObject.pause();
if (videoPlaying == true) {
this.gotoAndStop("playOverFrame");
videoPlaying = false;
} else {
this.gotoAndStop("pauseOverFrame");
videoPlaying = true;
}
};
mcTarget.playPauseMC.onRollOver = function() {
if (videoPlaying == true) {
this.gotoAndStop("pauseOverFrame");
} else {
this.gotoAndStop("playOverFrame");
}
};
mcTarget.playPauseMC.onRollOut = mcTarget.playPauseMC.onReleaseOutside=function () {
if (videoPlaying == true) {
this.gotoAndStop("pauseFrame");
} else {
this.gotoAndStop("playFrame");
}
};
//
mcTarget.stopMC.onRelease = function() {
mcTarget.playPauseMC.gotoAndStop("playFrame");
if (videoPlaying == true) {
videoObject.seek(0);
videoObject.pause();
videoPlaying = false;
} else {
videoObject.seek(0);
}
};
mcTarget.stopMC.onRollOver = function() {
this.gotoAndStop(2);
};
mcTarget.stopMC.onRollOut = mcTarget.stopMC.onReleaseOutside=function () {
this.gotoAndStop(1);
};
//
mcTarget.volumeMC.onRelease = function() {
if (videoSound.getVolume() == 100) {
this.gotoAndStop("muteOnOverFrame");
videoSound.setVolume(0);
} else {
this.gotoAndStop("muteOffOverFrame");
videoSound.setVolume(100);
}
};
mcTarget.volumeMC.onRollOver = function() {
if (videoSound.getVolume() == 100) {
this.gotoAndStop("muteOffOverFrame");
} else {
this.gotoAndStop("muteOnOverFrame");
}
};
mcTarget.volumeMC.onRollOut = mcTarget.volumeMC.onReleaseOutside=function () {
if (videoSound.getVolume() == 100) {
this.gotoAndStop("muteOffFrame");
} else {
this.gotoAndStop("muteOnFrame");
}
};
};
////
videoArrowBackwardRelease = function (mcTarget) {
removeMovieClip(mcTarget._parent);
//
_parent._parent.menuItensHolderMC._visible = true;
_root.arrowBackwardMC._visible = true;
_root.arrowBackwardMC.gotoAndStop(2);
//
if (_root.arrowForwardMC._visible == false) {
_root.arrowForwardMC._visible = false;
}
if (_root.arrowForwardMC._visible == true) {
_root.arrowForwardMC._alpha = 100;
_root.arrowForwardMC.enabled = true;
}
};
Does The Math.Random() Work Differently In Firefox And Safari?
Hello,
I was wondering if anyone can help me with a problem I'm running into using the math.random(). I'm using Flash CS3 and created a very simple script to select random frames in a simple movie. It works as expected in the CS3 environment and in Safari but it doesn't work correctly in Firefox or in the DotNetNuke module I am using. Here is the code:
i = Math.ceil(Math.random() * 3);
gotoAndPlay("Image"+i);
I would appreciate any help you can provide.
Source Code
Is there a tutorial I've somehow missed explaining how to find the source code to the flash submissions. I'd like to experiment with them but the code does not seem readily available to do so.
Source Code
hi
can anyone tell me how i view the source code for my own .fla file?
im doing a project for university and want to put the code in the appendix.
this is probably a very basic question but i cant find it anywhere.
thanks
Source Code...
i know view source lets you view HTML...
but is there a way to view the actionscript code that's on a site online?
Getting Source Code From
Hi,
I've just started at this new company as a programmer. the company has a website... the website has CFML (Cold Fusion code), html, javascript, css etc... and it has flash images/animations... there are swf (compiled flash) files... the programmer who worked here before - didn't leave the source code of the flash animations... the flash animations are real simple... they're hardly even animations, they're really just flashy images... the problem is we need to make changes to the flash image... i was wondering if there were tools out there - or a way to get the source of the flash back from its compiled (swf) files.... is there such a thing possible... we'd be happy to pay for use of such a tool - we have about 25-30 such images that we need to "de"-compile .... would really appreciate your help! i don't think it would be illegal, or immoral to do this in this case, as the programmer really should've left the source code back - as it belonged to the company....
Thanks...
Protecting Source Code?
Awrighty guys got a Question.
I am about to complete what I think to be one of my best pieces of Flash work(Flash website AS Driven). Now we are all aware of these progs that allow you to sniff and rip **** from swf's This is not good for us developers, LaMeRs DIE!
Anyway I have a **** load of code in my swf, Trying to complete a site were all animation in the site is done through action script. I want to protect my code. I remember reading a post somewhere a few months back about some piece of code that can be put in the first frame of the movie. The code somehow scrambles the AS in the movie so that it is not readable in Action script viewer progs.
Can anyone comment on this or give me an idea on how I can protect my code.
cheers
Hide Source Code?
Hi there:
I'm quite a novice, so forgive if this is a dumb question... I would like to hide the source code on my flash file.
I guess this is somewhat of a 2-part question. First, in order for my file to be my web site, I have uploaded the .htm file as my "index" page. But for some reason, I thought that Flash files didn't show the source code??
Is this question making any sense??
My web site is: www.JudyMcDonough.com, in case you need to know that.
Thanks for any input.
Judy :-)
Flash Source Code
Hey first post and probably a silly question.
Im trying to make a quiz game for my website. I found one that im allowed to alter the way I want to.
My question is would it be possible to add text in the source itself or would that be bad.
How do i get the flash files source code up on the screen ?
Stupid question
Daniel
Flash Source Code
Hi all
I am a freelancer, and have just completed an online gambling game for a games company. They in turn were commission by one of the major online gambling companies in the UK.
The development cost came to around £7000.00
Now the studio that commissioned me wants to buy the source code from me. They have similar games the want to develop but obviously want to re-skin the other games in-house, which would be cheaper.
How much is source code worth? I have no idea what to ask for it. Obviously there will be a loss of revenue for me in that I will not get the re-skinning or upgrading work from them so I need to compensate for that.
Any ideas?
Cheers
P.
Chess Source Code?
Anyone know where I can find source code for an action script based chess game?
Help About My Website With My Source Code Plz.
Hi there, I am creating the loading scene now, and wish can let the
instance named "hole" (plz check the hole layer) fading out after "frame number 43"(loading process done), I've been trying lots of way but still can't figure out. Can
someone help me out plz? (I wish I can use AC to solve it cauz I am
practicing it now) Thanks.
The file has two scenes, Loading part is on first scene.
My source code is in below.
Flash On Mac OS X Source Code ?
I am trying to edit the source code for my site on my Mac. But it won't let me edit it in Explorer or Safari. It works just fine on my PC in Explorer but is uneditable on my Mac. Am I missing something?
Edit Source Code. Help Anyone?
Was wondering if anyone knows how to edit the source code on a Mac. When I view the source code in Safarri or Windows Explorer it won't let me edit the code. But I can edit it on a pc in Exlorer only. Any suggestions?
Protect AS 2 Source Code
What is the best way to protect the source code in a .as file? Right now if you access the .as in a web browser the source code is displayed. The problem is that when the .swf file is loaded on the client's machine, so is the .as file. I'm sure there are third party applications that could help do this. I'm open to any suggestions. Thanks for your time. I appreciate your help!
[MX04] The Source Code
Does anyone has any idea why the source code of this app cannot be opened 4 me ?
Is it because of the version I'm using MX04!
If yes, could you tell me how to code it using my version?
click here
Source Code For NetConnect?
I've been reading the source code for the Flash Remoting Components which is found here:
http://www.adobe.com/products/flashr...nents/#flr_as2
Connection.as extends NetConnection.as which appears to be a class native to Flash. The source code for it is not included with the download and I can't find the source for it on my hard drive anywhere. I searched my entire hard drive and found two classes that appear to be just interfaces -- they don't do anything (see below). Where is the source for the NetConnection class?
I also found a file called NetConnection.aso which appears to be some kind of compiled binary file. I'm guessing the functionality is inside it.
Where can I found out more about what this does?
// C:Program FilesMacromediaFlash MX 2004enFirst RunClassesNetConnection.as
Code:
intrinsic class NetConnection extends Object {
var isConnected:Boolean;
var uri:String;
function getDebugConfig( id ):NetDebugConfig;
function getDebugID();
function getService( serviceAddress, responder ):Object;
function setCredentials( principal:String, password: String ):Void;
function setDebugID( id ):Void;
function trace( obj ):Void;
function connect(targetURI:String):Boolean;
function close():Void;
function call(remoteMethod:String, resultObject:Object):Void;
function addHeader();
function onStatus(infoObject:Object):Void;
function onResult(infoObject:Object):Void;
}
C:Documents and SettingsJaitheLocal SettingsApplication DataMacromediaFlash MX 2004enConfigurationClassesNetConnection.as
Code:
//****************************************************************************
// ActionScript Standard Library
// NetConnection object
//****************************************************************************
dynamic intrinsic class NetConnection
{
var isConnected:Boolean;
var uri:String;
function NetConnection();
function addHeader();
function call(remoteMethod:String, resultObject:Object):Void;
function close():Void;
function connect(targetURI:String):Boolean;
function onResult(infoObject:Object):Void;
function onStatus(infoObject:Object):Void;
}
Protecting Source Code?
Awrighty guys got a Question.
I am about to complete what I think to be one of my best pieces of Flash
work(Flash website AS Driven). Now we are all aware of these progs that
allow you to sniff and rip **** from swf's This is not good for us
developers, LaMeRs DIE!
Anyway I have a **** load of code in my swf, Trying to complete a site were
all animation in the site is done through action script. I want to protect
my code. I remember reading a post somewhere a few months back about some
piece of code that can be put in the first frame of the movie. The code
somehow scrambles the AS in the movie so that it is not readable in Action
script viewer progs.
Can anyone comment on this or give me an idea on how I can protect my code.
cheers
Source Code Rights
A friend wants me to update his site. The designer, however, is trying is trying to charge him for access to the source code. Is this legitimate? Doesn't paying for the site include access to the original documents unless otherwise stated or is that visa versa, you don't get access unless you specifically state that? Very curious as to what is the semi-legal, or least etiquette, standard here.
FLV Player Source Code
Hey guys
i decided let other ppl download my ADOBE AIR FLV player source code for free
Click 2 view the post on my blog.
www.thivy.com
If u have any questions leave comment on my blog, i dont check forum replies.
thanks
thivy
|