Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Loaded .swf Won`t Work Correctly



Tried to load one .swf file into another using loadClip method:var MCL:MovieClipLoader = new MovieClipLoader();MCL.loadClip("1.swf", "loader");The .swf file is loaded but controls inside it won`t work (i have some buttons and stuff in it). Separately everything works just fine.. Also, what is the difference in loadClip usage between AS 2 and 3? The code above generates some compiler error messages in AS 3 mode, like "1180: Call to a possibly undefined method MovieClipLoader" and "1046: Type was not found or was not a compile-time constant: MovieClipLoader."Any help?



KirupaForum > Flash > ActionScript 1.0/2.0
Posted on: 12-28-2008, 11:10 AM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Does This Work Correctly?
Does this preloader work correctly? if it does there should be a music player pop up to the right and it will start playing an AFI song....... if it doesnt it will skip the preloader and just move into the movie without even showing the music player

http://www.feelthissite.com/nico/joe...reloader3.html

thanks!!!

joel

Can't Get If Else To Work Correctly
ok, i have been working on this for a week or so, and yes it has been a week. I don't have the internet where i am from so I resorted to ebooks that I had downloaded. The problem is, is that I have made a very simple math program. You decide which operand you want to use and a randomly generated questions pops up. You answer the question and you are told whether you are right or wrong. This continues 5 times where you are graded based on percentage correct. I am not worried about taht part yet, I want to get my if else statement working correctly first.

The first frame is the frame where you choose your operand. The second frame is where you solve the problem, and the last frame is where you are told whether you are correct and what your percent so far is. I have an ebook teaching me but I have had some success in prior programming. When my program didn't work, I debugged and eventually ripped the program straight from the book. It still isnt working correctly. My if/else always assumes that my answer is wrong. If someone could help me in the right direction. I will post the coding for all three frames


DECISIONFRAME This frame works correctly as far as i know.
btngoback.onRelease = function (){
_root.gotoAndStop("Welcomescreen");
}
btnadd.onRelease = function (){
_root.op = "+"
_root.gotoAndStop("Solve");
}
btnsubtract.onRelease = function(){
_root.op = "-"
_root.gotoAndStop("Solve");
}
btndivide.onRelease = function(){
_root.op = "/"
_root.gotoAndStop("Solve");
}
btnmultiply.onRelease = function(){
_root.op = "*"
_root.gotoAndStop("Solve");
}

SOLVEFRAME I was told on another site to make the variables stated as number variables and my trace commands all spit out the same number.
checkans.onRelease = function(){
_root.gotoAndStop("Report");
}
var var1:Number;
var var2:Number;
var correct:Number;
var answer:Number;
switch (op){
case "+":
var1 = Math.ceil(Math.random() * 10);
var2 = Math.ceil(Math.random() * 10);
correct = var1 + var2;
break;
case "-":
var2 = Math.ceil(Math.random() * 10);
correct = Math.ceil(Math.random() * 10);
var1 = var2 + correct;
break;
case "*":
var1 = Math.ceil(Math.random() * 10);
var2 = Math.ceil(Math.random() * 10);
correct = var1 * var2;
break;
case "/":
var2 = Math.ceil(Math.random() * 10);
correct = Math.ceil(Math.random() * 10);
var1 = var2 * correct;
break;
default:
break;
}
holdvalue.onRelease = function(){
trace(answer);
trace(correct);
trace(_root.answer);
trace(_root.correct);

}


REPORTFRAME This is where my if statement goes wrong. It bypasses the if and goes straight to the else part. I changed the else to an else if command because I read up on that in another book but still wrong. The welcomescreen is correct. I have an extra frame stating the symantics.

var tries = 0;
var right = 0;
if (_root.answer == _root.correct){
display = "Correct!";
right ++;
}else if(_root.answer != _root.correct){
display = "Wrong!";
}
tries ++;
percent = (right / tries) * 100;
goback.onRelease = function(){
if (tries < 5){
_root.gotoAndStop("Solve");
} else {
tries = 0;
right = 0;
_root.gotoAndStop("Welcomescreen");
}
}

Help I Can't Get My Code To Work (correctly)
I have two MCs called "Win1" and "Win2" placed on the stage, in frame one of the movie. Basically, I'm trying to make them so that when you click on one of them, it will "minimize" to the bottom-left of the screen. Then, if you click the other one, it will do the same thing, but it will go next to the one that is already minimized.
I have made a function in frame 1 of the movie that contains all of the code to do this, so that I just call that function from each MC when it is clicked.

Anyway... to make a long story short, when I put the function in frame 1 that will do the minimizing and the sorting, I'm not sure how to make it "plug in" the name of the MC that I clicked on to minimize.

Here's the code in frame 1:

minorder = 0;
minitem = "";

function minimizeORDER() {
if (minorder == 0) {
minitem._x = 13;
minitem._y = 569;
minorder = minorder+1;
} else {
if (minorder == 1) {
minitem._x = 103;
minitem._y = 569;
minorder = minorder+1;
} else {
if (minorder == 2) {
minitem._x = 193;
minitem._y = 569;
minorder = minorder+1;
}
}
}
}


Here's the code placed on "Win1":

on (release) {
_root.minitem = "Win1";
_root.minimizeORDER();
}
stop();


Here's the code placed on "Win2":

