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




Unusual Error While Preloading Swf File



Hi,

I get the error "A script in the movie caused Flash Player 10 to run slowly."

I'm doing a preload of an external swf via as2 which is around 7mb. Then the message "A script in the movie caused Flash Player 10 to run slowly" pops up around ever 15 seconds or so. However, this does happen with smaller files. Any suggestions? Many visitors may think the game is broken and leave the page..

Help?

Here is the code.


Code:
var loader:MovieClipLoader = new MovieClipLoader();
this.createEmptyMovieClip("MyImageContainer",1);
loader.loadClip(_root.gPath,MyImageContainer);

var preload:Object = new Object();
loader.addListener(preload);

preload.onLoadStart = function(target)
{
target.stop();
}

preload.onLoadProgress = function (target, loadedBytes, totalBytes)
{
bar._xscale=Math.floor((loadedBytes/totalBytes)*100);
loader_text.text=Math.floor((loadedBytes/totalBytes)*100)+"% loaded";
}

preload.onLoadComplete = function(target)
{
getUrl("javascript: loadGame('"+gPath+"');");
}
However, when i use as3's loader component to preload the game this message doesn't popup. But the problem with this approach is explained bellow for reference. Note that please don't confuse this with my as2 attempt mentioned earlier.

My as3 preload attempt problem.

I'm using the following to preload external swf.


Code:
stop();

import flash.display.*;

var request:URLRequest = new URLRequest("main.swf");
var loader:Loader = new Loader();

loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, loadProgress);

loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadComplete);
loader.load( request )

function loadProgress(event:ProgressEvent):void
{
var pcent:Number=event.bytesLoaded/event.bytesTotal*100;
loading_bar.scaleX=pcent/100;
percentage_text.text=int(pcent)+"%";
}

function loadComplete( event:Event ):void

{
navigateToURL( request,"_self");

}
I would also be happy if this problem is solved instead. Around 70%, some times 20% the sound of external swf plays. How can I define it so that sound does not play. I was suggested by some to insert an empty first frame, but I don't have source of all the games. so that is not a solution.



ActionScript.org Forums > ActionScript Forums Group > ActionScript 2.0
Posted on: 01-25-2009, 03:55 PM


View Complete Forum Thread with Replies

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

Unusual Error: Assistance Requested
Hello,
I have a stander containermc movie clip that is used to contain an swf using the loadMovie command. I am using this command from the main.swf file. _root.containermc.loadMovie("gallery.swf").

Here is the strange thing. Gallery.swf has a shared movie clip from shared.swf. For some really strange reason, depending on what layer that shared movie clip is on in the gallery.swf, that will effect whether the gallery.swf is loaded or not from main.swf? Im thoroughly stumped. Any help would be tremendously appreciated. Thank you for your time everyone
Don Ho

Unusual Streaming Audio Error
I have an enigma, wrapped in a conundrum, smothered by a puzzle, and beaten by a mystery.

I have a long flash movie consisting of 5 scenes. Several of the scenes have audio on the main timeline set to streaming. But in one of the scenes the last second of the audio is getting cut-off. Through trial and error I have isolated the problem.

As you can see in the file I have uploaded, there are two scenes, each with audio on the main timeline. The end of the audio in 5d is getting cut off, but if I delete the audio in 5b, or delete scene 5b all together, the audio in 5d seems to work fine. How is it that one clip of audio, in a separate scene is effecting the performance of a separate clip in a different scene?

Well, I've tried to upload the file, but I am getting an error message when I try, whats up with that, actionscript.org?

Error #2044: Unhandled IOErrorEvent:. Text=Error #2038: File I/O Error.
Gday guys,

im making a lil flex app to upload images for guys on my forum.. problem is, it works fine in opera and firefox im told now also, but in internet explorer.. im getting this error..

"Error #2044: Unhandled IOErrorEvent:. text=Error #2038: File I/O Error.
at uploadd$iinit()
at _uploadd_mx_managers_SystemManager/create()
at mx.managers::SystemManager/::initializeTopLevelWindow()
at mx.managers::SystemManager/::docFrameHandler()"

this is my code? its str8 off the adobe site itself. from what i gather, its the way the scipt is handling the error itself? its terminating itself bcos of it.?


