Help Please - Been Working On This For Weeks & Still Not There
Long story short - passing a variable from a coldfusion document, through the swf (using FlashVars) to a coldfusion document that load the correct images into the swf based upon that variable. I've done tons of homework & gotten lots of help but my movie loads w/o reading the coldfusion document that is supposed to load into it. Here is where my code is messing up... can someone tell me where Im going wrong? Im so upside down on this I'm guessing it's right in front of my nose. Code: //forums var myVariable:LoadVars = new LoadVars(); myVariable.onLoad = function(success:Boolean){ if(success) { trace(myVariable) } else { trace("Error connecting to server."); } sender.id=myVariable; // send the id value to your cfm page using sendAndLoad, and returned xml will be loaded into the xml object x. -could this be where the prob is? sender.sendAndLoad("gallery.cfm?id=" + myVariable, x, "GET"); }//from forum ... var x:XML=new XML();x.ignoreWhite=true;x.onLoad=function(done){ if(done){ trace('xml file is now loaded into '+this); // now that it is loaded, process it the way you want. }; //see... var sender:LoadVars=new LoadVars();}imageXML.load(x);_lockroot = true; My debug says that the variables are undefined. I think this is because I am trying to load x w/o it knowing what is going on. It seems more likely I'd need to load Code: sender.sendAndLoad("gallery.cfm?id=" + myVariable, x, "GET"); which I thought I was doing.. but well obviously not. Im in over my head. I've tried paying someone, begging help from experts etc but it seems no one has been able to help me wrap this project up. Anything any of you could do to help would be SO APPRECIATED. Thanks!
KirupaForum > Flash > Flash 8 (and earlier)
Posted on: 01-20-2006, 08:58 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
- [F8] ScrollPane Is A Pain Been Working On This For 2 Weeks HELP
- [F8] ScrollPane Is A Pain Been Working On This For 2 Weeks HELP
- Ok, I Have Tried For Three Weeks:::::help
- Trying For 3 Weeks To Get Help . . .
- Weeks On The Same Problem Can Anyone Help Please?
- [F8] No One Can Fix This, Ive Wait 3 Weeks.
- Need A Programmor For 2 Weeks
- Memory Leaks Over Weeks
- Recovering Two-weeks Old Messages From This NG
- Display Weeks Numbers On DateChooser
- Countdown Dyas Months Weeks?
- [MX04] Php Contact Form For 3 Weeks
- Watch Me Crash And Burn In Two Weeks
- Display Weeks Numbers On DateChooser
- Watch Me Crash And Burn In Two Weeks
- Display Weeks Numbers On DateChooser
- Help Conveting Decimal Numbers To Years-months-weeks-days
- Flash MX TabIndex Only Working With Text Fields, Movies And Buttons Not Working :(
- LoadMovie - Working In Debug Mode, Not Working Otherwise
- Site Working Perfectly In A Server, Not Working In Other
- Contact Form Not Working In IE But Working In Mozilla
- Fading Text Only Half-working (so It's Not Working At All)
- Full Screen Tiling Working, But Not Working Right?
- Working Locally - Not Working Online
- AS 2 Button Not Working Not Working Properly
- Rollover Working But Rollout Not Working?
- AttachMovie Working, CreateEmptyMovieClip Not Working
- Why Is My Php Email Form Not Working Here, But Working Elsewhere?
- Sound Effect Working Fine In Stanalone Movie Not Working As Part Of Loaded Movie
- I Have Been Working On It For A Week But It Still Not Working
- Strange- Working In V5 Not Working In V6
- SendAndLoad Working/Not Working
- Working In Firefox, Not Working In IE 7
- LoadClip Working And Not Working
- LoadClip Working And Not Working
- Timer Working But Not Working
- Preload Is Working And Not Working
- Mp3 Player, Working And Not Working
- If/else Statment Working But Not Working?
- Working Area? Not The Stage Size....but The Working Area Lol
- GetURL Working In Flash Player 8 / Not Working In Player 9
- XML NOT WORKING
- Get URL And FS - NOT WORKING - HELP
- Else Not Working
- Not Working :(
- It's Working
- Still Not Working
- Working With MC's
- Get URL Not Working
[F8] ScrollPane Is A Pain Been Working On This For 2 Weeks HELP
In a container movie, I have loaded an swf that contains a scrollPane which in turn loads an external swf.
In Firefox, it works like a charm. In IE, the scroll bars do not appear!
Here is the code I am using in the swf that contains the scrollPane:
Code:
var scrollContent:mx.containers.ScrollPane;
scrollContent.contentPath ="http://www.becausecuidamos.com/newsite/swf/clipContent.swf";
scrollContent.setStyle("themeColor","haloBlue");
scrollContent.setSize(248,375);
scrollContent.border_mc._height = 0;
scrollContent.border_mc._width = 0;
scrollContent.hScrollPolicy="auto";
scrollContent.vScrollPolicy="auto";
scrollContent.refreshPane();
The live example is here:
http://www.becausecuidamos.com/newsite/index.htm
Click on Programs then Purple Scarf Project.
On the Internet, I've seen tons of posts about this problem. But no matter where I look, no one posts a solution. Can anyone here help? PLEASE!!!!
Thank you
[F8] ScrollPane Is A Pain Been Working On This For 2 Weeks HELP
In a container movie, I have loaded an swf that contains a scrollPane which in turn loads an external swf.
In Firefox, it works like a charm. In IE, the scroll bars do not appear!
Here is the code I am using in the swf that contains the scrollPane:
Code:
var scrollContent:mx.containers.ScrollPane;
scrollContent.contentPath ="ABSOLUTE_LINK_TO_MY.SWF";
scrollContent.setStyle("themeColor","haloBlue");
scrollContent.setSize(248,375);
scrollContent.border_mc._height = 0;
scrollContent.border_mc._width = 0;
scrollContent.hScrollPolicy="auto";
scrollContent.vScrollPolicy="auto";
scrollContent.refreshPane();
The live example is here:
http://www.becausecuidamos.com/newsite/index.htm
Click on Programs then Purple Scarf Project.
On the Internet, I've seen tons of posts about this problem. But no matter where I look, no one posts a solution. Can anyone here help? PLEASE!!!!
Thank you
Ok, I Have Tried For Three Weeks:::::help
I have been messing around with mono*crafts menu or actually a replica of. I think I have torn it down enough that I understand how it works with one exception, I can not figure out how to get individual links to work on the menu. The only way I have been able to get it to work is to assign a link to the blank button (which is duplicated X number of times using Set Variable: "num_ops" = 20, The only thing this does is set the URL on each button as exaclty the same. I have figured out that I have to use Set Variable, but then my brain just quits! I am not new to flash, so this is really messing with my self esteem. My Macromedia OS is Flash 4. Can anyone shed some light on this for me before I go completely recluse and become a hermit?
Trying For 3 Weeks To Get Help . . .
I have an html page with a transparent flash movie layer.
I cannot close the layer. I would like it to close after playing or if the user clicks the close button, without closing the html page.
I know I need some kind of java.close script, but don't have a clue what it is.
I really appreciate any help or suggestions you may have.
Thanks
Weeks On The Same Problem Can Anyone Help Please?
Hi all,
I am having real problems with showing movie clips when the mouse goes over a button. Could anyone be kind enough to show me how to do this on the first button with the .fla I am working on? The .fla is uploaded at the following address http://www.thomasgreg.com/introred.zip Thank you very much for your help/advice this is making me go crazy
[F8] No One Can Fix This, Ive Wait 3 Weeks.
Hi, heres my problem try to help please
I have a movieclip which is randomly duplicated along the x axis of my stage the only thing is I can't get the randomly duplicated movieclips to hitTest with a Hit area.
What I have is the block being randomly generated along the top of the stage on the x axis between the egdes of the stage then it randomly selects an animal, then it slowly drops to the bottom of the stage. Inside the block are different animals in different frames they are randomly selected using the basic gotoAndStop(random(6)). Now I have the boats at the bottom of the stage and I want the boat_hit to collide with the any of the animals using there insistances names. (e.g. bear, bunny, kitten, lion, sheep, puppy,)
The Way I am targeting the MC's is from the boat_hit bear in mine, the code goes like this
Code:
onClipEvent(enterFrame){
if(this.hitTest(_root.block.block2.bear)){
this._parent.one.gotoAndStop(2);
}
}
Need A Programmor For 2 Weeks
Send me a private message if you live in Montreal Quebec Canada and you want to get 2 weeks contract in AS3 programming
Memory Leaks Over Weeks
hi,
a very rare question i'm sure.
i've made a flash movie that runs on a display. this movie may run without being turned off for up to 6 months.
as it runs the memory it takes up increases. about 1mb a day.
how can i clear the memory?
Recovering Two-weeks Old Messages From This NG
on 6/3/07 I posted a question with the subject "adding a text field to a
number of FLA files" and received useful advices. Unfortunately I did not
save them to my local disk and now for some reason this subject does not
show up in my Outlook Express which I use to read NGs. Neither helps search.
Older subjects are still here.
What is the problem and how can I recover these messages?
Display Weeks Numbers On DateChooser
Hi I am newish to actionscript.
I am building a online booking service for one our clients. It will calculate when is the best time for an appointment depending on certain information - this I have all working fine.
I need to display the week number a long side the date choose, I have something that will do this - But the trouble is the "loose" days at the start/end of a month and syncing those to the week numbers.
Any ideas?
Also I have displayed ranges working fine, but I could do with differentiating some more dates with in the displayed range. Example displayed range from jan 1st to jan 21st - need to have 16th - 18th highlighted.
Thanks for any response
Jon-e-orange
Countdown Dyas Months Weeks?
Hi Anyone know any really simple countdown clocks with days months and weeks?
I just want to enter in a specific date in the future using simple english inside the code and have the display show days weeks and months when running.
is there anything like that around people?
thanks
shafattack
[MX04] Php Contact Form For 3 Weeks
I have been trying to make a contact form in flash with php for three weeks. I am sure i had it working at some point but then managed to mess it up. I am pretty sure the php file is ok because i tried a html page with it and it was fine. The contact form is a movie clip in the root called fillo. The submit and reset buttons are within that movie clip but they are movie clips themselves and the actual buttons are within them. When i click the submit button there is a message on the output that says error finding file chromatise.php which means that it looks for the the file but when i check my email it doesnt come. I suspect there is some mistake with the path of the var. Can anyone help??
the script within the submit button is :
on (release) {
if ( _parent.name eq "" or _parent.email eq "" or _parent.message eq "") {
_parent.gotoAndStop("3");
} else {
loadVariablesNum("chromatise.php", 0, "POST");
_parent.gotoAndStop("5");
}
}
p.s can anyone tell me what the 0 is in this sentence??
"loadVariablesNum("chromatise.php", 0, "POST");"
the source is located at http://test3.cy-designs.com/formcontact.fla
Watch Me Crash And Burn In Two Weeks
Well as it turns out, I got the job of my dreams, (Yay for me) I applied, got in, and only being 14 at that, (10th grade in highschool) this ain't no job for starbucks, this is "Price Waterhouse Coopers" if you've ever heard of them, they're global and huge, well as it turns out I need to learn Flash MX 2004 overnight, well actually within two weeks, I'd like to know what you would recommend, a friend said head here for tuts and such, but any books that you think I should pick up? I'm not a complete noob, I do photoshop and such, but I guess Flash is kinda new to me. Thanks alot anyone who replys.
Taylor
Display Weeks Numbers On DateChooser
Hi I am newish to actionscript.
I am building a online booking service for one our clients. It will calculate when is the best time for an appointment depending on certain information - this I have all working fine.
I need to display the week number a long side the date choose, I have something that will do this - But the trouble is the "loose" days at the start/end of a month and syncing those to the week numbers.
Any ideas?
Also I have displayed ranges working fine, but I could do with differentiating some more dates with in the displayed range. Example displayed range from jan 1st to jan 21st - need to have 16th - 18th highlighted.
Thanks for any response
Jon-e-orange
Watch Me Crash And Burn In Two Weeks
Well as it turns out, I got the job of my dreams, (Yay for me) I applied, got in, and only being 14 at that, (10th grade in highschool) this ain't no job for starbucks, this is "Price Waterhouse Coopers" if you've ever heard of them, they're global and huge, well as it turns out I need to learn Flash MX 2004 overnight, well actually within two weeks, I'd like to know what you would recommend, a friend said head here for tuts and such, but any books that you think I should pick up? I'm not a complete noob, I do photoshop and such, but I guess Flash is kinda new to me. Thanks alot anyone who replys.
Taylor
Display Weeks Numbers On DateChooser
Hi I am newish to actionscript.
I am building a online booking service for one our clients. It will calculate when is the best time for an appointment depending on certain information - this I have all working fine.
I need to display the week number a long side the date choose, I have something that will do this - But the trouble is the "loose" days at the start/end of a month and syncing those to the week numbers.
Any ideas?
Also I have displayed ranges working fine, but I could do with differentiating some more dates with in the displayed range. Example displayed range from jan 1st to jan 21st - need to have 16th - 18th highlighted.
Thanks for any response
Jon-e-orange
Help Conveting Decimal Numbers To Years-months-weeks-days
Hello guys
Well Im developing one interactive form could let you know in what period of time you could recover your money
For example you need to recover your money = 1,000 days
but now I want to calculate the same amount of days but converting in years, months,weeks and days
example :
1,000 days are:
2 years____=720
9 months___=270
1 week_____= 7
3 days _____=3
The month model I use is a flat 30 days, then the year is 360 days.
hope someone could give some help Im unable to find useful articles over the net
here is one aproach of waht is the closest result I could get, but the results stay as decimal numbers
example:
1000 days = 142.8571429 weeks
http://www.onlineconversion.com/time.htm
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!
GetURL Working In Flash Player 8 / Not Working In Player 9
Here I have the portfolio system I'm working at:
http://www.vamapaull.dxwebs.com/portfolio.html
when you click on the big image it should open a URL in a new window
When I test it on my computer is working fine(Flash Player 8), but when I test it in Firefox or IE (Flash Player 9) is now opening any URL... I think is some thing about the Flash Player 8 and Flash Player 9 compatibility... or some thing...
I don't know how to correct this problem... I need my portfolio working on Flash Player 8 and Flash Player 9 because now alot of users have Flash Player 9 on computers. :roll:
Any idea how to fix this issue? :?
XML NOT WORKING
okay this should be simple it seems like i did this before
but damn
i can't get this working
here is the example
http://users.pandora.be/dreams/guest.swf
so this works fine
and this is the same damn thing but loaded into another
movie clip
http://users.pandora.be/dreams/loader.swf
as you see it doesn't display the text
the fla is here
http://users.pandora.be/dreams/guest.fla
i'm just loading the xml data into the guest.swf basicly
i even created a new object
wich also didn't work
you'll see in the fla
if someone could tell me what i'm forgetting here
would be great
Get URL And FS - NOT WORKING - HELP
have a full screen swf that uses get url to call on a html page....but the html page pops up behind the full screen swf file....ANYONE HAVE ANY IDEAS?????NEEED HELP!!!!
Else Not Working
Check out the "if statement" code on the "home" button.
Here's the link to download the file - http://www.dossier.ws/1.html
----What I need it to do----
When I click "home"
1. If the timeline is in "lblSectionHomePage" go to "lblBackHomeFromSectionHomePage"
2. If the timeline is in "lblPlayGallery" go to "lblBackHomeFromGallery"
----------------------------
Not Working :(
i dunno what i did wrong? i did what u said heres the site...go under staff and tell me what i did wrong??
http:\h4ttrickproductions.com
It's Working
Hi!
Thank you! Now it's working! GREAT!
Greetz bOOt
Still Not Working
ORIGINAL POST:
I have a .gif image that I have imported in to my animation. It fades in from 0 to 100% in the span of 20 frames. It has a straight edge that looks fine in the timeline. When previewing the movie, the straight edge developes a blip in in, like a jagged edge. I have no clue what is happening, I have tried several different image formats, sizes, etc, yet it always distorts when played.
Thanks for the suggestions, but the graphic still distorts. Just in one spot along a straight edge, it forms a distortion as it fades in. I created a poor mans copy of it in Flash, ran them side by side and the Flash-made copy does not distort. The original was taken thru photoshop and optimized. Any ideas?
Thanks again
Working With MC's
Hi very simple question. I have an MC the has a button in it that i want to link to a frame label on the maine timeline is this a possible thing to do ??
If so how ?? Im not to sure how to get this to work and have been trying for the last hour with no success.
Thanks in advance
Mental
Get URL Not Working
I published flash intro for a website. I have an invisible button that is supposed to bring the user to the index.html of the website (published in GoLive). Unfortunately, it doesn't. It does recognize that it is a button (the cursor changes) but it doesn't not get the url or even give me an error. This also happens just in flashplayer, not only when previewing from GoLive.
Any help is greatly appreciated.
Thanks!
|