on (release) {
_root.minitem = "Win2";
_root.minimizeORDER();
}
stop();


So, when you click on one of the two MCs, it should replace every instance of the word "minitem" in the code in frame 1 of the movie with either "Win1" or "Win2". Thus, making it work correctly.
However, it doesn't...
I know that it could work, because when I change the code in frame 1 to say "Win1" or "Win2" instead of "minitem", it works fine... I just can't get it to replace itself when I click on one of the MCs.

Can anyone help me with this?

Thanks!
Lee

SWF Doesn't Work Correctly On Mac
I recently posted a swf to http://www.dagnabit.tv/FOrwardAward/ForwardAward.htm

The movie was created on a PC and published. On a PC platform it works fine, all of the timing is correct. However, when tested on a Mac 4 (running osx) the images run much slower, resulting in the audio finishing about 6 seconds off cue. ANy suggestions would be very helpful.

Thank you Gary

Certain Fonts Won't Work Correctly...
Hi there,

I'm very new to Flash and I'm hoping there's some very easy solution to this problem. I'm working on a project that requires a font that I downloaded specifically for said project. When I use the text tool and write something, it doesn't come up as the font I have selected, just a generic Veranda-looking kinda font. This happens with some fonts, but not others.

All the fonts work fine when I use them in Photoshop.

Is there a solution to this? And if not, is there an alternative I can use to get this font into Flash? It's the building block on which my entire project is based!

Thanks so much!

Keith

My Buttons Don't Work Correctly
Hi, I'm doing a website in Flash 8 like this: I put 5 keyframes (1 for each section) and put a stop command in all of them. I put some buttons at the bottom to go to each section. For example press games to go to the games section, etc. In each buttons I have this code: on(release){
gotoAndPlay("(name of section)");
}
So I test my movie, the home page appears, I click the games button(for exaple), it takes me to the games section, then I click it again and it takes me to the home page , then I click animations and it takes me to games, etc. All my buttons are messed up, what's happening? I've done several websites and never had a problem. Can anyone help me?

Thanks in advance

How Do I Get Proximity To Work Correctly
I'm trying to get some movie clips to duplicate from a single point on the stage and with each iteration I want them to move further away from the start point. This way thay can cover the whole stage and unmask the entire image below.

I sort of have it working with this code, however I think I have some of the math wrong or something because they duplicated movieClips never cover the entire stage. Can anyone poini out my error in the code below?


Code:
var duration:Number = 50;
var prox:Number = 5;
var control = prox;
var count:Number = 1;
var maxCount:Number = 17;
var startX:Number = 400;
var startY:Number = 200;
var xMin:Number = 0-startX;
var xMax:Number = 500;
var yMin:Number = 0-startY;
var yMax:Number = 280;

function executeMasking():Void {
_root.mcMask.mcItem._x = startX;
_root.mcMask.mcItem._y = startY;
for (i=1; i<=count; i++){
n = i*count;
randomX = (Math.round(Math.random()*(xMax-xMin)/prox))+(startX/2);
randomY = (Math.round(Math.random()*(yMax-yMin)/prox))+(startY/2);
orgClip = "mcMask.mcItem";
dupClip = "mcMask.mcItem"+n;
clipDepth = mcMask.getNextHighestDepth();
mcMask.mcItem.duplicateMovieClip(dupClip, clipDepth,{_y:randomY, _x:randomX});
}
if(count >= maxCount) {
clearInterval(intervalId);
trace("cleared");
}
if(control>count){
prox--;
}
count++;
}

intervalId = setInterval(this, "executeMasking", duration);
let me know if it would help to look at fla file, I'd be happy to post it.

Won't Work Correctly In Firefox
i'm developing i simple audio player. It works when launched directly as a swf, and works when loaded as a swf or through an html file in IE6, but in Firefox (as a swf or through the html) it doesn't work correctly. It looks like the onLoad portion of the actionscript is not being triggered. My guess is i've set it up wrong in the first place. Maybe i'm going about it all wrong. Here's what i have:


Code:
var trackList:Array = Array(["song1.mp3"], ["song2.mp3"], ["song3.mp3"]);
var directory = "audio/";
var totalTracks = trackList.length;
var currentTrack = 0;
this.onLoad = function() {
theTrack = new Sound();
theTrack.loadSound(directory+trackList[currentTrack], true);
display_txt.text = directory+trackList[currentTrack];
debug_txt.text = "first sound loaded";
};
//PLAY button
play_btn.onPress = function() {
debug_txt.text = "play pressed";
theTrack.start();
};
theTrack.onSoundComplete = function() {
debug_txt.text = "auto advance to next track";
theTrack.stop();
if (currentTrack<totalTracks-1) {
currentTrack = currentTrack+1;
} else {
currentTrack = 0;
}
theTrack.loadSound(directory+trackList[currentTrack], true);
display_txt.text = directory+trackList[currentTrack];
};
//STOP button
stop_btn.onPress = function() {
debug_txt.text = "stop pressed";
theTrack.stop();
};
//ADVANCE button
next_btn.onPress = function() {
debug_txt.text = "advance pressed";
theTrack.stop();
if (currentTrack<totalTracks-1) {
currentTrack = currentTrack+1;
} else {
currentTrack = 0;
}
theTrack.loadSound(directory+trackList[currentTrack], true);
display_txt.text = directory+trackList[currentTrack];
};
thanks for taking a look.

