Working With Frames
I dont have a window for the URL and Window settings in the Action-Button menu. how do i display them?
KirupaForum > Flash > Flash 8 (and earlier) > Flash MX 2004
Posted on: 09-09-2006, 10:40 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
About Working With Frames
Hello,
I have this question. I have a MovieClip and I placed all the onClipEvent handlers on frame 1. I use almost all of those handlers - onClipEvent (load), (data), (mouseDown), (mouseMove), (mouseUp), (enterFrame). The code is really long and my Flash movie works rather slow. That's a problem for me. So, the questions is - is it worth trying to cut the code into pieces and put those pieces on different frames? Will the movie work faster?
Thanks.
'get URL' & Working With Frames?
Hello out there,
I am having trouble using flash buttons in a website I am updating/putting together.
I want to use flash buttons inside a frame bar on the left side of my webpage that control which page of my site is displayed in the BODY frame of my webpage.
LIST BODY
_ _ _ _ _ _ _ _
| b | |
| b | |
| b | |
| b | |
| b | |
_ _ _ _ _ _ _ _
b=button
If the buttons were just images or links I could tell them in Dreamweaver to open the URL in the 'Target': BODY
What I am trying to figure out is what actionscript I need to put inside my Flash buttons to open the URL i want inside the 'BODY' frame off my site???
Hopefully it can be done in Flash!?
Any insight would be a huge help, thanks.
DGates
P.S.
I have tried this:
on (release) {
getURL("page03.html", _parent.BODY);
}
- It did not work!
'get URL' & Working With Frames?
Hello out there,
I am having trouble using flash buttons in a website I am updating/putting together.
I want to use flash buttons inside a frame bar on the left side of my webpage that control which page of my site is displayed in the BODY frame of my webpage.
If the buttons were just images or links I could tell them in Dreamweaver to open the URL in the 'Target': BODY
What I am trying to figure out is what actionscript I need to put inside my Flash buttons to open the URL i want inside the 'BODY' frame off my site???
Hopefully it can be done in Flash MX (which I am using)!?
Any insight would be a huge help, thanks.
DGates
P.S.
I have tried this:
on (release) {
getURL("page03.html", _parent.BODY);
}
- It did not work, it still opens page03.html inside the frame with the buttons!
Get URL Not Working On Frames
Is it just me or is there a problem with geting a flash menu to open a new page in a different frame. I swear I have tried everything to get this to work. I have used different versions, made the frame reference an expression, used " quotes and ' quotes. Evertime te page just opens as a new one. I have tried on explorer new and old versions and firefox. I know it has worked in the past but for some reason i can't get it to work now. Am I doing something wrong??? HELP!
I am using a very simple layout with two frames 'menu' and 'body'.
Flashtrated
Get URL Not Working On Frames
Is it just me or is there a problem with geting a flash menu to open a new page in a different frame. I swear I have tried everything to get this to work. I have used different versions, made the frame reference an expression, used " quotes and ' quotes. Evertime te page just opens as a new one. I have tried on explorer new and old versions and firefox. I know it has worked in the past but for some reason i can't get it to work now. Am I doing something wrong??? HELP!
I am using a very simple layout with two frames 'menu' and 'body'.
Flashtrated
[F8] Variable's Working On Other Frames.
Here is my problem.
I have all of my scripting on an actions layer on frame 1. This includes variables and other things that are used on every frame. Its my main coding.
For some unknown reason, if statements that include my variables do not work. Well when I say they do not work I mean if I change the variable number on a different frame by using a button for example it wont do what I say. Here is an example.
Frame 1 script.
if(money < 0) {
flashingAlert.gotoAndPlay(2);
}
This script will only work if the variable is below 0 to start off with, in the script.
If I have a button that says:
money -= 10
and this script drops the money variable to below 0, it wont work.
What do I need to add to my script so that this does work and I can get the script to work on every frame?
Working With HTML Frames
What code would I use on a flash button in a frame of an html page to link to an html page in another frame?
Target Frames... Not Working...
Hello,
I have had this problem for awhile now and I was wondering if anyone had any workarounds or help on this. I created a webpage for a school and it contains both a flash site and a DHTML site. I have 3 frames in the flash version. One of which is called contframe and this where all the links are to be loaded into. In flash i used the getURL function and specified a target and all. In IE 6 MS Win XP Pro the first link on both version will always load into the correct frame. (Or so I think). However after ~3 links + or - a few, the links begin to load into new windows. This is very annoying for the visitors and me alike. However this problem isnt present in Netscape or Mozilla (same thing I know...). Has anyone experienced this before? If so are there any work arounds. I could just not use frames at all but that would involve creating 2 entirely different versions of the site and it would make it more difficult to update and maintain. The webpage is available here: http://www.claytonarts.org .
Please Help,
-Ramon
GetURL Javascript Not Working In Frames
I have a flash movie that has to be in flash 5 (ungh).
It is in a page with two frames.
The frameset and the content in each of the frames are generated by JSPs, to which I have little access.
I cannot get the movie to properly call a javascript function from one of the frames when I target it to any of the frames in that frameset. If I target a new window like '_blank' it works fine.
for example, this does not work:
getURL("javascript:alert('TEST!')","_self");
but this works fine:
getURL("javascript:alert('TEST!')");
When I hit the by itself, outside of the frameset, it works fine.
When I view source, and take the HTML code generated by the JSPs, then save them locally on my machine, the flash and the javascript work fine, even in the frameset.
So, for some reason the javascript can't target the page it comes from when they are built with the jsps.
Some wierd stuff that the site does:
The JSPs that build the frameset and the top frame are on one server, and the JSP that builds the frame with the flash is on a different server (both local). There are 2 JSPs that build the frame with the flash, the first builds a session variable, then adds it as a parameter to the jsp that builds the actual page.
Well, that is a lengthy explanation, but I am sure that it still isn't sufficient info.
Has anyone ran into a similar problem and found what caused it?
Varables Going To Certain Frames In My Clip Not Working
I'm not sure if I'm going to get an answer to this, because someone posted a similar question previously, and didn't get a usable response, but here goes:
Ok, here's my situation. I have a movie clip, and on each of the frames, I have a variable called _global.drunkness. On the first eight choices, _global.drunkness = "3";, while on the ninth choice, _global.drunkness = "2";, the tenth has _global.drunkness = "1";, and the last choice, has _global.drunkness = "0". (invisable buttons on the root level is how the choices are made, btw, but thats neither here nor there, I dont think) on the Past all the choices in my clip is the "judgement" frame with the following code
if (_global.drunkness = "0") {
gotoAndPlay("none")
} else if (_global.drunkness = "1") {
gotoAndPlay("1drinkfemale")
} else if (_global.drunkness = "2") {
gotoAndPlay("2drinkfemale");
} else if (_global.drunkness = "3") {
gotoAndPlay("highrisk");
}
and beyond that are frame markers with the movie clip underneath it that plays based on your choice.
No matter what they choose, the movie always goes to the "none" choice. I have the movie trace(_global.drunkness) on every choice, and it comes up with the right number.
Action Script Not Working In Next Frames
Hi,
I have multiple mc's that are animated by motion tween one after the other.
On the top layer in the first frame I have some actionscript for every mc triggering the movie to stop and show some text information if one of the mc's is clicked.
What is very strange is that this actionscript is working only for the first mc.
As soon as the next mc comes up nothing happens anymore...until the movie gets back to the first frame.
The AS goes all the way through the movie though...
Is this normal???
Copy Multiple Frames Not Working
Hello, I am trying to copy multiple frames, and in the flash file I need to do it in, it just won't give me the option (its greyed out in Edit). Anyone know why this might be, or some tricks to fool flash into working properly? Any assistance would be greatly appreciated, thanks.
Working With Swish Menu Buttons And Frames
I am trying to create a frontPage 2002 banner and content frames page with swish (swf) buttons as permanent menu in the left frame. The problem I am having is that I can not get the linked page to open in the main frame and there doesn't seem to be a way to control the web component in FP once it is placed.
Any help would be appreciated
Thanx
Buttons In Other Frames Not Working:error #1009
Hi I have a movie called 'content_mc' which contains 3 frames.
On frame 3 is a button called (its instance name) 'exit_btn'.
When I try and add a listener to the button using
ActionScript Code:
content_mc.exit_btn.addEventListener(MouseEvent.CLICK, exitClick);
I get:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
My buttons are on frame 3 as I have created a tab interface. When I put the buttons on frame 1 they seem to work ok. I need them on frame 3 however for the tabs.
From reading around, Im sure its because I am trying to reference something that isnt already loaded. The question is how do I load them on frame 1(or whatever) so my code can access them in the document class for the main movie.
thanks all,
[F8] Okay Loading Html Frames From Flash Isnt Working
on (release) {
getURL("contact.htm", "yes");
}
it works for a sec when i publish it in flash 6...
but thats only localy...what the hell is going on?
i tried changing the frame name and that doent work either
i know there are other threads on this but i have yet to find a solution....help me obe one kinobi ur my only hope lol
[MX04] Working With Flash Button And Html Frames
Here is the website template I'm customizing.
http://cothonline.com/pastordlm/
I need to stop the browser from opening a new window everytime the navigation buttons are clicked. They need to open in the center frame beneath the flash navigation file instead. What is the appropriate flash actionscript ( geturl ) that I need to use for this?
*I also attached the flash navigation file below.
[F8] Flash Menu Not Working Correctly With Html Frames
I built an html website with 3 frames. In the top frame I have a flash header and menu which calls different html pages into the main frame of the website.
The site works just how I want it on my testing server at
http://site-boutique.com/diane/index.html
You click "about us" on the menu, the about us page loads in the bottom frame. I'm using the following actionscript for the different buttons:
getURL("aboutus.html", "mainFrame", "POST");
So I just posted the exact same website live at it's new host http://sdcondosdowntownspecialists.com/
As you will see, if you click the "about us" button, a "Method Not Allowed" error screen populates the main frame instead of the "aboutus.html"
I talked with the hosting company and they said it was a scripting error though I don't know why it would work fine on one server and not the next.
If anyone has any suggestions to what might be the problem, I'd be greatly appreciative seeing this is a time-sensitive issue.
Puzzled On Frames Loaded And Total Frames Calculation Issue
The Goal:
I am trying to find out if the last frame of a loaded swf has been completed so I can then unload that swf and replace it with another swf.
The Process:
I have on the main time line a MC called movie1. (The main time line is only one frame long)
In the first frame on the main time line I have the following code:
---- start code ----
loadMovie("test/test_movie.swf", "movie1");
if (_root.movie1.framesloaded=_root.movie1.totalframe s) {
getURL("javascript:alert("Frames Fully Loaded")");
} else {
gotoAndPlay("Scene 1", 1);
getURL("javascript:alert("Frames Not Loaded")");
}
---- end code ----
This code will load and play the movie into the MC and gives me an alert that the "Frames Not Loaded". Thats great because it means I am loading the movie correctly and testing the total frames correctly. But I need to know when the last frame of the loaded swf has played so I can then load another. Even if I take out the else statment in my testing code I still can't get it to tell me when all the frames are loaded.
Any help would be great.
Thanks
Looping Frames X-y For 'z' Amount Of Times Then Proceeding To Frames After Loop
Hi,
I'm relatively new to Flash and have not done much work with the AS. I was hoping someone here could enlighten me on an area which has been stumping me.
I need to know how to loop (for example) frames 1 to 5, 4 times then continue to frame 6 until the last frame, then go back to frame 1, thus re-entering the loop, etc. I do believe it would involve something like this... but then again I'm a newbie to this so... what do I know (which is why I wanna learn)
Frame 1:
i=0
Frame 5:
i=i+1
if (i>4) {
gotoAndPlay(6);
} else if (i<4) {
gotoAndPlay(1);
}
Thanks so much
Looping First 38 Frames 7 Times, Then Playing The Whole 76 Frames And Stopping
Hi Guys, I have a movieclip that the first half has one set of movements, but the second half changes. I want to be able to loop this movieclip (instance on the root), so that it plays the first 38 frames 7 times...i.e., loops 7 times, and the 8th time, it plays the whole clip, then stips...the movie is 76 frames long.
I know it's going to be...make i=1 first time...add 1 to i each time...and if i=7, then play past frame 38...and put a stop(); at the end of the movie, but i don't know how that code would look, if I could please ask for more...basic (ugh...) help...
In other words, how do I write this (pseudocode) in AS:
i=1
play frames 1-38
i=i+1
if i is less than 8, play frames 1-38
if i is more than 7, play the whole movieclip, all 76 frames
Shawn
How To Repeat A Group Of Frames Without Adding A Million Frames?
Hello,
I have made a small flash intro using Flash MX 2004 Professional. The intro is about 3 seconds long. Here's what I want to do:
I want to add a few frames to the intro where I add things shooting through randomly, and I need these few frames to repeat themselves while keeping the main intro sort of paused in the background... How would I do this? How would I "pause" the background without adding a million frames? And is there some way that I can loop a group of frames? Please respond as "newbish" as possible so I can understand
Thank you!
Copy Frames Paste Frames... File Size.
Sooo I have a bunch of vector art I imported from swift3d and than I want to reverse the animation later on in the project so I copy the frames and than I paste them then I use the reverse frames option.... When I compile it doubles the size when I compile.... I know that maybe I should expect this. But if the symbols are already in the library why doesnt flash just use those symbols again and not increase in size?'
I hope this makes sense thanks in advance
Film Frames To Flash Frames
I want to make some small animations and in order to capture movement and forms 'correctly' I want to use digital video.
I would then turn up the contrast to define the form and shapes and then trace in flash or freehand. Hereby creating a frame by frame animation.
OK that's an idea, how do I do that the best way? (and quick?)
Move All Clips For 30 Frames ? Can't Use "copy Frames" Why ?
Hi
I have a animation with masks, movieclips loads of keyframes...all in all about 25 layers.
How can I insert at the beginning in every layer for example 30 emty frames ?
Another thing:
I tried to make a movieclip out of this animation because I don't want to handle all these layers but it doesn't work. The option "copy frames" is not active. Why ?
Thanks a lot for help.
cheers
Stefan
Replacing Frames With Other Frames
I would like to know if it's possible to replace existing frames with other frames. In my case I have made an animation of a talking guy with text appearing over him, but at some point he stops talking and I forgot to insert the frames where his mouth is closed, so I'm stuck with no text but a mouth that is moving anyway. I would like to replace the sequence of 'moving mouth frames' with a sequence of 'closed mouth' of the same length.
Thanks in advance guys.
Flash MX TabIndex Only Working With Text Fields, Movies And Buttons Not Working :(
hey, has anyone heard of this, is it a known bug, or am i doing something wrong?
im using the following code to tab index a page, with text fields, buttons and movies that i would like to highlight to the visitor.
arrTabIndex = new Array("butAddress", "movEmail", "txtCC", "txtTelephoneNumber", "txtMobileNumber", "txtSubject", "txtSubject", "txtRealName", "txtBody");
for (var Count = 0; Count < arrTabIndex.length; Count++) {
eval(arrTabIndex[Count]).tabIndex = Count;
//eval(arrTabIndex[Count]).tabEnabled = 1;
//eval(arrTabIndex[Count])._focusrect = 1;
}
my problem is, that if i include movie clips or buttons, the first in the series does focus and show the colored square but the tab key does not move the focus to the next object.
if i only include text fields, the tab key works as normal
is this a bug, or am i doing something wrong?
many thanks, in advance
clive
LoadMovie - Working In Debug Mode, Not Working Otherwise
Hello,
I have a main swf, which must load other 2 swfs (PHP data involved).
I made it work in debug mode, but in normal mode, a movie is not loading at all. What should I check to find the problem?
(the paths are OK)
I would be really thankfull if someone could help soon.
Thanks
Site Working Perfectly In A Server, Not Working In Other
Hi
I have a strange problem with a site I've done recently. It works perfectly in one server, but the same files don't work properly in some other server(both servers are Linux). The site loads correctly and all, and it runs fine for a while, but after you have clicked the buttons of the menu for 5 o 6 times the buttons doesn't load anything anymore. The rest of the movie runs fine, it's only the buttons that are supposed to load the sections (external swfs) that just do nothing.
See it for yourself:
Here the site works as it should:
http://www.avanzasoluciones.es/celeste
Here the buttons stop working after a while:
http://www.limpiezasceleste.com
I'll be glad to answer any question you may have regarding the coding of the site or anything that may lead to a solution.
Thanks for your time
Contact Form Not Working In IE But Working In Mozilla
got a problem that I just can't figure out.
I have a feedback that was working fine. Key word "was".
I added a frame in the form MC to include a Thank You screen. But then it stopped sending in IE, but works in Mozilla.
I tried taking the extra frame out but still doesn't work in IE anymore.
any suggestions?
button
Code:
on (release) {
form.loadVariables("email.php", "POST");
}
script on the php page
Code:
<?php
$sendTo = "alvin@diggy.com.au";
$subject = "Gisler contact";
$headers = "From: " . $_POST["name"] ." <" . $_POST["email"] .">
";
$headers .= "Reply-To: " . $_POST["email"] . "
";
$headers .= "Return-path: " . $_POST["email"];
$message = "Phone:" . $_POST["phone"] ."
Country: " . $_POST["country"] ."
Message: ".$_POST["message"]." ";
mail($sendTo, $subject, $message, $headers);
?>
Fading Text Only Half-working (so It's Not Working At All)
Here's one for ya...I'm making some fading text. I made a movie clip of the text and did the alpha tweening and all that, and when I play the clip on-stage, it works perfectily. However, when I run a movie test, the text does not fade in but rather just suddenly appears. This is also the condition when the graphic is loaded onto a webpage. Has anyone else seen this happen before and can tell me why this is happening? Thanks.
Full Screen Tiling Working, But Not Working Right?
am using bitmapdata to make me a nice lil' background image, and it works great...until it's resized. Whats happening is it's creating a new bgHolder clip on the resize, NOT resizing the current empty clip "bgHolder"
Here's the code(taken from various posts)
import flash.display.BitmapData;
#include "mc_tween2.as"
Stage.align = "TL";
Stage.scaleMode = "noScale";
var myListener:Object = new Object();
myListener.onResize = function() {
createBG();
};
Stage.addListener(myListener);
var bgHolder:MovieClip = _root.createEmptyMovieClip("bgHolder", _root.getNextHighestDepth());
var BG_LINKAGE:String = "bg";
function createBG():Void {
var tile:BitmapData = BitmapData.loadBitmap(BG_LINKAGE);
with (bgHolder) {
beginBitmapFill(tile);
moveTo(0,0);
lineTo(Stage.width,0);
lineTo(Stage.width,Stage.height);
lineTo(0,Stage.height);
lineTo(0,0);
endFill();
}
}
createBG();
Working Locally - Not Working Online
Having a nightmare with this.
On my project I have made use of both named anchors and frame labels for the navigation - both of which work fine when testing locally, in all browsers.
Problem is, soon as I upload, the frame labels stop working in FireFox, and they only working on 2nd load in IE. Im publishing Player 6, using AS2. The named anchors work great, across the board.
Any ideas?
AS 2 Button Not Working Not Working Properly
I've got a problem with a button dynamically attached to an mc within an as 2 class script. This is the button code:
ActionScript Code:
this.mc.butt.onRelease = function(){
current=true;
this._parent.checkFocus();
}
this code is inside the class constructor while current is declared at the start of the class and set to false previously in the constructor. The mc is the movieclip attached to the class and butt is the button attached to that. checkFocus is called ok but i'm confused how cos the "this._parent" should reference the "mc" movieclip but this has not got a checkFocus method on it. If i use "this._parent._parent" however, which should be correct, it does not work. I don't know what's up there. Anyway, checkFocus is here:
ActionScript Code:
public function checkFocus(){
for(var mcname:String in _root){
if(_root[mcname] instanceof Layer){
if(_root[mcname].focus==true){
//_root[mcname].gainFocus(20);
_root[mcname].loseFocus(20);
} else {
if(_root[mcname].current==true){
trace("waaahhhhh");
_root[mcname].gainFocus(20);
}
}
}
}
}
the aim of this code is to unfocus the Layer object (this is the name of the class) currently in focus, denoted by its focus attribute being true, and focus the new Layer object that has been clicked on - denoted by its current attribute being true. The currently focused layer is unfocused ok, but the new layer is not focused because, it seems, the change in the current attribute has not happened - there is no waaaaaahhhh coming up! I think this is because i am not reference it properly from within the button event. How can i reference properly from within the button? I've tried using _target and targetPath() but i'm not getting anywhere. I'm pretty sure this is the problem cos things work fine when i declare button events from outside the class, inside the fla. But i'd much rather do things dynamically within the calss if possible. Anyone got any ideas? I've been staring tooooo long at this.
Rollover Working But Rollout Not Working?
i have attached my small fla...
basically i have 5 buttons, each with a rollover and a rollout statement.
when the buttons are rolled over, they tween in scale.
when the buttons are rolled out they are supposed to tween return to normal scale - but for some reason they do not tween, they just pop straigh back into normal size....
any ideas???
AttachMovie Working, CreateEmptyMovieClip Not Working
Anyone have an idea just by quickly looking at this? I know it's taken out of context but I just can't see why it shouldn't work!
ActionScript Code:
// this line aperantly does not create the clips I need within a for loopvar photo:MovieClip = container.photoContainer.slide.createEmptyMovieClip("photo"+i, i+200);// while this line does, any idea why?var photo:MovieClip = container.photoContainer.slide.attachMovie("placeholder", "photo"+i, i+200);
Why Is My Php Email Form Not Working Here, But Working Elsewhere?
Hey everyone,
I wonder if you might be able to answer what is potentially a stupid question..
On this site I created a php email contact form and it's working fine: http://japanese-acupuncture.110mb.com/main.html
The contact form is in the clinic info tab on the side bar.
I've just set up a new site, and I copied the movie clip I used for the above site straight into the new one before adjusting how it looks to fit the layout of the new site. I'm going to use it in two places, and I know that I'll need to duplicate the movie clip for that. The site it's up on doesn't support sendmail, but I'm not worried about that yet.
What I can't figure out is why my text fields no longer let me input text, even though the movieclip is exactly the same as on the above site. The new site address is here: http://www.users.on.net/~davidgardner/
The contact form on the new site is on the 'register for a course now' tab, and on the 'contact us' page.
The only thing I can think of, is that the problem is caused by the contact form being buried in a series of movieclips.
If anyone has any idea what the problem is I'd be very appreciative!
Thanks,
David
I Have Been Working On It For A Week But It Still Not Working
I have this code in the 1st frame::
function mover (velocity, stopper) {
leaderX = _root.spot._x;
leaderY = _root.spot._y;
if (user._x != leaderX || user._y != leaderY) {
deltaX = _root.user._x-leaderX;
deltaY = _root.user._y-leaderY;
dist = math.sqrt((deltaX*deltaX)+(deltaY*deltaY));
_root.user.speed = velocity - stopper;
moveX = _root.user.speed*(deltaX/dist);
moveY = _root.user.speed*(deltaY/dist);
if (_root.user.speed>=dist) {
_root.user.stop();
_root.user._x = leaderX;
_root.user._y = leaderY;
} else {
_root.user.play();
_root.user._x -= moveX;
_root.user._y -= moveY;
}
}
}
//code end
and a ball with these code::
onClipEvent (enterFrame) {
_root.mover(4, 0);
if (this.hitTest(_root.rightbound)) {
_root.rightbound.gotoAndStop(2);
} else {
_root.rightbound.gotoAndStop(1);
}
if (this.hitTest(_root.rightbound)) {
_root.mover(4, 4);
}
}
//code end
and an empty movie clip call spot with this code::
onClipEvent (mouseDown) {
this._x = _root._xmouse;
this._y = _root._ymouse;
}
//code end
I just want the ball to move where ever I click but not to move over or hit the object. I have an square call "rightbound" with 2 frame different in color and test a script. When the ball hit the square , the color of a square does change(frame 2) but the ball still keep going. The question is how would I make it stop when its hit the square?
Strange- Working In V5 Not Working In V6
look in attached mx file
there is simple roll over menu
why working when export like v5 and not workin when like v6
i have one button and one mc subf
on (rollOver) {
_root.subf.gotoAndStop(2);
}
subf movie has 3 frames first and last are empty
midlle has my menu
SendAndLoad Working/Not Working
I have a sendAndLoad connecting to a separate server that works when in testing mode, but not when uploaded to the web. When I change it from a sendAndLoad to just a send, it works.
sendAndLoad in testing mode - WORKS
sendAndLoad online - DOES NOT WORK
send online - WORKS
This seems strange to me. If anything I would think it wouldn't work in the testing mode. Does anyone know what is going on?
Thanks.
Working In Firefox, Not Working In IE 7
Hi,
just basic code. I have an enter page, which includes a flash movie. In flash there's a button, which calls a Javascript, which is in enter page and it opens a new window. Basic stuff. But why does it work in Firefox, but not in IE 7?
Here's the code:
Flash:
function openPopUp()
{
getURL("javascript:Launch('full-screen.html')");
} // End of the function
enterWebsite.bt.onRelease = function ()
{
openPopUp();
};
HTML / Javascript:
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function Launch(page) {
OpenWin = this.open(page, "", "toolbar=no,menubar=no,location=yes,scrollbars=no,resizable=yes,width=screen.width,height=screen.height");
}
// End -->
</SCRIPT>
THX for your help
LoadClip Working And Not Working
I have a ver simple loadClip that loads a picture. I noticed that if I execute the same SWF several times, sometimes the loadClip works, sometimes it doesn't without giving me any sort of error message. Here's the code.
Attach Code
var mcLoader:MovieClipLoader = new MovieClipLoader();
var mclListener:Object = new Object();
mcLoader.addListener(mclListener);
mclListener.onLoadStart = function(mc:MovieClip)
{
// Show ProgressBar
};
mclListener.onLoadError = function(mc:MovieClip, errorCode:String)
{
mx.controls.Alert.show("Error!", "ERROR", Alert.OK, null, null, "Warning", Alert.OK);
}
mclListener.onLoadProgress = function(loadedBytes:Number, totalBytes:Number)
{
// Update ProgressBar
}
mclListener.onLoadComplete = function(mc:MovieClip)
{
// ProgressBar disappears
}
mclListener.onLoadInit = function(mc:MovieClip)
{
mc._x = 0;
mc._y = 0;
mc._width = Stage.width;
mc._height = Stage.height;
mc._alpha = 100;
}
mcLoader.loadClip("image.jpg", _root.myMC);
LoadClip Working And Not Working
I have a ver simple loadClip that loads a picture. I noticed that if I execute the same SWF several times, sometimes the loadClip works, sometimes it doesn't without giving me any sort of error message. Here's the code.
Attach Code
var mcLoader:MovieClipLoader = new MovieClipLoader();
var mclListener:Object = new Object();
mcLoader.addListener(mclListener);
mclListener.onLoadStart = function(mc:MovieClip)
{
// Show ProgressBar
};
mclListener.onLoadError = function(mc:MovieClip, errorCode:String)
{
mx.controls.Alert.show("Error!", "ERROR", Alert.OK, null, null, "Warning", Alert.OK);
}
mclListener.onLoadProgress = function(loadedBytes:Number, totalBytes:Number)
{
// Update ProgressBar
}
mclListener.onLoadComplete = function(mc:MovieClip)
{
// ProgressBar disappears
}
mclListener.onLoadInit = function(mc:MovieClip)
{
mc._x = 0;
mc._y = 0;
mc._width = Stage.width;
mc._height = Stage.height;
mc._alpha = 100;
}
mcLoader.loadClip("image.jpg", _root.myMC);
Timer Working But Not Working
Hello all.
I have a timer in an include file called A5SecTimer.as
Code:
//A FIVE SECOND TIMER THAT GOES TO THE NEXT FRAME
function A5SecTimer(){
setTimeout(this, "gotoAndPlay", 5000, nextFrame());
}
A5SecTimer();
In my movie i reference the file in frame one of my movie as such
#include "A5SecTimer.as"
This works great, goes to the next frame but, when I include a new timer in the second frame
Code:
//A TWO SECOND TIMER THAT GOES TO THE NEXT FRAME
function A2SecTimer(){
setTimeout(this, "gotoAndStop", 2000, nextFrame());
}
A2SecTimer();
The movie skips the second frame and goes to the third.
This is what I'm trying to accomplish:
-Fade in movie clip while movie is paused for 5 seconds
-go to the next frame
-Fade the movie clip while movie is paused for 5 seconds
-go to next frame and stop.
I hope this isn't too confusing to understand.
BOOYAKASHA!
-Atris
Preload Is Working And Not Working
hey there,
i made the tutorial you can find here but when i published my website on the web, it takes some seconds before you see the preloader... Normally you shouldn't see a white screen (i'm talking about the popup-window here...) but immediately the preloader. So, the preloader is working, but not immediately. How can I fix this?
Thanks...
lampe
ps: the website is not finished yet, duuh...
Mp3 Player, Working And Not Working
hey guys, i have a question. My mp3 i built with lees tutorial works ok. But i have looked at various posts and modified it to have a volume bar, previous button and a playlist. The problem is that when i click on previously button, the next song plays and not the previous one. When i click on the song in the list, again the next song plays and not the one i click. But that problem occurs when i click on the song again or if i am currently on the first song and i click to listen to the third song. Third problem is the volume, It keeps reseting to its original max volume when a new song is played. If anyone can help it will be great, if not thats ok.
Code:
//Setup sound object
var s:Sound = new Sound();
s.onSoundComplete = playSong;
s.setVolume(100);
//Array of songs
var sa:Array = new Array();
var display:Array=new Array();
//Currently playing song
var cps:Number=-1;
//position of music
var pos:Number;
//Load the Songs XML
var xml:XML = new XML();
xml.ignoreWhite = true;
xml.onLoad = function()
{
var nodes:Array = this.firstChild.childNodes;
for(var i=0;i<nodes.length;i++)
{
sa.push(nodes[i].attributes.url);
display.push(nodes[i].attributes.display);
}
playSong();
}
xml.load("songs.xml");
//play mp3 file
function playSong():Void
{
s= new Sound();
s.onSoundComplete = playSong;
preloadloadBar._xscale = 1;
if(cps==sa.length-1)
{
cps=0;
s.loadSound(sa[cps],true);
}
else
{
s.loadSound(sa[++cps],true);
}
pause.gotoAndStop("pause");
}
//pauses the music
function pauseIt():Void
{
pos=s.position;
s.stop();
}
function unPauseIt():Void
{
s.start(pos/1000);
}
//Music Controls
//play pause toggle
pause.onRollOver = function()
{
if(this._currentframe==1)this.gotoAndStop("pauseover");
else this.gotoAndStop("playover");
}
pause.onRollOut = pause.onReleaseOutside = function()
{
if(this._currentframe==10)this.gotoAndStop("pause");
else this.gotoAndStop("play");
}
pause.onRelease = function()
{
if(this._currentframe==10)
{
this.gotoAndStop("playover");
this._parent.pauseIt();
}
else
{
this.gotoAndStop("pauseover");
this._parent.unPauseIt();
}
}
//next button
next.onRollOver = function()
{
this.gotoAndStop("nextover");
}
next.onRollOut = next.onReleaseOutside=function()
{
this.gotoAndStop("next");
}
next.onRelease = function()
{
this._parent.playSong();
}
//Display Time.
function setTime() {
var totalSeconds:Number = s.duration/1000;
var s_seconds:Number = s.position/1000;
var minutes:Number = Math.floor(totalSeconds/60);
var seconds = Math.floor(totalSeconds)%60;
var e_minutes:Number = Math.floor(s_seconds/60);
var e_seconds = Math.floor(s_seconds%60);
//format time
if (seconds<10) {
seconds = "0"+seconds;
}
if (e_seconds<10) {
e_seconds = "0"+e_seconds;
}
timeDisplay.tt.text = minutes+":"+seconds;
timeDisplay.et.text = e_minutes+":"+e_seconds;
}
var timeRoutine = setInterval(setTime, 100);
//next
next.onRelease = function() {
s.stop();
s = new Sound();
this._parent.playSong();
setInterval(setTime, 100);
};
function playSong():Void {
s=new Sound();
s.onSoundComplete=playSong;
if (cps == sa.length-1) {
cps = 0;
s.loadSound(sa[cps], true);
displayTags();
} else {
s.loadSound(sa[++cps], true);
displayTags();
}
}
//display ID3 tags
function displayTags() {
s.onID3 = function() {
display_Artist.text = " "+s.id3.artist+"
";
display_Song.text = (cps+1)+". "+s.id3.songname+"
";
};
}
// initial x position fo the dragger
dragger._x = line_mc._x+line_mc._width-2;
// volume slider release function
dragger.onRelease = dragger.onReleaseOutside = function() {
this.stopDrag();
delete dragger.onEnterFrame;
}
// volume slider on press and drag function
dragger.onPress = function() {
this.startDrag(false, line_mc._x, this._y, line_mc._width+line_mc._x-2, this._y);
dragger.onEnterFrame = function() {
var Volume:Number= dragger._x-line_mc._x;
s.setVolume(Volume);
}
}
//-----------------------------------------------------------------------Preloadbar
preloadBar.onEnterFrame = function() {
var t:Number = Math.round(theTime/1000);
this._xscale = (s.getBytesLoaded()/s.getBytesTotal())*100;
sTotal.text =s.duration/1000;
};
//----------------------------------------------------------- ---------Progress bar
function soundProgress() {
progressBar._xscale = (s.position/s.duration)*100;
sProgress.text = ((_root._xmouse - preloadBar._x)/preloadBar._width)*10;
};
//prev button
prev.onRollOver = function()
{
this.gotoAndStop("prevOver");
}
prev.onRollOut = prev.onReleaseOutside=function()
{
this.gotoAndStop("prev");
}
prev.onRelease = function()
{
this._parent.playSong();
}
function prevSong():Void {
s = new Sound();
s.onSoundComplete = playSong;
if (cps == 0) {
cps = songArray.length - 1;
s.loadSound(songArray[cps].earl, true);
} else {
s.loadSound(songArray[--cps].earl, true);
}
trackInfo.text = songArray[cps].artist + " - " + songArray[cps].track;
playPause.gotoAndStop("pause");
}
formatTime = function (millisecs){
var secs = Math.floor(millisecs/1000);
var mins = Math.floor(secs/60);
secs %= 60;
if (secs < 10) secs = "0"+ secs;
if (mins < 10) mins = "0"+ mins;
return mins +":"+ secs;
}
var alist:XML = new XML();
alist.ignoreWhite = true;
alist.onLoad = function(){
var songs:Array = this.firstChild.childNodes;
for(i=0;i<songs.length;i++){
audiolist.addItem(songs[i].attributes.display,songs[i].attributes.url);
}
playSong.play(audiolist.getItem(0).data);
audiolist.selectedIndex = 0;
}
var aulist:Object = new Object();
aulist.change = function(){
playSong(audiolist.getItemAt(audiolist.selectedIndex).data);
}
audiolist.addEventListener("change",aulist);
alist.load("songs.xml");
If/else Statment Working But Not Working?
Hi,
I have tree component witch is populating the data grid component. I have 9 if/else statments to see if particular file is loaded to change datagrid heder but it changes only on last if/else statment.
Here is my code for tree listener
Code:
var myTreeL:Object = new Object();
var ukupni:String = ("poredakRally2.csv");
var ukupni1:String = ("poredakRally.csv");
var ukupni2:String = ("poredak2002.csv");
var ukupni3:String = ("poredak200.csv");
var ukupni4:String = ("poredakGT1.csv");
var ukupni5:String = ("poredakGT2.csv");
var ukupni6:String = ("poredakGT.csv");
var ukupni7:String = ("poredakC2.csv");
var ukupni8:String = ("poredakC.csv");
myTreeL.change = function(){
var item = myTree.selectedItem;
var earl = item.attributes.url;
if(earl){
raceResultsCSV.load(earl);
}
else{
trace("kliknuto je na folder");
}
if(earl==ukupni){
myDG.getColumnAt(5).headerText = "Vrijeme";
myDG.getColumnAt(6).headerText = "Voznja";
myDG.getColumnAt(7).headerText = "Najbolji krug";
myDG.getColumnAt(8).headerText = "Najbolja V.";
}else{
myDG.getColumnAt(5).headerText = "Diff";
myDG.getColumnAt(6).headerText = "Gap";
myDG.getColumnAt(7).headerText = "Ukupno Vrijeme";
myDG.getColumnAt(8).headerText = "Klub";
}
if(earl==ukupni1){
myDG.getColumnAt(5).headerText = "Vrijeme";
myDG.getColumnAt(6).headerText = "Voznja";
myDG.getColumnAt(7).headerText = "Najbolji krug";
myDG.getColumnAt(8).headerText = "Najbolja V.";
}else{
myDG.getColumnAt(5).headerText = "Diff";
myDG.getColumnAt(6).headerText = "Gap";
myDG.getColumnAt(7).headerText = "Ukupno Vrijeme";
myDG.getColumnAt(8).headerText = "Klub";
}
if(earl==ukupni2){
myDG.getColumnAt(5).headerText = "Vrijeme";
myDG.getColumnAt(6).headerText = "Voznja";
myDG.getColumnAt(7).headerText = "Najbolji krug";
myDG.getColumnAt(8).headerText = "Najbolja V.";
}else{
myDG.getColumnAt(5).headerText = "Diff";
myDG.getColumnAt(6).headerText = "Gap";
myDG.getColumnAt(7).headerText = "Ukupno Vrijeme";
myDG.getColumnAt(8).headerText = "Klub";
}
if(earl==ukupni3){
myDG.getColumnAt(5).headerText = "Vrijeme";
myDG.getColumnAt(6).headerText = "Voznja";
myDG.getColumnAt(7).headerText = "Najbolji krug";
myDG.getColumnAt(8).headerText = "Najbolja V.";
}else{
myDG.getColumnAt(5).headerText = "Diff";
myDG.getColumnAt(6).headerText = "Gap";
myDG.getColumnAt(7).headerText = "Ukupno Vrijeme";
myDG.getColumnAt(8).headerText = "Klub";
}
if(earl==ukupni4){
myDG.getColumnAt(5).headerText = "Vrijeme";
myDG.getColumnAt(6).headerText = "Voznja";
myDG.getColumnAt(7).headerText = "Najbolji krug";
myDG.getColumnAt(8).headerText = "Najbolja V.";
}else{
myDG.getColumnAt(5).headerText = "Diff";
myDG.getColumnAt(6).headerText = "Gap";
myDG.getColumnAt(7).headerText = "Ukupno Vrijeme";
myDG.getColumnAt(8).headerText = "Klub";
}
if(earl==ukupni5){
myDG.getColumnAt(5).headerText = "Vrijeme";
myDG.getColumnAt(6).headerText = "Voznja";
myDG.getColumnAt(7).headerText = "Najbolji krug";
myDG.getColumnAt(8).headerText = "Najbolja V.";
}else{
myDG.getColumnAt(5).headerText = "Diff";
myDG.getColumnAt(6).headerText = "Gap";
myDG.getColumnAt(7).headerText = "Ukupno Vrijeme";
myDG.getColumnAt(8).headerText = "Klub";
}
if(earl==ukupni6){
myDG.getColumnAt(5).headerText = "Vrijeme";
myDG.getColumnAt(6).headerText = "Voznja";
myDG.getColumnAt(7).headerText = "Najbolji krug";
myDG.getColumnAt(8).headerText = "Najbolja V.";
}else{
myDG.getColumnAt(5).headerText = "Diff";
myDG.getColumnAt(6).headerText = "Gap";
myDG.getColumnAt(7).headerText = "Ukupno Vrijeme";
myDG.getColumnAt(8).headerText = "Klub";
}
if(earl==ukupni7){
myDG.getColumnAt(5).headerText = "Vrijeme";
myDG.getColumnAt(6).headerText = "Voznja";
myDG.getColumnAt(7).headerText = "Najbolji krug";
myDG.getColumnAt(8).headerText = "Najbolja V.";
}else{
myDG.getColumnAt(5).headerText = "Diff";
myDG.getColumnAt(6).headerText = "Gap";
myDG.getColumnAt(7).headerText = "Ukupno Vrijeme";
myDG.getColumnAt(8).headerText = "Klub";
}
if(earl==ukupni8){
myDG.getColumnAt(5).headerText = "Vrijeme";
myDG.getColumnAt(6).headerText = "Voznja";
myDG.getColumnAt(7).headerText = "Najbolji krug";
myDG.getColumnAt(8).headerText = "Najbolja V.";
}else{
myDG.getColumnAt(5).headerText = "Diff";
myDG.getColumnAt(6).headerText = "Gap";
myDG.getColumnAt(7).headerText = "Ukupno Vrijeme";
myDG.getColumnAt(8).headerText = "Klub";
}
}
myTree.addEventListener("change",myTreeL);
How could I get this thing working properly?
Or is there different aproach to solve my problem?
Thanks
Working Area? Not The Stage Size....but The Working Area Lol
You know how there is a little white square that represents the stage size? And then, if you zoom out all the way, you have only a certain amount of working area and stuff dissapears. Is there a way to make this area larger? I have huge movie clips I need to work with...thanks!
|