Code:
<mx:Script>
<![CDATA[
import mx.controls.Alert;
import flash.events.DataEvent;


public var fileRef:FileReference = new FileReference();

public function upload():void {
// listen for the file selected event
// listen for the upload complete event
fileRef.addEventListener(Event.SELECT, selectHandler);
fileRef.addEventListener(Event.COMPLETE, completeHandler);
fileRef.addEventListener(DataEvent.UPLOAD_COMPLETE_DATA , uploadCompleteHandler);


// browse for the file to upload
// when user selects a file the select handler is called
try {
var imageTypes:FileFilter = new FileFilter("Images (*.jpg, *.jpeg, *.gif, *.png)", "*.jpg; *.jpeg; *.gif; *.png");
var allTypes:Array = new Array(imageTypes);
var success:Boolean = fileRef.browse(allTypes);

}
catch(error:IOErrorEvent) {
trace("IOErrorEvent catch: " + error);

}



}

// when a file is selected you upload the file to the upload script on the server
public function selectHandler(event:Event):void {
var request:URLRequest = new URLRequest("upload.php")
try {
// upload file
fileRef.upload(request);
textarea1.text = "uploading " + fileRef.name + "...";
}

catch(error:IOErrorEvent) {
trace("IOErrorEvent catch: " + error);

}



}

// dispatched when file has been given to the server script. does not receive a response from the server
public function completeHandler(event:Event):void {
trace("file uploaded complete");


}

// dispatched when file has been uploaded to the server script and a response is returned from the server
// event.data contains the response returned by your server script
public function uploadCompleteHandler(event:DataEvent):void {
trace("uploaded... response from server:
" + String(event.data));
textarea1.text += event.data as String;
}

]]>
</mx:Script>
Also id like to be able to directly have the link traced into the message box itself, so people dont have to copy n paste.. is there an easy solution in the php code?

Heres the link, the upload is on the left of the main reply box.. heres a direct link to the forum, use

User: Ryann
Pass: temp

http://www.weride.net/ThrashedMinis/phpBB2/

, and press a reply or new topic sumwere to view it.. thanks for anyone taking a look..

Ryann.

Strange Error: Error Opening Url File (that Is No Longer Loading Into Movie)
I had a few external swf's loading into my main movie, and after several revisions I went through my directory and deleted the swf's that were no longer being used.
Now I am getting an error that one of them cannot open, (it is one of the deleted that I am no longer using)
I know where the code should be, because of the timing of when the error appears in the output window, but I cannot find
code anywhere telling this movie to load.

Any ideas about what I could have done and how to find it?


Here is the actual message:
Error opening URL "file:///P|/Web%20Projects/CBS/Natri/NATRI%202003/hosted.swf"

Preloading In AS3 Error
Error #2044: Unhandled IOErrorEvent:. text=Error #2036: Load Never Completed.

What did I do wrong ?

Her is the code:
var l:Loader = new Loader();
l.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, loop);
l.contentLoaderInfo.addEventListener(Event.COMPLETE, done);
l.load(new URLRequest("Button.swf"));

function loop(e:ProgressEvent):void
{
var perc:Number = e.bytesLoaded / e.bytesTotal;
percent.text = Math.ceil(perc*100).toString();
}

function done(e:Event):void
{
removeChildAt(0);
percent = null;
addChild(l);
}

Preloading Error...possibly A Bug In My Software?
I work in a multimedia lab at Eastern Washington University, and a guy came in with a problem of a movie being too long and the loading of the movie too slow on a slower connection. i had to re-arrange the clips, do a few cosmetics to it..but when it came to script the darn thing for the preloader, it kept loading up until 50% and then played itself without the entire movie being loaded. any suggestions on how to correct this nasty problem?

lata ya'll

jason

Error #2068, Preloading Sounds Problem
I'm trying to preload everything internally within one SWF because most upload sites have that restriction.

However, I'm having a lot of trouble trying to preload sounds to be used in AS3. It keeps giving me Error #2068: Invalid Sound when I try to play the sound.

I have the sound placed on the Timeline in frame 2, and the sound is set to export at that frame. I instantiate and play the sound after the whole movie is loaded with:


Code:
snd:Sound = new SoundClassName();
var channel:Channel = snd.play(); // error is thrown here
But that error keeps popping up. The sound looks to be loaded and playable because if I go to frame 2, I can hear the sound play. I also know the class is exported since the object instantiation does not throw an error.

Any ideas or suggestions?

Thanks.

Error Preloading External Dynamic Images
I try to load into a movie an external dinamic image like dinimage.php?source=myimage.php&width=300;

When i try this, I can note that te getbytestotal, returns me negative values like (-1) while the picture is loading.

this causes that I can't make works preloaders movies for this external movies.

I have this problem locally and remotely

Any idea ??

Preloading Jpeg Files (preloader Sequence Error With IE)
// preloader
j = 1;
_root.createEmptyMovieClip('preloader', 12);
preloader._x = Stage.width/2;
preloader._y = Stage.height/2;
preloader._alpha = 0;
_root.createTextField('preloaderText', 13, (Stage.width/2)-25, (Stage.height/2)-25, 300, 100);
Int = setInterval(function () {
if (j<9) {
preloader.loadMovie('image'+j+'.jpg');
bytesLoaded = preloader.getBytesLoaded();
bytesTotal = preloader.getBytesTotal();
trace(bytesLoaded);
if (bytesTotal>0) {
if (bytesLoaded == bytesTotal) {
j++;
trace("image"+j+" loaded");
} else {
preloaderText.text = 'loading...'+bytesLoaded;
preloaderText.autoSize = "left";
trace(bytesLoaded+" of image"+j);
}
}
} else {
removeMovieClip("preloader");
removeMovieClip("preloaderText");
play();
clearInterval(Int);
}
}, 1000);


My problem is while it works fine with NETSCAPE > 6 browser it doesnt with IE 6

Now I use flash player 6 plugin on both browsers
I am using a DIAL UP
it works with IE with other people because they are using a faster connection
in IE i notice that the status bar shows a 'downloading' status when loading the flash movie yet it doesnt seem to continue after that.

the movie can be viewed at
http://www.onlinetnt.com/draft/flash/DIALUP_REDRAFT.swf

What is wrong here