The Loading Bar Can't Work Correctly
hello, everybody, i creat a loading bar, but it can't work correctly, the code is that:
as u see, the"will_load.swf" is in the same file








Attach Code

loadbar.onLoad = function() {
this._alpha = 0;
}
myloader = new MovieClipLoader();
mylistener = new Object();
mylistener.onLoadProgress = function(loadTargetMC, loadedBytes, totalBytes) {
loadbar.loadcore._xscale = (loadedBytes/totalBytes) * 100;
loadbar._alpha = 100;
}
mylistenter.onLoadStart = function(loadTargetMC) {
mymc.stop();
}
mylistener.onLoadComplete = function(loadTargetMC) {
mymc.play();
}
myloader.addListener(mylistener);
myloader.loadClip("will_load.swf", mymc);

Button Does Not Work Correctly In Win IE6...Why?
If you go to this example:

http://www.timjaeger.com/shomes/

In Win IE6 the button only changes when the mouse is in the right-most position. In other browsers it is fine. There is currently no other Actioinscript implemented. What is causing this problem?

Buttons Do Not Work Correctly
I am not sure if I should have posted this mesage here; hope you can help. Thank you

Hi, I've created a Nav_menu movie in my library (insert it into my main Scene). Inside my Nav _menu I have a layer called "Action" and I have the following code for each of my buttons. But for some reason they don' work correctly. What is suppose to happen when you click the button is a short animation that basically brings up a window, but then I'd like to add some text (after the short animation finishes). But it doesn't work.









Attach Code

stop();
home_btn.onPress = function(){
gotoAndStop(1);
gotoAndPlay("2");
}
paints_btn.onRelease = function(){
gotoAndStop(1);
gotoAndPlay(15);
}
guests_btn.onRelease = function(){
gotoAndStop(1);
gotoAndStop(4);
}
news_btn.onRelease = function(){
gotoAndStop(1);
gotoAndStop(5);
}
photos_btn.onRelease = function(){
gotoAndStop(1);
gotoAndStop(5);
}
forum_btn.onRelease = function(){
gotoAndStop(1);
gotoAndStop(5);
}

Scrollpane Does Not Work Correctly
Does anyone know why the text disapears 1/2 way down the scroll?

Download FLA Here


Download ZIP Here

Menu Won't Work Correctly In IE7
Greets.  I've created a menu in Flash 8 AS2 which gives a list of 11 options.  Click 1-11 and it opens a MC which contains buttons.  The MC is then ._visible and .enable = true  When another option is clicked, or the same option is clicked, the current MC is closed ._visible and .enable = false and the new one is opened.  It works great in FF, however, in IE 7, it's hiding the MC, but not disabling them.  Below is the AS I'm using.  btn# is the primary button clicked which then opens btnMenu#  (side note, I know I can do something else with the individual btn#.onRelease I just haven't gotten that far yet :)

Thank you!

CODEimport mx.transitions.Tween;
import mx.transitions.easing.*;
var startX:Number = btnMenu1._x;

var i = 0;

//Currently the tweens are not functioning on closemenu.  Reason is hidemenu is disabling/visibling false
//before the tween can finish, making them disappear.  This could be fixed at a later time.
closemenu = function (param, onoff) {
    temp= eval("btnMenu"+param);
    new Tween(this["btnMenu"+param],"_alpha",Regular.easeOut,100,0,12,false);
    new Tween(this["btnMenu"+param],"_x",Regular.easeOut,temp._x,temp._x-10,12,false);
    hidemenu(param)
    return 0;
}
//This function disables the MC that holds the buttons and makes them invisible.  This turns off the clicking
//of the buttons as well as keeps the buttons from interfearing with other buttons. ie overlapping.
hidemenu = function (param) {
        temp = eval("btnMenu"+param);
        temp.enabled = false;
        temp._visible = false;
        trace (param)
}
//Call the hidemenu function to keep the buttons from appearing initially.
onLoad = function (){
for (y=1;y<12;y++){
    try{
    hidemenu(y);
    }
    catch (e:Error){
    }
}

}
openmenu = function(param)
{
    temp = eval("btnMenu"+param);
    new Tween(temp,"_alpha",Reglar.easeOut,0,100,12,false);
    new Tween(temp,"_x",Regular.easeOut,temp._x,temp._x+10,12,false);    
    temp.enabled = true;
    temp._visible = true;
    return param;
}

btn1.onRelease= function ()
    {
        if (i != 0) closemenu(i,false);
        if (i != 1) i = openmenu(1);
        else i = 0;
    }
btn2.onRelease = function ()
    {
        if (i != 0) closemenu(i,false);
        if (i != 2) i = openmenu(2);
        else i = 0;
    }
btn3.onRelease = function ()
    {
        if (i != 0) closemenu(i,false);
        if (i != 3) i = openmenu(3);
        else i = 0;
    }
btn4.onRelease = function ()
    {
        if (i != 0) closemenu(i,false);
        if (i != 4) i = openmenu(4);
        else i = 0;
    }
btn5.onRelease = function ()
    {
        if (i != 0) closemenu(i,false);
        if (i != 5) i = openmenu(5);
        else i = 0;
    }
btn6.onRelease = function ()
    {
        if (i != 0) closemenu(i,false);
        if (i != 6) i = openmenu(6);
        else i = 0;
    }
btn7.onRelease = function ()
    {
        if (i != 0) closemenu(i,false);
        if (i != 7) i = openmenu(7);
        else i = 0;
    }
btn8.onRelease = function ()
    {
        if (i != 0) closemenu(i,false);
        if (i != 8) i = openmenu(8);
        else i = 0;
    }
btn9.onRelease = function ()
    {
        if (i != 0) closemenu(i,false);
        if (i != 9) i = openmenu(9);
        else i = 0;
    }
btn10.onRelease = function ()
    {
        if (i != 0) closemenu(i,false);
        if (i != 10) i = openmenu(10);
        else i = 0;
    }
btn11.onRelease = function ()
    {
        if (i != 0) closemenu(i,false);
        if (i != 11) i = openmenu(11);
        else i = 0;
    }

GetBytesLoaded() Does Not Work Correctly Anymore
Hi,

I just discovered, that "getBytesLoaded()" does not work correctly anymore, when you use the compress movie function in FlashMX.

it displays the bytes loaded before compression...

Cannot Get Print Command To Work Correctly
I am writing actionscript right now and I cannot get my published flash movie to print directly. I have imported text from a word document, therefore, when I hit print in the movie, it just opens the word program and opens that file, then I have to hit print in Word to get that to work. here is what it looks like:

on (release) {
getURL("PhaseThree Tutorial.doc", "_blank");
fscommand("fullscreen", "false");

now i am not sure what to add to get this document to print directly. PLEASE help if you have any ideas. Thanks in advance.

One thing to clear up. The Movie and the accomponying word documents are on a CD not posted for the web. Therefore, how it is set up i want to hit print in the movie, and have the actionscript written so that it locates the word doc./and prints it directly, without having to take the extra step of the word program opening, the text opening up, and then having to manually hit the print command in word. now it just opens the doc in word, then i have to hit print. Thanks for any ideas.

Flash Site Won't Work Correctly On A Mac?
I'm working on a site for a friend of mine...
It has a preloader (in scene1) that calls up an .swf using "loadMovieNum (2);". Once its done preloading, the first frame of the second scene uses "unloadMovieNum (2);" to unload the swf.
This works fine on every PC I've played it on with Flash player 6, but a friend of mine with a Mac and Internet Explorer 5.0 says that the swf never unloads... it just stays on the screen, infront of everything else.

Does anyone know what could be causing this?

Thanks!
Lee

My Movie Clip Won't Work Correctly ...
I have a made a movie clip(menuclip) that acts as a drop down menu. The only problem is that when I attach the

on(rollOut)}
gotoAndPlay(7);
}

action script to the clip in the main timeline, the buttons contained in the menuclip movie are disabled or something...They wont go into their different states. However, when I take the actionscript off of it, the movie clip behaves as normal. How can I use the actionscript attached to the movieclip in the main timeline and still get the movie to behave as normal? Thanks...

Button Doesn't Work Correctly
Hi! I'm learning Flash now. I'm doing a simple quiz in the Flash MX. In the end of the quiz I have 03 buttons: redo( to start the quiz again), answers (that contain the correct answers of the quiz) and Close (to close the quiz). But the button Close doesn´t work, I write this expression in the action of the close button:

on (press,release){
getURL("javascript:window.close()");
}

But when I'll click in the Close button nothing happen! And I don´t know what´s wrong! Can anybody help me please?

Thanks

Getting Yahoo Maps To Work Correctly...
Here is my .fla file:

http://www.thegoheens.com/help/main.fla

In the "cities" page - I can get the Yahoo logo to show up on the bottom but no map appears. It seems like I am very close to getting this to work, but am obviously missing something.

Can someone please help me??

My Preloader Doesn't Work Correctly
This is the fist site I make and it doesn't seem to work very well. The main problem is that the gallery ("imagenes") is quite big and it takes some time to load, it has a preloader but it doesn't appear until 70% of the movie is loaded.

How can I make the preloader appear when I click the button to open the gallery?

My site is:
www.geocities.com/plmorell

Tnkx for the help

Please Help Me Getting My Invisible Button To Work Correctly.
http://filebox.vt.edu/~gyanez/flash_test/

Source:

http://filebox.vt.edu/~gyanez/flash_test/source/

Here is what is happening:

After the flash intro plays or the "Skip Intro" Button is pressed a jpeg is loaded externally and revealed from left to right with a mask. After the mask is finished tweening I activate an invisible button that is directly above the loaded jpeg. Whenever the user rolls over the jpeg and therefore the invisible button I make a dynamic text box tween over the bottom right corner of the image (the width and height of the text box are changed depending how much text is put in after reading the external .txt file).

The problem is that if the user rolls the mouse over the text box that tweens into place that the invisible button thinks that the user rolled off the image which forces the text box to tween back out of visibility. I dont want this. I only want the text box to tween out of visibility when the user rolls off the borders of the image and stay there when they rollover the text box since that is contained in the image borders. This problem would be a lot more noticeable if the text that was loaded externally was so much that the text box would be huge and therefore the occurence of teh mouse rolling over the textfield would be greater.

So please help if you guys wouldn't mind. All the textfield creation adn image loaded in home.fla.