Preloading Jpeg Files (preloader Sequence Error With IE)
// preloader
j = 1;
_root.createEmptyMovieClip('preloader', 12);
preloader._x = Stage.width/2;
preloader._y = Stage.height/2;
preloader._alpha = 0;
_root.createTextField('preloaderText', 13, (Stage.width/2)-25, (Stage.height/2)-25, 300, 100);
Int = setInterval(function () {
if (j<9) {
preloader.loadMovie('image'+j+'.jpg');
bytesLoaded = preloader.getBytesLoaded();
bytesTotal = preloader.getBytesTotal();
trace(bytesLoaded);
if (bytesTotal>0) {
if (bytesLoaded == bytesTotal) {
j++;
trace("image"+j+" loaded");
} else {
preloaderText.text = 'loading...'+bytesLoaded;
preloaderText.autoSize = "left";
trace(bytesLoaded+" of image"+j);
}
}
} else {
removeMovieClip("preloader");
removeMovieClip("preloaderText");
play();
clearInterval(Int);
}
}, 1000);


My problem is while it works fine with NETSCAPE > 6 browser it doesnt with IE 6

Now I use flash player 6 plugin on both browsers
I am using a DIAL UP
it works with IE with other people because they are using a faster connection
in IE i notice that the status bar shows a 'downloading' status when loading the flash movie yet it doesnt seem to continue after that.

the movie can be viewed at
http://www.onlinetnt.com/draft/flash/DIALUP_REDRAFT.swf

What is wrong here

Preloading Swf, Adds It To The Stage And Then Get Error When Clicking On Dropdown
Hello,

I have a preloader that loads my main swf-file and when it's loaded I add my main swf to the stage. In my main swf I have a lot of stuff and a couple of dropdowns. When everything has been loaded and added it looks fine but when I click on on of theese dropdowns I get the following error:


ActionScript Code:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at fl.containers::BaseScrollPane/drawBackground()
    at fl.controls::List/draw()
    at fl.core::UIComponent/drawNow()
    at fl.controls::List/scrollToIndex()
    at fl.controls::SelectableList/scrollToSelected()
    at fl.controls::ComboBox/open()
    at fl.controls::ComboBox/onToggleListVisibility()

(if i just run my main swf without preloading it works fine)

I have a document class where I add eventlisteners to my dropdowns...

Any help appreciated. Thanks.

Error#1009 While Preloading External Swf Files In The Main Swf
HI everyone,

I hope you all have a nice day and there is someone out there who could help me :-)

I am loading external swf files into my main swf with this code:


ActionScript Code:
import flash.display.Loader;
import flash.net.URLRequest;
import flash.events.Event;
stop();


    var myLoader= new Loader();
    myLoader.x = 230;
    myLoader.y = 110;
    myLoader.name = "containerSwf"
   
    stage.addChild(myLoader);
    myLoader.load(new URLRequest("PFP GROUP web.swf"));

   
CladtekIntro_btn.addEventListener( MouseEvent.CLICK, loadCladtek);
function loadCladtek(Event:MouseEvent): void
{

      myLoader.load(new URLRequest ("CladTek.swf")); 
       
}

and so on I have made a few more buttons load different swf's.
The external swf files, in this case "PFP GROUP web.swf" and the rest of my swfs have their own preloaders in their own timeline with the following code:



ActionScript Code:
import flash.display.*;
this.stop();

this.loaderInfo.addEventListener (ProgressEvent.PROGRESS, PL_LOADING);

function PL_LOADING(event:ProgressEvent):void {
var pcent:Number=event.bytesLoaded/event.bytesTotal*100;

lbar.scaleX=pcent/100;
lpc.text=int(pcent)+"%";
if(pcent==100){
this.gotoAndStop(2);
}
}

Then I export the movie PFP GROUP web.swf with simulate download and everything works fine, loading bar progresses OK. When I export my main swf and come to clicking on the button that loads PFP GROUP web.swf it gives me hundreds of Error messages WHILE the loading of this file is happening.This is what the Error says:


Quote:




TypeError: Error #1009: Cannot access a property or method of a null object reference.
at PFPGroupweb_fla::MainTimeline/PL_LOADING(




I guess the Error is in the comunication between the swf's somehow because I don't get any Errors when exported on its own, and it does say that is in the PFPGroupweb_fla::MainTimeline/PL_LOADING(. I also can't figure out why is in the _fla file!?

If you know what the problem is can you please tell me, any help will be greatly appreciated. Thank you

Ananda

[MX04] Preloading Your Main Swf File In A Seperate File
hey there

Almost all of my flash files now use a lot of scripting and exported objects on the first frame of my main movie file, often resulting in a large weighted file on frame 1 i.e say 100-150k.

Is there a reliable way to preload this swf file? Having a standard preloader on frame one just results in a large download before you even get to see the preloader.

I would have thought its possible to have a base layer then load the main movie on a new level, but then all my _root paths would need amending, and its just not the easiest way for me to work.

I guess in an ideal world, I would need a preloader movie that sits infront of the main swf, and when it reaches say 30% of loading the main movie, then replace itself with that main movie file..... but not sure how you would do that

Anyone else having this same problem

Very Unusual
I am using a simple droptarget command

ActionScript Code:
this.onRelease = function() {
    stopDrag();
    var d = eval(this._droptarget);
    trace(d)
    if (d == con10) {
        trace("Got it!");
    }
};

but it doesn't work and I cannot see why...it 'works if the code is


ActionScript Code:
if (d != con10)


i.e if I tell to say got it when it is not over the targert it traces 'got it' when it does and if I have it the proper way it does it when it isn't..it's working completely back to front any idea why???

Zen

Unusual Circumstances
Can anyone shed some light on this...

I have a viewer animation that uses a button inside a movie clip in order to assign instances. I use multiple instances of the movie clip and then the script assigned to the button determines what another movie clip should do according to instance this._name

Now these are the unusual circumstances:
1)Flash 5 created a successful .swf only when viewed through a html doc and when viewing the swf what is seen is a not finished version. - Deleted temp int. files renamed file, recreated the buttons etc. with no change in luck.
2) tried it on a different pc that I had tested a previous version of the file that didn't work - that pc won't even properly view the file on the web that 'virgin' pc's(or pc's that have not seen a non working version) all view with no trouble.
3) tried out the Flash MX - swf publishes fine and the file views fine through a html doc.
4) upgraded the player on the pc that wouldn't view anything properly and now the file views fine but the flash5 still does not publish a working swf.