Thanks.

My Preloader Doesn't Work Correctly
This is the fist site I make and it doesn't seem to work very well. The main problem is that the gallery ("imagenes") is quite big and it takes some time to load, it has a preloader but it doesn't appear until 70% of the movie is loaded.

How can I make the preloader appear when I click the button to open the gallery?

My site is:
www.geocities.com/plmorell

Tnkx for the help

Dynamic HtmlText Will Not Work Correctly
htmlText is not working, the text is not html text formated, other formating works though. is there some syntax error which i am missing? thanks alot


ActionScript Code:
function draw_news(nz_width:Number, nz_height:Number, nz_x:Number, nz_y:Number, nz_font:String, nz_size:Number) {
    // define the text format
    ref.news_fmt = new TextFormat();
    ref.news_fmt.htmlText = true;
    ref.news_fmt.multiline = true;
    ref.news_fmt.font = nz_font;
    ref.news_fmt.size = nz_size;
    //----------
    var d = _root.getNextHighestDepth();
    ref.createEmptyMovieClip("news_mc", d);
    ref.news_mc.createTextField("news_txt", d, nz_x, nz_y, nz_width, nz_height);
    ref.news_mc.news_txt.multiline = true;
    ref.news_mc.news_txt.wordWrap = true;
    ref.news_mc.news_txt.setNewTextFormat(news_fmt);
};

Fullscreen Not Working Correctly In Loaded Swf
I have a swf loading an external SWF which is a video player. The video player loads fine into the SWF, but if I hit full screen it goes full screen but I cant see anything. Its all black. I can still see the "hit escape to exit" bubble thing.

If I embed the video player by itself(ie. ISNT loaded into a swf) the full screen function works fine.

Any ideas?

Correctly Reading % Loaded With Attachsound
Hi all.

I have a flash movie which attaches sounds to mcs.

I'm trying to create a preloader to detect the progress of the entire movie loading, but I can only get the preloader to appear & work after the sounds are attached.

I've tried deactivating the 'attach on first frame' checkbox in linkage, and changing the publish settings to attach the sounds directly after the preloader appears... but to no avail.

I've been looking for a solution for hours without luck, so I really appreciate any help.

I've read that I might want to load the original swf through another 'preloading' swf, but I haven't seen a satisfactory implementation of that approach to-date.

Again- all help welcomed. thanks

Loaded Movie Is Not Sized Correctly
I am trying to load a .swf movie into a narrated, interactive slide-show created in flash. I have a pane for the movie to fit in that is 200x150 pixels.

I have two versions of the movie, one was created without action script, the other uses action script and an included file to download the images it needs at playback.

Both versions are the same dimension as the pane in my presentation (200x150). Both were published using the same publishing settings (which match those I am using for the presentation itself.

The non-dynamic version loads and plays just fine, the dynamic one loads and plays, but is incorrectly sized. It shows up with the top-left corner in the right place, but is so large that it obscures the rest of the presentation stage.

Anyone have any ideas why this might be? I'm stuck here, and desparate to find a solution.

Thanks,

C

Fullscreen Not Working Correctly In Loaded Swf
I have a swf loading an external SWF which is a video player. The video player loads fine into the SWF, but if I hit full screen it goes full screen but I cant see anything. Its all black. I can still see the "hit escape to exit" bubble thing.

If I embed the video player by itself(ie. ISNT loaded into a swf) the full screen function works fine.

Any ideas?

Bar Preloader In External Swf Doesn't Work Correctly
Prologue:
1) what's wrong with my preloader script?
or
2) is this a known issue with MAC OS9/IE5
and
3) and how can I test preloaders when they are in external .swfs

Developing on Windows98 and Flash 5)


My preloader, (which is script taken from PeachPit Press' Macromedia Flash5 Advanced book) does the following when viewed on a 56K modem/MacOS9/IE5:

It loops several times, then proceeds to SLOWLY run the preloader bar incrementally, except that it's now godawful slow. You can view it at our test site:

http://mccay.hitchcock.org/ADL/summi...dings/joe.html

the live version seems to load just fine on a dial-up (it doesn't yet include the preloader, and makes me wonder if a preloader is necessary for this one, but I want to know what makes this happen anyway...). It is here:

http://iml.dartmouth.edu/ADL/summit/...dings/joe.html

How I built it:

I used one main .swf which contains the non-changing components and title sequence (as a MC) and several external .swfs which contain the audio and timed text which are loaded and unloaded depending on which frame you are in of the main .swf.

I used external .swfs because, it was easier to time the text to the audio, and a little bird once told me that Flash degrades audio when it's put into an MC. Plus, Flash crashed every time I tried to export a movie with 11 minutes of streaming audio!

The popup menu ("Jump to Section") is also and external .swf which is loaded into level2.

Our network is too fast for me to test this project at work (and I read that the bandwidth profiler doesn't help with external .swfs), so I must go home for a slow connection, so i can never tell until that evening if what I've done has fixed the problem. Or if it's a problem that only occurs with a limited number of OS/IE combinations (I've encountered other funny little mac issues). So any comments on a better way to test a preloader in this situation are also helpful.

Here's the object script of my preloader, in the first frame of each external .swf:

onClipEvent (enterFrame) {
if (_root._framesloaded>=_root._totalframes) {
_root.gotoAndPlay("thisMovie");
} else {
this.gotoAndStop(Math.floor((_root._framesloaded/_root._totalframes)*this._totalframes));
}
}

the preloader itself is simply a bar which has a motion tween and 20 frames, and a stop() on the last frame. Incidentally, there is also a stop() in the same frame as the preloader MC.

Thanks! Regrets for the blandness of the content. Not my choice!

Can't Make This Alpha Fade Work Correctly
i wrote a fading script for a dynamic text field. The script works... but is too slow fading in... the fade in is part of my page intro animation, when the _alpha reaches 100....it jumps to the "main" frame label. I want to increment the alpha by 2, 5 or even 10 to spped up the process but it's not working.

here is my current script (which works using this._alpha++:
Code:
onClipEvent (load) {
this._alpha = 0;
}
onClipEvent (enterFrame) {
if (this._alpha<100) {
this._alpha ++;
// i have tried all sorts of combinations of this._alpha +2... +5.. +10 etc.
// but when i use those, it seems that the _alpha just jumps to 100, so it doesn;'t fade
// but although the _alpha reaches 100, it never sends the playhead to the "main" frame label
} else if (this._alpha == 100) {
delete this.onEnterFrame;
this._parent._parent.gotoAndStop("main");
}
}

[F8] Motion Tween Doesn't Work Correctly
Hi,
I've produced animations with motion tweens but for some reason my simple shape I've put in a movie clip refuses to move as a tween.

Your recommendations will be greatly appreciated.
Thank you,
Nancy

Preloader Doesn't Work Correctly When Using Components
Good Morning All,

Just wondering if you have any suggestions on this:

I have built a single frame shop poll using components such as List Box, Radio Buttons and Combo Box. Upon adding a preloader it seems my preloader only shows at approx 80% loaded when testing in the preview window.
The preloader is just a scaled rectangle. I also tried using some dynamic text but this also works in the same way (shows at 80%).

Do you think it could be something to do with having to load the components ?
I have experienced something similar before when preloading an SWF with embedded fonts. I eventually got my preloader to work 100% when i removed the embed font character option. It appeared to be loading the fonts before the preloader would start.
Do you think the same is happening with my components ?
Is there any other options i'm missing ?
And finally do you have any suggestions for resetting List box, Radio buttons and Combo box back to default published settings as i want to add these features to a reset button (which currently only resets my input text fields).
My page is here (without preloader)
My Poll

Thanks in advance,
Doug

Unpause Button Doesn't Work Correctly
Hello all,

I would like to have a fully-functional pause toggle button, which I haven't been able to accomplish. The AS on my pause button is below, and when I click on the pause button, the movie clips and the external swf with the instance named "ryan" does pause but when I attempt to un-pause the movie, the movie starts from the beginning of the ryan movie clip (aka ryan swf). How do get the button to un-pause directly at the point where it was paused?

Also there are more movie clips within "ryan" which doesn't work correctly either. When I un-pause the movie the entire movie starts from the beginning again.

Below is the AS, please any help is appreciated!

var state:Boolean = false;

pause.onRelease = function() {
if (!state) {
_root.screen.stop();
_root.end.stop();
_root.screen.ryan.ryan.stop();

} else {
_root.end.play();
_root.screen.ryan.ryan.play();
_root.screen.ryan.ryan.play();
_root.screen.ryan.ryan.link2.play();
_root.screen.ryan.ryan.link3.play();
_root.screen.ryan.ryan.link4.play();
_root.screen.ryan.ryan.link5.play();
}
state = !state;
}

Actionscript: If Statement Doesn't Work Correctly?
Hi folks.

I've got a movie clip called 'soundToggle'. It's default position points to 9 (imagine a clock face). On click, it rotates via 12 and points to 3. Here comes the problem. When I click it again, I want it to rotate back to 9 (via 12) but it doesn't.

The first part works fine, but when you click it a second time it does nothing. I've traced the statement and I'm not sure why. Here's the code I use on a frame:


_root.soundToggle.rot = 0;
_root.soundToggle.music=true

_root.soundToggle.onPress = function() {
this.onEnterFrame = function() {
if (this.music)
{
if (this.rot < 180)
{
this.rot= this.rot+4;
this._rotation = this.rot;
}
this.music=false
}
else if (this.rot > 0)
{
this.rot= this.rot-4;
this._rotation = this.rot;
}
this.music = true
}
}


Any help would be much appreciated.

Hotspots In A Loaded Movie Not Referencing Correctly
My main movie uses an onResize function to reposition movie clips relative to stage H & W, a movie loaded into level 1 contains the hotspots that aren't registering properly.

CODE IN MAIN MOVIE:
Stage.scaleMode = "noScale";
Stage.align = "TL";
///////////REPOSITION ELEMENTS WHEN STAGE IS RESIZED////////////
this.onResize();
function onResize() {
newPosition();
}
Stage.addListener(this);
function newPosition() {
stageH = Stage.height;
stageW = Stage.width;
bkgrnd_mc._width = stageW;
bkgrnd_mc._height = stageH;
main_mc._x = (stageW- main_mc._width)/2;
main_mc._y = (stageH- main_mc._height)/2;
//loaded movie- all hotspots are inside this MC:
_level1.temp_mc._x = (stageW-_level1.temp_mc._width)/2;
_level1.temp_mc._y = ((stageH-_level1.temp_mc._height)/2);
}


on loading a movie into level 1 – I can see that the hotspots contained within it are visually repositioned when browser resized (hotspots all inside ‘_level1.temp_mc’) but the x & y coordinates referenced during hitTest remain those of the original loaded movie – ignoring the fact it looks as though it has been physically repositioned!
Hit test code placed inside the loaded movie (in ‘temp_mc’) uses shapeflag method to test hits, eg:

//display readings:
_level1.temp_mc.reader_mc.onPress = function() {
this.startDrag();
};
_level1.temp_mc.reader_mc.onRelease = function() {
this.stopDrag();
if (_level1.temp_mc.hotspot1_mc.hitTest(_level1.temp_mc.reader_mc._x, _level1.temp_mc.reader_mc._y, true) {
_level1.temp_mc.temp_txt.text = " hotspot1";
}
else {
_level1.temp_mc.temp_txt.text = "Nothing detected";
}
};

Resize function also called in first frame pf loaded movie: _level0.onResize();

Any help gratefully received, thanks in advance.

Why Does The MouseOut And MouseOver Not Work Correctly When Using A Dynamic Textfield?
Hi There,

I have made a movieclip with an instance name: cs_btn

Inside this movieclip i have two layers. The button background and on top the dynamic textfield.
Within this timeline i have an "over" "out" "down" and "up" frame labels.

It works great, but when i use an dynamic textfield, the mouseOver and MouseDown event are triggerd
also when you roll over the textfield. Even when i turned of the selectable property.

Any idea what's causing this?

On the main timeline i have made this script:

function cs_buttonEvent(event:MouseEvent):void {

trace(event.type);

switch (event.type) {
case "mouseDown":
event.currentTarget.gotoAndPlay("down");
break;
case "mouseUp":
event.currentTarget.gotoAndPlay("up");
break;
case "mouseOver":
event.currentTarget.gotoAndPlay("over");
break;
case "mouseOut" :
event.currentTarget.gotoAndPlay("out");
break;
default:
trace("onbekende mouse event");
break;
}

}

cs_btn.addEventListener(MouseEvent.MOUSE_DOWN, cs_buttonEvent);
cs_btn.addEventListener(MouseEvent.MOUSE_UP, cs_buttonEvent);
cs_btn.addEventListener(MouseEvent.MOUSE_OVER, cs_buttonEvent);
cs_btn.addEventListener(MouseEvent.MOUSE_OUT, cs_buttonEvent);

Why Wont My Font Display Correctly When Published? - Desperately Need To Work It Out
im using a .tiff font for pc and flash 8. ive trying the font with all the diff anti-alias settings and published the movie, in publish it looks fine, but as soon as i import it to dreamweaver and pres play the font doesnt display. werid. i have no idea why its doing this.

i changed the font settings to 'use device fonts' an dit works. but the charchetrs of the font look well bad..

any suggestions would be super appericasted as the client is on my back about this!!

thanks a mil

&, ", And ' Do Not Display Correctly In Dynamic Text Field When Loaded From XML
hello,

i'm having problems getting certain characters and punctuation marks to display correctly when a string from an XML is loaded into a dynamic text field. they are displayed as "&" """ etc etc..

i'm am pretty much stuck with using an XML file, so if there is any way i can get these characters to display properly utilizing the following code with as little modification as possible, that would be great!

here is what i'm using:

PHP Code:



var my_xml=new XML()
var fileList:Array
my_xml.ignoreWhite=true
my_xml.load(_root.fileName)

my_xml.onLoad=function(success){
 LoadFileList()
}

function LoadFileList(){
 var len=my_xml.firstChild.childNodes.length
 var scrollingText=my_xml.firstChild.childNodes[len-1].childNodes.toString()
 info_dt.text = scrollingText //info_dt is the dynamic text instance
 } 




any help would be greatly appreciated!! thank you very much

Help With Flash Upload Applet. Will Not Work Correctly In Mac Broswers. PC Browsers Are Fine
I have a custom made flash upload applet to go into my main application. It allows users to queue up a large amount of files and upload them all at once. The system works great on all PC browsers. However, on Mac browsers, it doesn't work properly. The first file gets stuck and is never completed. Here is the even more frustrating part: it works on the original coders server on my Mac, but not on my server where I need it to.

Original Coder's Sever

Our Server

I could really use some help here. My coder doesn't have a Mac so it is making it impossible to fix. I was hoping some people here might have some insight.

Here is the source and compiled code.

Flash Uploader Files

Again, I really really appreciate any help. This is holding up the project and no one on my team can seem to figure it out. Thanks!

Setup Loaded Movies To Work Loaded Or Standalone
Hi Guys

How do I get a movie to work as a standalone movie - when i'm building it - and also work as a loaded movie in a parent movie that loadMovie or loadMovieNum this movie.

It just get annoying having to always change paths after I finish building my sub-movies because half the time I get it wrong - it might take me a couple of hours to get the move working as a standalone, but then i can take more hours to get it working as loaded.

any ideas??

thx

"Transparent Window" Does Not Work Correctly.
I have used transparent window in my new site to allow the html background to show through transparent sections in flash. This works fine on my pc using internet explorer. Fowever, on macs, opera, and I think Netscape, this does not work. The browsers display the flash flash and html background color and only at the edge of the browser window does it show my background. Has anyone else experienced this?

Loaded Swf Won't Work The Second Time It's Loaded.
I'm using the great flip book code from iparigrafika.hu

I have an odd bug when loading the 'PageFlip' swf into by base swf.
It loads into level10 using the 'loadmovie' action.
It loads the swf and works perfectly but if you load a different swf and the reload the 'PageFlip' swf, all the page turning functions don't work???

the 'FlipPage' is at this link ---> http://www.iparigrafika.hu/

By the way it's a fantastic bit of coding and well worth playing with, if unlike me you know what your doing!!!

Can AS2 Swf Be Loaded In AS3 And Work?
I have this quick simple question -
I have flash player version 8 files(AS2) and Flash Player 9 file(AS3) as main clip - can I load these AS2 files into AS3 file and have them working as they should?

Why Won't The DuplicateMovieClip() Work On A Mc That Was 'loaded'?
Hi,

I'm having trouble getting the duplicateMovieClip() to work on a target mc that has been loaded like this.

1. mc.loadMovie(some movie);
2. Wait for mc to load completely.
3. mc.duplicateMovieClip(somename, level);
4. trace(somename)
5. output = 'undefined'

It works fine if I don't use the loadMovie method.

What's up with that?

AttachMovie From Loaded .swf Does Not Work
According to one tutorial I made a movie which load pictures as a separate clips from another movie library.swf. The script si simple:

placeHolder.loadMovie("library.swf");
if (Number(_framesloaded)>=Number(_totalframes)) {
gotoAndPlay (3);
}

loads the library movie and waits until its loaded.
Then there si something like this:

placeHolder.attachMovie("obr1", "myobr1", 1);
placeHolder.myobr1._x = -121;
placeHolder.myobr1._y = -70;

To attach clips to specific position.

The problem is, that it works perfectly on my local machine (and it does not matter, whether I acces the movie directly or via internet server), but when I place it to remote web server, to external clips simply do not appear.
Does anybody have an idea, where the problem might be?
Thanks for any help!

Why Won't This Code Work When Loaded?
Why won't this code work when the movie containing it is loaded into a level of another?!?

onClipEvent (mouseMove) {
myPoint = new Object();
myPoint.x = this._x;
myPoint.y = this._y;
_root.volSlide.globaltolocal(mypoint);
_root.play.mySound.setvolume(1*mypoint.x*5);
updateAfterEvent(mouseMove);
}


Thanks in advance
Ol

Controller Won't Work In A Loaded Swf, Anyone?
I have a series of jpegs controlled by a controller component ( ie next, previous and autoplay) this works fine as an swf but when I loadthis movie into another and test it the controller no longer works and is stuck on the first frame. Can anyone tell me why?

Buttons On Loaded Swf Don't Work
I searched this forum high and low for the answer to this questions but couldn't find anything. Any hints/tips/suggestions would be greatly appreciated

When I load an swf into an MC instance on my main movie:

ActionScript Code:
function openMovie(whichmc) {
    loadMovie(whichmc, _root.contentbox1);}
...the swf opens but it's buttons don't work. Actually, they do work when I program them manually with rollover stuff (editing up/over/down/hit properties) but the actionscript events do not work:

ActionScript Code:
_root.topbutton.onRelease = function() {
    clearInterval(scroller);
    quickie();
};
Is there any easy solution for this? I have seem some mention of "paths" or "levels" although I could quite figure out if this was the problem. Does my secondary swf need some further pathing to execute the actionscript properly? I built it as if it was a standalone swf.

Thanks,
Cheez

SetInterval In Loaded Swf Does Not Work
Hi folks, I am loading a *.swf into an mc instance via loadMovie().

main movie:
ActionScript Code:
function openMovie(whichmc) {
    loadMovie("myMovie.swf", _root.contentbox1);}
I use a setInterval function in some button script in "myMovie.swf" that does not work when loaded into the _root.contentbox1. (thanks CyanBlue for the diagnosis )

external swf:
ActionScript Code:
this.topbutton.onRelease = function() {
    clearInterval(scroller);
    quickie();}

function quickie() {
    scroller = setInterval(moveHome, 5);
}
Any obvious reasons why?

Thanks,
Cheez

*link to original thread http://www.actionscripts.org/forums/...threadid=22307

LoadMovie : My Loaded Swf Won't Work
Hi Everyone:

I have a problem when loadind a clock swf into a MC. The clock that works fine on itself , won't work when loaded into the MC. To clarify, the hierarchy of my site is like this:

Main Fla>
page1MC>
clock.swf(loaded into an EmptyMC created inside page1MC).

The code is as follows inside the page1MC timeline:

this.createEmptyMovieClip("newClock", 10);
newClock._x=300;
newClock._y=-20;
newClock._xscale=newClock._yscale=50;
newClock.loadMovie("clock.swf","newClock");

This code loads the clock.swf movie just fine but...the clock doesn't work. Why is this?. Is it because in the original clock.fla I referenced the _root timeline to get the time and date...?.

How can I solve this?. I have the same problem loading another swf that loads jpgs dinamically into it....

Thanks for your help in advance.
Txusm

Copyright © 2005-08 www.BigResource.com, All rights reserved