HELP!

[Edited by aadrian on 03-16-2002 at 07:54 PM]

Unusual Flash
Guys! I sometimes see the flash files that seem to be separate from the main HTML document. They seem not to be embedded.
Like on yahoo movies (movies.yahoo.com) it usually happens or anywhere else. Or like here - http://www.freewebtemplates.com/
Can anyone tell me how to do that?
Thanx in advance!
Ciaz!

Unusual One For A Friday...
Quick query.

my flash movie has a button that loads a new page into a different frame.

a second flash movie in the same frameset needs to interact with the information in this new page.

can my first flash movie tell when the new page has been successfully loaded? is there a
on getUrl_Success type function?

cheers

Unusual Problem
I'm having a problem that I've never had before. I'm trying to make invisible buttons.

Here is the overview.

I have an image from photoshop that is a set of smaller images. Imagine a bunch of picture laying on the floor, that is what this is. I bring the image in to my swf file and it is the background. On the layer above I have put shapes over some of the images, converted them to buttons, then deleted everything but the "hit" area. This basically makes an invisible button. Now when the button is clicked it goes to a certain frame in a holder_mc. My problem is when I use this code.

on(rollover){
holder_mc.gotoAndPlay(2);
}

I get this error.

Mouse events are permitted only for button instances
on(release){

I don't understand why this is happening. If the shape that I converted to a button is a button class why would this not be working? Any ideas?

Unusual Mc Behaviour.. Help
Hi there,

I have a movieclip that I bring into appearance by using the mx transition class. I have a few buttons on the movieclip when clicked should open an image in a new browser window. However, the buttons are not doing anything when I click them even though I have applied script to them. Below is the sort of script that I am applying directly to the buttons.


Code:
on(release) {
getURL("http://images.mywebsite.com/image1.jpg", "_blank");
}
Any ideas why the buttons are not doing anything?

Thanks

[F8] A Very Unusual Problem
Here is the link so you can see the problem:
http://www.glimedia.com/FlashExamples/timeline.html

This movie is 1000px x 500px, and I dynamically link 11 movie clips (each 1000px x 300px) in a row using the following script:

var imagesNumber:Number = 11;
for (i=1; i<=imagesNumber; i++) {
myTimeline.attachMovie("t"+i,"t"+i,i);
Load_mc= myTimeline["t"+i];
Load_mc._x = (i-1)*1000;
}

The mc "myTimeline" is an empty container for the loaded movie clips. As you can see, the first 4 loaded movie clips grey out the film strip at the top. Once you reach the 5th one, they show up great. I am guessing this is a stage width issue, because if I reduce the variable ImagesNumber to 8, they all show up perfectly. However this won't work for me, I need all 11 and eventually a 12th. The wierd part is that the text below it shows up just fine, and it's part of the same movie clip. The covered area is a film strip that dynamically loads a bunch of external jpegs.

Does anyone have any ideas on how to fix this? If this helps, I originally created this file at 1000px x 700px, and it did not have this problem.

Thank you in advance for your help.

Maybe Unusual Qustion
hi guys!!
i'm heaving a problem with macromedia flash...
i have designed a webpage and in page created a kind of flash photo album.. now what i want is when someone click in the photo to open a movie in Win.MediaPlayer outside of browser, .. i'm planing to use this page in Lan mode like a movies launcher.. so the page is not going to be on internet, all activities are going to be in LAN,  but i dont know in which way to do this, link a photo or a button that would open a movie in winMP.. is there a way to help me on this.. i will appreciate very much that!

Unusual Question
I'm using Flash in the projector "mode" and I have a video window about 25% of the size of the screen. I use flash to display my lesson plans to my classes in lieu of an overhear projector or something else like that.

However, when I use a LCD projector to thrown the flash presentation on the classroom wall or screen, the video in the video window fills the screen once the video begins to run, hiding whatever else is on the other 75% of the screen.

Does anyone know how I can "confine" the video to the quarter of the screen so other information in the frame is not lost?

Thanks!

Unusual Preloader Problem
I have a sales demo that basically runs linearly from beginning to end. Iit consists of a main movie with a preloader, and then 4 seperate external movies with their own preloaders that get loaded into the main movie at different points in time.

The problem is that when an external SWF movie is loaded, the main timelines play head continues on it's merry way, while the external SWF's preloader is doing it's thing...(which will take undeterminable amount of time based on a user's Internet connection speed). The problem is that the number of frames I have allocated to the external SWF on the main timeline inevitably will be wrong and cut the extrenal SWF off before it's even finished playing.

How can I structure it differently so that I can still keep the individual preloaders on each external SWF yet still have my main timeline "wait" (while still playing the looping audio track) until the external SWF is completely loaded?

You can view the Flash demo here:
http://www.twisttop.com/citrix/citrix_final_v3b.html

Thanks in advance,
Joe

An Unusual LocalConnect Problem..
I have to send a variable from A.swf to B.swf. B.swf is opened in a new browser window from a button in A.swf. (which works just fine)

When I publish/upload my site to my webhost, B.swf fails to receive the variable.

I believe it is because there is a lag-time from the on (release) to the first frame of B.swf. Know what I mean? (since B.swf is not even open until about 2 seconds after the button is released)

Here is an advanced topic which better describes my problem:

http://webforums.macromedia.com/fla...threadid=457943

If one of you could please clarify that thread, and help me understand how I could:

1) invoke the getURL to open the B.html and thus the B.swf

2) then fire off a Local Connection from B.swf to A.swf (saying 'yes I'm
here')

3) then if 'yes I'm here' is received then send the REAL variable from A.swf to B.swf


Thanks in advance for any help. I really need it. =(

Unusual Sound Problem
I'm not a newbie, I've been making Flash productions for while, but there's a problem that in the past I've attributed to my old (slow) computer.

In my cartoons, the sound slowly slips out of sync. After a minute or so, you start noticing that the sound is playing a little before the picture, and it gets worse the long you watch, unless Stop it then Play it again, which gets the sound back in sync.
It affects all sounds, no matter when the keyframe that starts occurs the sound in the movie.

I've gotten into the habbit of making all my sounds as Stream so they keep the picture in sync with the sound for slower computers if the picture lags. Could this be causing the problem? (I'm using the default 12fps by the way.)

I would appreciate any suggestions.

[f8] Unusual Loading Bar Setup
Hello All!

So, I have a Flash page which is waiting for the implementation of a loading bar, right now it is up on my universtiy account:

https://webspace.utexas.edu/sittem/F...f?uniq=-95rxlc
(I just set it to public so hopefully no one will have trouble viewing)

A disclaimer before you visit this - this page takes a really long time to load, thus the reason I am intent on a loading bar that works! (My client needs the huge jpgs (didnt want me to make them vector) so what can I do?)

I have done various loading bar tutorials on this site, gotten loading bars to work in the past, here is my unique problem: This site is one "background" site (the book background) with 10 smaller .swfs on top of it that load on a higher plane. So I need the bar to be aware of this... situation.

I know I could combine these into one swf, but I like the artchitecture of the site how it is and would prefer it to stay in tact. If anyone has any advice on how to differently construct the action script for the Loading Bar, or have seen any tutorials that address this issue, please share with me!

[CS3] Unusual Change After Break Apart
When breaking apart an image, there is sort of a 'residue' attached to some parts where the image has connected.
Problem is explained with a picture below.

The image was imported from a Photoshop CS3 document which can be found here for you reference.
http://www.acies-opacus.com/downloads/lOGO2asdorig.psd
As you can see in the PSD there is no 'residue'.
Thanks in advance for any help anyone can offer.
- Doc

Unusual Question - Moving From AS 2.0 To 3.0
What has been the biggest obstacle for you making the switch from AS 2.0 to AS 3.0?

I'm going to be upgrading my skills from 2.0 to 3.0 over the next several months. Since, I really learned advanced AS 2.0 here on the as.org forums ... I'd like to hear from the as.org community as to what to expect as I make the switch.

Thanks.

Unusual Mailto: Problems
I'm having problems with 'mailto:'

This is the script I have attached to my button :


on (release) {
sender_mail = _root.Semail.text;
sender_name = _root.Sname.text;
sender_tel = _root.Stel.text;
sender_company = _root.Scompany.text;
sender_subject = _root.Ssubject.text;
sender_message = _root.Smessage.text;
sender_body = sender_mail+sender_name+sender_tel+sender_company+ sender_message;
getURL("mailto:"+sender_mail+"?subject="+sender_su bject+"&body="+sender_body);
}


As you can probably gather I have input text fields for email, name, telephone number, company, subject & message.

My problem is this;

I need to have all these variables in the body part of my email, as you can see I've used concatenation of the necessary variables.
But despite my best efforts I cannot find a way to get line breaks between the variables in the body of the mail. All variable texts simply line up end to end in one long stream of text.

My hands are tied due to the fact that my server will not allow ASP, PHP, CGI etc to be used on the server. (Philistines!!)

I've scanned the tutes, been on the MM technotes sites and read all the relevant Flash MX help files. They make vague mention of escape characters (which I tried unsuccessfully) and unicode characters, which I could not make sense of.

Can anyone help? Is there a workaround I can use?

Any help would be really useful.

Button>URL Unusual Problem
Hi. I have a problem and can't figure out if it is Flash, or something to do with the server or the PHP. Let's see if I can explain this.

I have a PHP CMS (Websitebaker) I am using on my site. All content pages live in a subdirectory called /pages and so when you go to the main url http://www.stormvisions.com it is redirected to http://stormvisions.com/pages/intro.php which is a Flash front page.

I used buttons for the links on this page with getURL(onrelease) and the links work fine locally on my PC. The links also work online if I go to http://stormvisions.com or directly to http://stormvisions.com/pages/intro.php but if I go to http://www.stormvisions.com while the buttons up,hover and down states work the link itself is not fired onrelease.

The embed code I am using is basic - I tried the Flash generated code and the swf didn't appear at all- and I tried several variations to no avail.



I am using Flash CS3 but saved as 8.0.24 so I could use the button symbol (I'm not much of a coder anymore and couldn't seem to create a function to handle all the button interactions in AS3). The code is the basic one











Attach Code

<embed width="940" height="717" menu="false" loop="true" play="true" src="http://stormvisions.com/templates/splash/splash.swf" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed>

on(release){
getURL("http://www.stormvisions.com/pages/help/blog.php","_self");
}

Unusual Collion Detection
i have two movie clips

mcTrap and mcCharacter

how can i detect collision (character is fully inside) over the trap door?

Please help, this is doing my nut!

much love

Unusual Loader Behavior
Hi Guys,

I'm trying to do the old effect of a border resizing before a image is loaded into it and I'm running into an issue where it's resizing the image that is loaded in.

I attached the file so if anyone can take a look and shed some light on the issue it would be greatly appreciated.

Thanks,
Saveth

Unusual Font Problem
I am having a problem with a certain font in Flash. The 'space' charecter is not showing up. So, for example, when I type "My Name is" I actually get "MyNameIs". The font is a PostScript font (Solex by Emigre). It works fine in PS and AI. Any ideas?

Thanks!

Unusual Projection Problem
I'm using Flash MX in the projector mode to use in class on a movie screen on the wall. I've been trying to "cheat" on a video capability by using the Windows media player in the "stay on top of all other apps" mode. Dumb, I know . . .But the videos are like 4-6 minutes long a take up thousands of frames.

When I lauch the video, I have to <fn> F8 twice to reveal the video, but it fills the screen. And, it looks/sounds really crappy as it cycles through. I want to confine the video to the lower left corner, about 25% of the frame.

How can I have a constant video window present that plays when I reach a certain point in the presentation and invoke it manually, keeping the video in the designated part of the frame and in such a way that it doesn't drag on my flash movies which run concurrently (Resources are not a problem--I have a fully-loaded Dell M60, though it only has a 1.8 GHz coprocessor)?

Error When Export Flash File Into Quicktime MOV File? Help Me
Hi everybody!!
When I export my flash file into MOV file, the program notice that:
" The installed version of Quicktime does not have a handler for this type of Macromedia Flash movie."
What does it mean? What I should do to export flash into MOV in right way??
Please help me. Thanks a lot.
PS: I used Flash MX 2004 7.0 and Quicktime movie 7.1.5

Unusual Load/unload Movie?
Hi all from Buenos Aires. I have vary basic knowledge of Action scripting but I have to work on a site.

I would need some help.
Basic I'd like to know this:
I have a movie "A" that loads a movie "B".
The movie "B" can order to the movie "A" to unload movie "B" and load movie "C"??? What kind of scritp should I use?

The site is like this:
connecting to the domain you see the file: index.swf that's a basic animation.
At the and of the animation, I used this action to load: menu_italian.swf

loadMovieNum("domain.it\menu_italian.swf", 100);

In the movie "menu_italian.swf" I'd like to add a botton that basically order to index.swf to load "menu_spanish.swf" and to unload menu_italian.swf

(in the movie ""menu_spanish.swf" there will be a botton that says the oppositie: unload "menu_spanish.swf" and load: "menu_italian.swf")


IS THIS POSSIBLE????
Thank you vary much,
Federico

Unusual LoadMovieNum Repositioning Issue
Trying to load some old swfs into a new Flash project by using the loadMovieNum via a button.

I did these swfs 4 years ago as part of something else, back then I just created a new stage the same size as my level_0 main movie (800x600) and positioned them in the right place on a blank back.

In my new project (also 800x600) they don't line up exactly, so I need to reposition the x & y points.

They are big movie clips so I don't want to have to import them and make swfs again which will be incredibly time consuming, just want to move them so they line up into my content space.

Here's the code I've already tried but the clips dont move at all:

on (release) {
loadMovieNum("movies/old_movie1.swf", 300);
var xset = 270;
var yset = 250;
}

I wonder if its because the clips are the same size (800x600) that they don't want to move.

Ideas?

Unusual Behavior When Scaling Html
hello;

I have:
HTML with:
- <object/embed> w x h ==> 400 x 300

FLASH with:
- stage w x h ==> 800 x 600
- stage scaleMode ==> SHOW_ALL

RECT ( from sprite.graphics.rect ):
- rect w x h ==> 400 x 300
//my_sprite_graphics.drawRect ( 0 , 0 , stage.stageWidth , stage.stageHeight ) ;
// when the sprite's rect gets created, the stageWidth x stageHeight ==> <object/embed> w x h = 400 x 300
// so the rect gets values 400 x 300 which should fill up the stage/HTML also at 400 x 300 ;

PROBLEM: the rect only fills up a portion of the stage/HTML;



for the example that I have presented here the rect only fills up half of the stage/HTML, which appears to be determined by 400/800 x 300/600 ==> .5 x .5 ==> 200 x 150 px ;


any thoughts as to why the rect does not fill up the flash stage/HTML?


thanks,
Shannon



here is a screenshot:

Unusual Problem With Using _global Variables
Hi, I've read many posts about this _global function but I've run into a problem I can't solve and haven't seen in any other post.

I'm using Flash MX 2004 with Actionscript 1. I have multiple swf files that I load into a base swf movie. I'm publishing the base movie as a Flash 7 player version because I'm using some of the new 7 functions. But the loaded movies are using version 6 because the code that is in those movies won't work when published in version 7.

I've used _global for a long time and I'm very familiar with how it functions. My problem is that I have global variables that I'm trying to pass from a loaded movie to the base movie. This is not working. I have gottenmost things to work by changing "_global" to "_root" but I feel much more comfortable using _global than _root as it's easier to script when working with multiple swf movies and the other problems I'm having would be solved as well if I can get this to work with _global. Anyone else have this problem? Thanks.

Movie Clip Unusual Behavior
I'm trying to make a picture album using dynamically loaded images. The viewer allows zooming in/out (By adding/subtracting 10% of the existing width/height). Unusually, when switching images, even though the movie clip that holds the images is deleted, it holds the zoom factor. It overall keeps the proper image however. Example here:

http://www.loserslounge.org/user.php?user=linkoraclehero

The code is below:

onClipEvent (enterFrame) {
if (_root.doUpdate == 1) {
unloadMovie(_root.Picture);
var container:MovieClip = createEmptyMovieClip(_root.Picture, getNextHighestDepth());
my_mcl.loadClip(_root.image_url,_root.Picture);
}
}
onClipEvent (load) {
var my_mcl:MovieClipLoader = new MovieClipLoader();
var myListener:Object = new Object();

myListener.onLoadInit = function(target_mc:MovieClip) {
_root.picWidth = target_mc._width;
_root.picHeight = target_mc._height;
//_root.Picture._width = target_mc._width;
//_root.Picture._height = target_mc._height;
_root.Picture._x = 275-_root.Picture._width/2;
_root.Picture._y = 200-_root.Picture._height/2;
_root.doUpdate = undefined;
};

my_mcl.addListener(myListener);
}


Any suggestions as why?

Unusual Stage Problem [Flash 8]
Here is the link so you can see the problem:
http://www.glimedia.com/FlashExamples/timeline.html

This movie is 1000px x 500px, and I dynamically link 11 movie clips (each 1000px x 300px) in a row using the following script:

var imagesNumber:Number = 11;
for (i=1; i<=imagesNumber; i++) {
myTimeline.attachMovie("t"+i,"t"+i,i);
Load_mc= myTimeline["t"+i];
Load_mc._x = (i-1)*1000;
}

The mc "myTimeline" is an empty container for the loaded movie clips. As you can see, the first 4 loaded movie clips grey out the film strip at the top. Once you reach the 5th one, they show up great. I am guessing this is a stage width issue, because if I reduce the variable ImagesNumber to 8, they all show up perfectly. However this won't work for me, I need all 11 and eventually a 12th. The wierd part is that the text below it shows up just fine, and it's part of the same movie clips. The greyed out area is a film strip that dynamically loads a bunch of external jpegs.

Does anyone have any ideas on how to fix this? If this helps, I originally created this file at 1000px x 700px, and it did not have this problem.

Thank you in advance for your help. I have posted the FLA here: http://www.glimedia.com/FlashExamples/Timeline.zip

Unusual Trouble With HtmlText And Link
Hi! This should be an easy task, but somehow it's not..

I'm currently working on http://mayorgordon.net/mayorgordon.swf

and using htmlText in several textareas.

As you can see in the "latest news"-box, the text is both selectable and the link clickable.

However, in the News-section of the main menu, the text is selectable(you just don't see it because of the text/background colors), but the link is not clickable(same news-element,same html-code).

This text was loaded with a loadVars symbol and treated with textFormat options. I Tried using the textformat.link, and that worked. I also tried placing another textfield in the same movieclip, but with a static link. that also worked. So it's just this loaded htmlText - link that doesn't.

The only thing I can think of is that the latter of the two news elements container lies deeper within the swf. than the first.

Anyone? anything?

-thomas

Streaming Audio Lags (Very Unusual Bug)
I have a swf, which loads external movies, each external movie has its own layer in the time line which contains an audio file, the audio is not being used with actionscript, it is just sitting there and plays with the "stream" option enabled in the properties bar.

What I have found is that, when going from one scene to the next scene within the loaded swf, the audio will overlap, that is, the audio doesn't finish when it is supposed to, or the audio for the next scene will play before the current scene is finished.

Has anyone encountered this problem before, or, have they found a way or know a way to fix this? Perhaps something could be done to 'sync' the audio with the timeline at the end of every scene, maybe some function could be called that gets the audio and does something to it to make it re-sync?

I am really out of ideas. I have tried getting the next scene to have a delay of 9-15 frames, and that seems to have worked, but what happens is if I am running the swf, then open an app up or do something that uses a lot of cpu power, the flash file that is running will start to lag from that point onwards. Now, if the program or process that I was running in the background is now closed or goes away , the lag in flash remains! Even for new scenes that I use or even new loaded swf files, the lag stays! I close the swf, reopen it and the lag is still there, I close flash, and reopen flash, then test hte movie out again, and the lag is still there.

If you don't run another intensive process in the background, or open another application, the audio doesn't lag and everthing works fine.

If anyone has any idea's about this, please share.

BTW, I use an Athlon XP2600+ and the CPU usage is low when running this swf file...

Unusual Problem - Flash Button To Javascript
Hello- I am using FlashMX and need a button in Flash to interact with a javascript which is in the HTML page for the Flash Movie.

The following code works fine in HTML, but I would like to have it do the same thing from a button in Flash:
<a href="javascript://" onclick=clickchat(); return false;>click here to chat</a>

This code in Flash opens a chat window, but the chat system in this appliction does not work at all - no notifiction of a chat requested, nor text exchanged:
on (release) {
getURL("javascriptnclick=clickchat()");
}


This code produces no results at all:
on (release) {
getURL("javascriptnclick=clickchat();return false");
}

Does anyone have some ideas why when I add the last part of the code - ;return false the button produces no results at all?

Thanks a ton if anyone can help.

[F8] Run Active Content(swfobject) Fix Problem? Unusual..
Hi,

I'm having a problem with active content fix that Adobe provides.

Everything works OK in IE when i apply that fix,

BUT,

when I want to use my flash movie with some PHP variables (in order to prevent header flash animation to repeat everytime when user browses to other pages. provided below)
there is a problem.

What I mean i can fix that IE problem with that AC extension but when it's implemented in the page, animation plays again whenever user browses the sub-sections.

Here is the string? that my coder friend has added at the end of .swf ->

some.swf?anm=<?php echo($anm); ?> (this prevents the embedded menu movie to repeat when browsing through sub-pages.

And this is the link that i have d/led the AC fix.

http://kb.adobe.com/selfservice/view...e252&sliceId=1


I hope i'm clear about the problem.

THANK YOU ALL,

[f8] Looping Problem For Unusual Scrolling Thumbnails
I'm trying to create a set of thumbnails that moves across the stage to a certain point when the individual clips in the set are clicked on.

This is an attempt to reproduce part of the functionality of the interface on the current Nike home page http://www.nike.com (once you get past the country selection) at the request of a client. I'm not worried about the whole thing at this point, just moving and looping the group of thumbnails.

I have a script that moves the thumbnail set the appropriate distance to put each individual clip in the right position when clicked (each one is supposed to end up just behind an object in the center of the stage, regardless of where is is when clicked), but I'm having trouble getting the motion of the set to loop gracefully once it's already gone all the way to the right.

The clip contains two sets of the thumbnails to provide for the set to loop when it's gotten to a certain position, but I don't know how to incorporate that with the AS animation of the set.


Here is the AS

PHP Code:



speed =6;
photo_width = 117;
    
function setLeft() {
    if(containerL._x >=  269) {
            clearInterval(moveInterval);
            finalL_x =270-photo_width*4;
            containerL._x = -320;
        } else {
            moveContainerL = function() {
            containerL._x += (finalL_x - containerL._x)/speed;
        }
    }
    moveInterval = setInterval(moveContainerL, 50);
}



containerL.mc1L.onRelease = function() {
    setLeft();
    finalL_x =270;
}
containerL.mc2L.onRelease = function() {
    setLeft();
    finalL_x =270-photo_width;
}
containerL.mc3L.onRelease = function() {
    setLeft();
    finalL_x =270-photo_width*2;
}
containerL.mc4L.onRelease = function() {
    setLeft();
    finalL_x =270-photo_width*3;    
}
containerL.mc5L.onRelease = function() {
    setLeft();
    finalL_x =270-photo_width*4;    
}
containerL.mc1Lb.onRelease = function() {
    setLeft();
    finalL_x =270;
}
containerL.mc2Lb.onRelease = function() {
    setLeft();
    finalL_x =270-photo_width;    
}
containerL.mc3Lb.onRelease = function() {
    setLeft();
    finalL_x =270-photo_width*2;
}
containerL.mc4Lb.onRelease = function() {
    setLeft();
    finalL_x =270-photo_width*3;
}
containerL.mc5Lb.onRelease = function() {
    setLeft();
    finalL_x =270-photo_width*4;
}




containerL is the set, containerL.mc1L, etc. are the thumbnail clips inside.

It loops into position somewhat awkwardly when the last thumbnail in the first group reaches its end position, but not very smoothly, and the other clips to that left of that one are even more awkward.

Also repeated cycling through the process makes the jump into position seem to happen faster and faster for some reason I don't understand.

Fla is at: http://www.cparkerdesign.com/containerL_test.fla

If someone has an entirely different script for accomplishing the same thing, I would be interested in that as well. Thanks.

File Save Error Erases .fla File
I just had a near catastrophe happen...
I had Flash MX 2004 Pro up and a movie file open that I saved Fri before going home. Monday I didn't get to the file but it was still up in my Flash app. Today I went and made changes to the file and tried to Save. It brought up the Save As dialog for some strange reason and had movie.fla.fla as the suggested file name. I changed it to movie.fla and it asked if I wanted to replace it. I said yes and then it gave me an error msg saying it could not be saved (no more details than that). I then tried Save and gave it a new file name. It gave the same error msg. I then tried Save As and a new file name and it too gave the same error msg. I don't recall exactly but it may have said it couldn't save due to a network error. I was trying to save on a file server across the network. I finally decided to quit out without a save since the changes I had made were minimal and could easily be redone. After quiting out, I went to open the movie.fla file and it was GONE!!! Apparently when I said yes to overwrite the file, it dumped it and then failed to write the new version!!! I ended up with NOTHING! Macromedia...are you listening...How about writing a new file and if no errors, THEN dumping the older version. If not for a backup done nightly here, i would have been set back weeks of work!!!

Something Unusual? Dynamic Text Field Bullet Colours
Using the below code I can dynamically change the text to reflect these attributes and this works fine, however ...

The bullet colour defaults to black. Does anyone know how to change the bullet colour dynamically?

ie:
s_bsubpt = new TextFormat();
with (s_bsubpt){
type = "dynamic";
font = "Arial";
size = 17; color = 0x333366;
bullet = true;
}

Any help here would be wonderful.

Preloading A Swf File
can i preloading a swf file? do i use the IF FRAME LOADED action:

ex. ifFrameLoaded ("name.swf", 140)


if not, what do i use. thanks in advance.

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