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




Path Help With Flash Form



::using Flash MX 2004 & actionscript 2.0::

I having trouble implementing an email contact flash form on my site. I am using a perl script (perl is supported by my server) to send the email. When I use a simple movie that is only the form by itself, the mail sends just fine. However, when I try to incorporate the same type of form with the same scripts into my site, the event listener doesn't work with the button(nothing happens when you click it). I believe something is incorrect with my paths in AS. My button cbtSend is embeded in instance submit of movie clip SUBMIT.

I am trying this code on the stop frame:


Code:
submit.cbtSend.addEventListener("click", this.sendComments);
stop();
and this code on the first frame of the top layer:


Code:
function sendComments() {
var sender:LoadVars = new LoadVars();
var responder:LoadVars = new LoadVars();
var scriptURL:String = "sendmail.pl";
onLoad = function(success){
if (success) {
_global.serverTime = this.timeDate;
_root.gotoAndStop("output");
} else {
_root.gotoAndStop("error");
}
};
sender.fromEmail = fromEmail_txt.text;
sender.fromName = fromName_txt.text;
sender.body = comments_txt.text;
sender.sendAndLoad(scriptURL, responder, "POST");
_root.gotoAndStop("wait");
}
this._lockroot = true;
Please help me make this work...

here is the working simple form:: http://enlightened.cc/sendmail_perl.swf
-source file:: http://enlightened.cc/sendmail_perl.fla

here is the non-operational form from my site:: http://enlightened.cc/contact.swf
-source file:: http://enlightened.cc/contact.fla

any help would be greatly appreciated, j.o.



FlashKit > Flash Help > Flash ActionScript
Posted on: 03-12-2005, 03:11 PM


View Complete Forum Thread with Replies

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

Php Form Path
hi

I've set-up the flash php email form contained in this tutorial (http://www.kirupa.com/developer/acti...php_email.htm).

It was working fine until I put the form movie clip within another movie clip (so the contact.swf with the email form is loaded into a movie clip holder on the main timeline).

It's now not working.

So a problem with the path - tried to fix this with this._lockroot=true; on the first frame of the loaded movie clip but not successful.

So the issue seems to be the 'form' part of the main email script below.

on (release) {
// send variables in form movieclip (the textfields)
// to email PHP page which will send the mail
form.loadVariables("http://www.dirksmith.com/index2.php", "POST");
}

Tried variations on form.loadVariables (this.form.loadVariables and _root.form.loadVariables) - but again - not working.

Any ideas for getting the email form to work within a nested movie?

Thanx

d

Trying To Figure Out Proper Path To Component For A Tabbable Form
This one is a bit confusing. So bear with me. I have a v1 ScrollPane component on stage with the instance name 'myPane' inside of that is various bits of content decided upon from a combo box. One of these pieces is a form (instance name: App_mc) that should be tabbable but it doesn't seem to work. I think it's because the movie clip does not appear right away. I'm not sure. What I'm trying to figure out is the proper path to that instance and the text fields in it from the _root. So it's definitely _root.myPane but then it gets really cloudy after that.

Here's my actionscript path:

//Enable Tabbing for objects in the myPane
//------------------------
_root.myPane.tmp_mc.App_mc.tabChildren = true;
//------------------------
// Set the focus of the first object in the myPane
//------------------------
Selection.setFocus("_root.myPane.tmp_mc.App_mc.nam e_txt")

I've also tried the path _root.myPane.App_mc.tmp_mc. and so on with no luck either. Anyone got a clue?

Flash Form+php(kirupa Tutorial)/messages Sent By Form Show Strange Characters
Flash form+php(kirupa tutorial)/messages sent by form show strange characters - uncorrect stressing for latin languages

I tested flash + php form (http://www.kirupa.com/developer/act...h_php_email.htm) , and noticed message field does not send messages correctly when words stressing is needed (á à , é , í , ó , ão ) ;
I received strange characters when typed stressed words :

á é i ó u ão à pão cão árvore ;

what has to be changed on the code to allow stressing ??

cheers

Flash Form Question : Sending HTML Form Values...
I'm trying to create a flash form version of an HTML form. It's basically just a voting drop down menu - user chooses "Yes", "no","maybe" from teh drop down and hits a submit buttons which would send the results to a CGI script though POST. I understand the submission aspect, but am not sure how to assign values to the drop down in the same way HTML does:

<option value="yes">
<option value="no>
...

Do I just set the combo box Data array to [yes,no,maybe]? If so, how is it to be sent?

thanks

Pass Variable Form HTML Form To Flash
Hi,

I'm trying to figure out how to send what the user selects from a HTML drop-down menu to the Flash movie.

In this scenario, the user picks an email address from a drop-down list and this is sent to flash as a variable called 'eaddress' which is eventually used in the flash movie to send a message to this address.

Any help is much appreciated!

Glenn

Converting This Basic Login Form To A Flash Form
Last edited by VexxMedia : 2008-02-22 at 10:09.
























posted in wrong forum

Help: Form Mail (CGI-style Email Form) In Flash
Anyone have a nice .FLA file to share so I can get in and play with the AS?

I need to setup a CGI-style email submission (request info, etc) completely within the MX2004 pro environment--for a client.

I'm not completely fluent in AS2.0, but I can run with changing the fields and calls so long as the sample is not too complex.

Much appreciated.

Using Eval Function And Variable In A Path (target Path)
Hello,

I have to reprogram some of my website and it calls to conjugate strings in a way that's beyond my understanding. Please help me with some suggestions. Kind regards.

the original code is:

code:
if (_global.useCount<10) {
//hide
var diff = 10-_global.useCount;
for (diff; diff>0; diff--) {
eval(String(11-diff))._visible = false;
}
}

There are buttons named 1 to 10 and this turns off the ones that are not used. Now I want to nest those buttons in subclip "buttonsRow", instead of having them on main timeline. How do I rewrite that code to make it work with new path?

I have already tried the "associative array" method, but it don't really know how to pack the whole eval function in there. I've tried many combinations, like:

code:
this.buttonRow[eval(String(11-diff))]_visible = false;
//or
this.buttonRow["eval(String(11-diff))"]_visible = false;
//or
buttonRow[eval(String(11-diff))]._visible = false;
//or
buttonRow["eval(String(11-diff))"]._visible = false;
//or
buttonRow[eval(11-diff)]._visible = false;
// or
buttonRow[8]._visible = false;
//the last one at least turns off button 8, lol

Some of those return syntax error and some just don't work. Anyone have any ideas? Thank you again.

Cannot Export An Avi Of Motion Along A Path When Path Is Specified With Action Script
Hello!
I have the following problem: I am using Flash 8 Professional to produce a series of avi files showing the motion of a dot along different paths. Whenever I use the drawing tools to draw the path everything is all right: I can export both a swf and an avi file showing the motion. The problems start when I use action acript to specify the path: then a swf can be exported, but not an avi file (Flash acts as if it is exporting but the avi file produced shows only a stationary dot). Can anybody help me?

How Do I Set Up Hidden Form Variables For A Flash Form.
Guys, I'm using the flashkit tutorial on "send e-mail in flash the easy way", or something like that. Problem is that I need to set variables for hidden input, but don't know where and how to pass them along to the script?

Thanks

Convert HTML Form Into FLASH Form
http://www.bennyvo.com/test/

can someone look at this site and help me converting html form into flash form? is it possible?

thanks alots.

[F8] Flash Form Pops Up With The Php Url When Submitting Form
Hey guys,

I have a very minor issue here. I've created a contact form that uses a loadVars function to send the information to a php script and then on to my email. I've got everything working perfect except for the fact that when the user clicks submit it pops up a page with the address of my php script in order to run it. This is a bit annoying, so i was wondering if there was anyway to stop this from happening (but still run the script).

At the moment my code is:


PHP Code:



details_lv = new LoadVars ();
details_lv.userName = text2_mc.name_txt.text;
details_lv.userEmail = text2_mc.email_txt.text;
details_lv.userSubject = text2_mc.subject_txt.text;
details_lv.userMessage = text2_mc.message_txt.text;
details_lv.send("contact.php", "POST");





Any help would be appreciated,
Thx

Flash Form Vs HTML Form
Hello Peoples,

The following HTML code produces a button that when clicked sends the user to my online credit card processor's site where the user can proceed with a transaction.

----------HTML CODE----------
<form action='https://www.casher.com/buyer/purchase' method='post'>
<input type='hidden' name='dis' value='435532' >
<input type='hidden' name='quantity' value='1' >
<input type='hidden' name='product_id' value='1' >
<input name="submit" type='submit' value='Click to pay thru casher.com' >
</form>
----------HTML CODE----------

So my question is: If I want to use a button in a flash piece to do the same thing as the above HTML button, what code do I apply to the button in flash ?

Thanks,
Reflex.

HTML FORM To Flash FORM
I'm tryin to convert an HTML password page into FLASH and haven't a clue where to start. The site is www.modernvisionphotography.com and the code for HTML is
<form name="pix" method="post" action="http://www.724pix.com/album.asp" onsubmit="return 724check();">
<input type="hidden" name="init" value="init">
<input type="hidden" name="code" value="458">
<input type="text" name="password" size="16" maxlength="30"><br>
<input type="submit" name="submit" value="submit">

The user types in their password via an input text field but i haven't an idea what to put in the submission button in flash.

Any leads? or ideas would be helpful! Thanks for your time.

_root.path="http://www.sitename.com/path/FlashSite/"; Script Issue While Online
Hi there,
I inserted _root.path="http://www.sitename.com/path/FlashSite/"; in the beginning of my action script (2.0). This script accessing contents from an access database, which is working fine, when I tested from my local system folder. But no content from database is displaying while it tested from my localserver (127.0.0.1/path/FlashSite) or from online server.

From a search I found it might be the issue with "Network Access Warning". Is there any other reason? If this is the reason, then how can I resolve it?
For example, how should I replace this -

setTimeout( function(){ _root.content01.content02.gotoAndStop("cont_a");}, 1000 );

Thanks in advance
Shine

Variable Path Name --> Path=_root
instName="inst1";
path="_root";

Element.prototype.setVisible = function(){
[path+"."+instName]._visible=true;
}

I am trying to build a variable path to an instance. Normally I would do something like this[var]._x, but this doesn't work with _root.

Any ideas?

_root.path="http://www.sitename.com/path/FlashSite/"; Problem While Online
Hi there,
I inserted _root.path="http://www.sitename.com/path/FlashSite/"; in the beginning of my action script (2.0). This script accessing contents from an access database, which is working fine, when I tested from my local system folder. But no content from database is displaying while it tested from my localserver (127.0.0.1/path/FlashSite) or from online server.

From a search I found it might be the issue with "Network Access Warning". Is there any other reason? If this is the reason, then how can I resolve it?
For example, how should I replace this -

setTimeout( function(){ _root.content01.content02.gotoAndStop("cont_a");}, 1000 );

Thanks in advance
Shine

Xml Path To Flash
Having this xml:


HTML Code:
<?xml version="1.0" encoding="iso-8859-1"?>
<gallery heading="Photography">
<piece>
<heading>Piece 1</heading>
<desc>This is the description for piece 1</desc>
<image>TOP1.jpg</image>

<heading>Piece 2</heading>
<desc>This is the description for piece 2</desc>
<image>TOP2.jpg</image>

......
</piece></gallery>
which should be the correct path to pass only the image(s) to flash in order to write a rollOver-function, for displaying the images in a container?

Path De Tu Flash
Buenos dias, me gustaria saber si alguien tiene idea de como se puede averiguar el nombre del flash que estas ejecutando.
Pongo en situacion imaginemonos que quiero leer informacion de un xml que tiene como nombre el mismo que el flash que ejecuto de tal manera que si cambio el nombre del flash por uno nuevo, y previamente cambio tambien el nombre del xml (al mismo que el flash) el flash debe coger el nuevo xml.

Alguien me podria echar una mano.
Gracias por adelantado

XML Path To Flash
Having this xml:

HTML Code:
<?xml version="1.0" encoding="iso-8859-1"?><gallery heading="Photography">
<piece><heading>Piece 1</heading>
<desc>This is the description for piece1</desc>
<image>TOP1.jpg</image>

<heading>Piece 2</heading>
<desc>This is the description for piece 2</desc>
<image>TOP2.jpg</image>......</piece>
</gallery>


which should be the correct path to pass the image(s) to flash in order to write a rollOver-function, for displaying the images in a container?

Everything I've tried I got undefined or null on tracing.
Please help.

FLV Path And Flash 8
In Flash 8 the encoding automatically puts the FLV, SWF, and FLA in the same directory. Do you keep it this way? Is this path good form? Or do you go in the FLV Parameters and change the paths to the FLV file? I'm so used to having the FLV in its own FLV file.
Thanks

Parabollic Path In Flash?
Hi...guys....
I am struck up in my game project. Please can you let me know how to generate a parabollic motion of a missile along the perspective view(z axis) in flash.

thanks,

Text On A Path In Flash
Just a quick note to anyone interested in my latest component. PuppetStrings:paths allows Flash users to define and animate text along paths in the authoring environment (in a custom UI). I've finally completed it, and it's available for free download at my site.

Here's the link to the interface/download:

http://www.27Bobs.com/components/Pup...hs_online.html

And some quick samples:

http://www.27Bobs.com/components/Pup...les/shapes.swf
http://www.27Bobs.com/components/Pup...trebleClef.swf
http://www.27Bobs.com/components/Pup...lercoaster.swf

Tell Flash That A String Is A Path
hi there.

I´m stuck that´s why i Call for help.

I read out the path of a mc and assign this to a variable. how do I then access the mc using the variable?

e.g.


Code:
--mc----

onClipEvent(load){
_root.a = targetpath(this);
}
-----
if I then call


Code:

trace(_root.a) => it works fine
trace(_root.a._x) => is undefined
how do I tell flash mx to look for the mc at the particular path?

thanks in advance

andreas

Flash MX - Object Following A Path
Hi all

Has anyone any examples of a movieclip object that follows a path on screen?

Say I have drawn an 'S' or similar line shape, I now want an arrowhead object to follow the path. I'd then like to be able to change the speed of the arrowhead so it has difficulty in following the path accurately. I'd like to use the example to make a car go around a corner along a path for multi-lane traffic.

Thanks for any help and advice.

A Flash Path Issue
I have a situation as follows:
1.I have a swf movie that communicates through flash remoting to a backend database and brings back a recordset that a field from that recordset is being used to make a second remoting call where a second recordset needs to be retrived.

2. This SWF movie listens to the main movie for the launching event and a id. The application works fine passing the id, but breaks down when the second question is requested from flash remoting.

3.I created the calls in a testing stubb as follows:


Code:
import mx.rpc.Responder;
import mx.remoting.Service;
import mx.services.Log;
import mx.rpc.RelayResponder;
import mx.rpc.FaultEvent;
import mx.rpc.ResultEvent;
import mx.remoting.PendingCall;
import mx.remoting.RecordSet;
import mx.remoting.DataGlue;
import mx.data.binding.*;


mx.remoting.debug.NetDebug.initialize(); // initialize the NetConnection Debugger
var myLogger:Log = new Log( Log.DEBUG, "logger" );

myLogger.onLog = function( message:String ):Void {
trace( "myLogger-->>>"+message );
}
//Create the service - Call to the J2EE server on this machine for first question

FirstService = new Service(
"http://localhost:8080/netfoo/gateway",
null,
"com.nm.dao.FirstsDAO",
null,
null);

//Create the service - Call to the J2EE server on this machine for second questions
SecondService = new Service(
"http://localhost:8080/netfoo/gateway",
null,
"com.nm.dao.SecondDAO",
null,
null);


mx.remoting.debug.NetDebug.initialize(); // initialize the NetConnection Debugger
var myLogger:Log = new Log( Log.DEBUG, "logger" );

myLogger.onLog = function( message:String ):Void {
trace( "myLogger-->>>"+message );
}

var lcReceipt:LocalConnection = new LocalConnection();
lcReceipt.connect("_nmQuestionEngine");
lcReceipt.afterLoad = function():Void{
trace("The Movie is speaking to the Question Engine.");
trace("The loginHeader79FormsVersion has sent the id "+ id);
_global. FirstQuestionId = id;

trace(id);

getFirstQuestion();
};


function adsFault(rs: FaultEvent ){
mx.remoting.debug.NetDebug.trace({level:"None", message:"There was a problem: " + fault.fault.faultstring });
}
function getFirstQuestion():Void {
trace("The User Id after the getFirstQuestion() is "+ FirstQuestionId);
var pt_pc:PendingCall = adsService. getqNotViewedByUser(FirstQuestionId);
pt_pc.responder = new RelayResponder(this, "q_Result", "q_Fault" );
trace("The get q method has request service from the server.");
};



function q_Result(re: ResultEvent):Void{
question_ds.dataProvider = re.result;
_global.q1_ID = question _ds.q1_ID;
trace("the question_1 Id = " +q1_ID);

trace("What is coming out of the dataset "+question_ds.q1_ID);

getQuestion2();
};

function q_Fault(rs: FaultEvent ){
mx.remoting.debug.NetDebug.trace({level:"None", message:"There was a problem: " + fault.fault.faultstring });
}

function getQuestions2():Void {
trace("The getQuestions2() method is now receiving the question_1 id "+ question_ds.q1_ID);
var pt_pc:PendingCall = FirstService. getSecondQuestionForUser(this.question_ds.q1_ID);
pt_pc.responder = new RelayResponder(this, "q2_Result", "q2_Fault" );
trace("The get questions second method has request service from the server.");
}

function q2_Result(re: ResultEvent):Void{
question2_ds.dataProvider = re.result;
_global.q2_ID = question2 _ds.q2_ID;
trace("the question_2 Id = " +q2_ID);

};


function q2_Fault( fe:FaultEvent ):Void { // receive fault
trace( "got the response in a fault for q2" );
}
4.The testing stubbs works fine as an independent stubb but when I incorporate it as a movie that is call from my main movie the Question 2 parameter is never passed so the remoting doesn’t bring back a second recordset.

Please help I have been racking my brain!!!

Using Flash Help - Path Gets Mangled
I'm using Flash 5

I don't know if some setting somewhere is not right or what - but when I click
the HELP menu item, then "Using Flash 5"
it opens my borowser and tries with this
string:

http://%20file:///C:/Program%20Files...ontextHelp.htm

which doesn't get me to my local help files, it tries to do a dial-up - obviously
this string is all wrong, the "http ...."
stuff should not be there.

Anyone know how I can fix this?

TIA,
Carl

Text On A Path Within Flash?
I need to create buttons where the text is curved rather than on a straight line. Is there a way to do this in Flash? i know I can do it in Fireworks or Photoshop, but it would make life much simpler for my complex project if there were a way to do it within Flash.

Text On A Path In Flash?
hey all,

I was wondering if it is possible to write text on a path in flash.

I need to put some text on a wavy line

Many thanks in advance

Henry

Flash Path Problem
Hi Everyone,
Can someone please give me information on whether any workaround is available for Flash that is called from another site to load a sub flash movie.

I know the question sounds confusing so i have given an example below for understandability.

on domain one www.something.com
first.swf (loads second.swf using loadMovieNum(second.swf,1))
second.swf

on domain two www.another.com
first.html

(first.html calls through html <param name="movie" value="http://www.something.com/first.swf" />)

However first.swf is not able to load second.swf located in same path whereas it searches for second.swf to be located in another.com where first.html resides.

Is there any workaround on this or am i stuck with it. So then i would have no option but specify loadMovieNum(http://www.something.com/second.swf) and so on

Awaiting any reply soon.

How To Get File Path In Flash
Hi guys,

I am making a MP3 player. I am using FileReference object to browse and load the MP3 files in to player. I dont know how to get the path of the MP3 files. Reading some threads i came to know that Macromedia not supported the path due to security reasons.

But there must be some other way to get the path. should we use any other programme to make it done?


Thanks in advance..
pandu

Flash SWF Loading Path
Hello I am building a flash site that loads SWF files into one main SWF file in the root folder. Is there a way i can make it so what every SWF file is loaded dynamically uses the path to videos and photos from that SWF and not the main SWF.

Hope this is clear.

Thanks.

Flash/CGI E-mail Form -- Form Sends Info To E-mail? HELP Please (AIM/ICQ)
I am trying to make a flash file where you enter in information and then you click send and it sends the data in the form to my e-mail address. I tried customizing all of the cgi ones from the movies section of flashkit, and modifyied the cgi script accordingly. No matter what I've tried, I won't receive the information in my e-mail. For me, this matter is too hard to resolve over e-mail or a forum, so if you would like to, please help me out over instant messenger. I will be online under AIM name: blizzardmedia and ICQ number 64322480

Thanks for your help.

Flash, GIF/JPEG, And Database Path
Hello,

does anybody alreay a thing like that :

load into a flash, gif or jpeg dynamically using a field of a database containing the path of the file ...

[Edited by maquejp on 12-14-2001 at 05:45 AM]

HTML Target Path In Flash
Okay, this is it, I have a website. It has frames. There is a flash navigation bar in one frame and a the content in the other. So I want the Flash buttons in the navbar to target the other frame so i want to use this code: certainpage.html target="showframe". I labeled the other frame "showframe" if ya didn't know. But the script doesn't work when i use the target="showframe" command, it irks me!!! I guess I could just skip the flash and do it all with JavaScript and rollovers, but if you would help me it would save a LOT of programming! Thanks to ANYONE who replies to this. -kevin If you have any questions just email me: kevin@bsanimation.com, thnx

Attach Text To Path On Flash
this is your misssion (if you want accept it):

I need know how archieve that text can attached to any path (for example a circle). in other words, a similar effect at a property on CorelDraw (attach to path.

any answer, thanks

User Path Detection In Flash?
Hi,

I am using the SharedObject in flash mx2004
code:
submit.onPress = function(){
if(Title.text!="" && Comments.text !="" && Image.text!=""){
so = SharedObject.getLocal("USER PATH")
so.data.Title = Title.text
so.data.Comments = Comments.text
so.data.Image = Image.text
so.flush()
}
stop()

where USER PATH is the user they logged on as

C:Documents and SettingUSER PATH....

My question is:

Is there a way to detect this through flash? This is a standalone project so using any serverside stuff will not work

It's works fine when I put in the username that i use but that would only work on my computer (obviously).

Thanks in advance for any help!
-Mark

Importing A Path From Illustrator To Flash Mx
i had a problem of getting non-standard fonts to appear when i previewed the movie (http://www.flashkit.com/board/showth...hreadid=603166)

i figured the easiest way around it may be to "create outline" in illustrator. then to import the vector path of the text into flash mx. im not sure the best way to import them. so i jus copy pasted the vector path from illustrator to flash. when i did this i got a really blocky letter that looked very little like the original path. im not sure what happend.

so my question is what is the best way to get a path in illustrator to flash

thanks

randy

Moving Path Flash Application?
Hi all. Just joined and a complete newbie to Flash and actionscript with my a first question.

Is it possible to create a dynamic motion path in a Flash app where a user could drag and drop a MC onto the path and the MC would travel from point A on the motion path to point B, similar to a start and end point?
Could someone show me the kind of actionscript that could be used to do this.

Many thanks
Bidge

Unique Flash Variables Sent Through Path
Hello all, I have an interesting dillemma. Many people are familiar with sending variables to flash through its file path.
example:

<param name="movie" value="Backgrounds/Flash/Movie.swf?var1=hi" />

here a variable named var1 is sent into the flash movie so when it loads the var1 will be set to equal hi. This is expected and works fine. However, what if I want a quote or backslash in my variable? like i want var 1 to equal hi"/\"
also, I want to do this with writing nothing different than hi"/\", so I don't want to have to write hi"\\", this is because the variables changes depending on the users customization.

example:
<param name="movie" value="Backgrounds/Flash/Movie.swf?var1=hi"/\"" />
this won't work unfortunately, because the backslash for one is a character with special meaning.

Anyone have any ideas for me?

I slight work around Is the use of the SetVariable javascript function, and through that I can make it work just as I like.
flashMovie.SetVariable("/:vartext",
document.form1.TextL1.value);
if I make document.form1.TextL1.value = hi"/\" it will send it exactly as it is, unfortunately after this function is ran the variable is already set in the flash movie as undefined, and would require a function to run to get it to implement the variable where needed. Someone suggested I use the changeWatcher, but I don't understand it at all. tried to get it for a while and Couldnt get it to watch for the variable change.

Therefore, I come to ask if anyone knows how to get the variabel sent through to path to send exactly as is. This is a bit of a unique situation, so I hope I explained it clearly, apprecaite any help I could get.

Javascript To Flash LoadMovie Path
I'm trying to learn how to pass a javascript variable into Flash and use it in the file path when loading external movies. I'm sure this is something simple but I've missed it.
The startLoading function is used to preload the external jpg.


PHP Code:



startLoading(image_path + prodcode + "_1_large.jpg");

function startLoading(whichImage) {
    loadMovie(whichImage, "image_container");
    _root.onEnterFrame = function() {
        infoLoaded = image_container.getBytesLoaded();
        infoTotal = image_container.getBytesTotal();
        percentage = Math.floor(infoLoaded/infoTotal*100);
        loading_bar.gotoAndPlay(percentage);
        infoField.text = percentage+"%";
        if (percentage>=100) {
            delete this.onEnterFrame;
            infoField._visible = false;
        }
    };





image_path is set in flash:

PHP Code:



image_path = "/images/prods/"; 




prodcode is set in the html body by using javascript:


PHP Code:



function myimagepath(){
window.document.flashgallery.SetVariable('/:prodcode', 'prod007');





Then the "_1_large.jpg" references the individual image I want to load.

Could anyone offer me some help with this please? I've searched this forum and web for ages but can't seem to find the help I need to solve it.

Many thanks,
jbw

Type On Path In Flash With Actionscript
Hey guys,

I need your help on this project I've been arm wrestling recently. I've been playing with my own version of type on path using only actionscript. I'm using Trigonometry, namely sine, to generate the path the type will align to. And each letter that is inputed is dynamically created with attachMovie and createTextField. However the first letter doesn't orient to the path of the curve and there are major kerning issues between the letters, especially if the letter is very narrow in width. Here is the code:


Code:
maxWidth = 100;
maxCharacters = 11;
maxAngle = 180;
startX = 80;
startY = 70;
fontSize = 16;
amplitude = 10;
aPts = new Array();
perUnit = maxWidth/maxCharacters;
var my_fmt:TextFormat = new TextFormat();
my_fmt.font = "Verdana";
my_fmt.size = fontSize;
my_fmt.color = 0x000000;
MovieClip.prototype.field = function() {
this.createTextField("abc",0,0,0,0,0);
this.abc.autoSize = true;
this.abc.embedFonts = true;
};
//pak is instance name of the input textfield
pak.autoSize = true;
Selection.setFocus(pak);
var c = 0;
var st = 20;
function positionText() {
if (aPts.length<=maxCharacters) {
s = pak.length;
pts = _root.attachMovie("dot", "bb"+c, c);
letter = pak.text.substring(s-1, s);
radAngle = ((180+(c*(maxAngle/11)))*Math.PI/180);
aPts.push(pts);
pts.field();
pts.abc.text = letter.toUpperCase();
pts.abc.setTextFormat(_root.my_fmt);
pts._x = startX+(c*perUnit+50);
pts._y = startY+Math.sin(radAngle)*amplitude;
dx = aPts[c]._x-aPts[c-1]._x;
dy = aPts[c]._y-aPts[c-1]._y;
orientAngle = Math.atan2(dy, dx);
pts._rotation = (orientAngle*(180/Math.PI));
c++;
}
}
pak.onChanged = function() {
positionText();
};
Thanks for your help!

-Mike X

Flash Class Path Confusion
ok I finally am jumping in to using classes with AS 3. I did a few tutorials and understand the concept behind packages and class paths and have things working.

But I have one question I can't seem to solve and hopefully someone can help me it's probably easy something I've totally missed.

I did this tut here> http://www.actionscript.org/resource...AS3/Page1.html

Was great. However, when you have to import flash's MovieClip class with this line:
import flash.display.MovieClip;

Now my understanding of packages means the MovieClip.as file should be in the default class path set in the AS 3.0 settings (in my case os x, $(AppConfig)/ActionScript 3.0/Classes), I should be able to find that class in ActionScript 3.0/Classes/flash/display/ right? I don't. I don't even see a folder named ActionScript 3.0

(this in users>-username->Library>Application Support>Adobe>Flash CS3>en>Configuration)

I do see a folder named Classes with fp7 fp8 fp9 etc, I see the MovieClip.as in the fp9 folder.

So I'm confused here about the path flash.display.MovieClip

What did I miss?

thanks in adavance.

Flash Remoting Path Problem (willing To Pay)
Hello

I have big trouble with a flash file using flash remoting that someone did for me but didn't finish it and vanished. So now i need help to fix a last bug he left in it. The script simply doesn't work because some files Netbug.as couldn't be found when you open the fla file and some paths seem to be incorrect as well.

All the files he gave me before he dissappeared are here:

http://files.aoemedia.de/hedgefonds_fondsdaten.zip
http://files.aoemedia.de/FlashRemoti...nts-win-en.rar

If you can help me (I am willing to pay) please let me know, I need this script fixed till tonight.

Regards
Kian

Flash SWF Not Playing - PATH ISSUE
I've got an html file in my webroot and I got the swf file in the webroot/Flash_video/homepage/scroll/ directory. All the ActionScript file in directories below that. I play the html file from the webroot/Flash_video/homepage/scroll/ directory and it works. Why isn't it showing up in the html file in the Webroot? Here's my code in the thml file in the webroot.


<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="

Link/path Into Flash Site
Is it possible to provide the equivalent of a URL link into sub pages within a flash site? For example I would give someone the link www.example.com/section/help.html if I wanted them to go directly to my help page from a pure html site. With my current understanding, form a pure flash site, the user would have to navigate through a series of buttons to get to my sub flash page.

I was thinking about placing some kind of script in the index.html that when selected would jump the user to some sub section of my site (mimic a series of button selection). I have no idea on how to even go about attempting this.

Is there a recommend approach to solving this type of problem and perhaps some example code?

Thanks

Providing Installation Path To Flash Via XML
I created an autorun in flash in which a tree component is assigned to show disc contents, populated by xml file and a button component, which installs the selected item in tree component. Here is the AS:

var my_tree:mx.controls.Tree;
var my_xml:XML = new XML();
my_xml.ignoreWhite = true;
my_xml.onLoad = function(success:Boolean) {
if (success) {
my_tree.dataProvider = this.firstChild;
} else {
trace("XML parsing error");
}
};
my_xml.load("data.xml");
var listener:Object = new Object();
listener.change = function(evt:Object) {
var treeNode:XMLNode = evt.target.selectedItem;
if (treeNode.attributes.src != undefined) {
selectCase.my_ldr.contentPath = treeNode.attributes.src;
selectCase.heading = treeNode.attributes.heading;
selectCase.description = treeNode.attributes.description;
selectCase.License = treeNode.attributes.license;
selectCase.instructions = treeNode.attributes.instructions;
}
};
my_tree.addEventListener("change", listener);
function installContent(){
getURL("FSCommand:exec",treeNode.attributes.installpath);

where the function installContent is assigned to the button on on(click) event. Here is the XML data:

<?xml version="1.0" ?>
<tree>
<node label = "Freeware Items">
<node label = "ABC" src="images/shock.jpg" heading="ABC" description="Essential tool to play some games." instructions="It is necessary to be connected to web to complete installation." license="Freeware" installpath="a_sitch_in_time.exe"/>
</node>
<node label = "Shareware Items">
<node label= "XYZ" src="images/Flash.jpg" heading="XYZ" description="Deliver rich web content, your only web authoring tool." instructions="Internet not necessary." license="Shareware" installpath="sweets_country.exe"/>
</node>
</tree>

The problem is, the button does not executes the exe file whether the file is put in the folder "fscommand" or not. Need help. Thanks

Getting Xml Value (file Path) Into Flash For Loadmovie
Hey all...

I'm having some trouble getting some data from an xml file to be properly interpreted in flash...the traces of myType (for each tile in the grid) come up as undefined....


here is a sample of my xml:
<?xml version="1.0" ?>

Code:
- <LEVEL>
- <ROW>
<CELL type="../../oekeki/pictures/50.jpg" />
<CELL type="../../oekeki/pictures/50.jpg" />
<CELL type="../../oekeki/pictures/50.jpg" />
<CELL type="" />
<CELL type="../../oekeki/pictures/50.jpg" />
<CELL type="" />
<CELL type="" />
<CELL type="" />
<CELL type="" />
<CELL type="../../oekeki/pictures/50.jpg" />
</ROW>


Code:
// Update tile grid based on XML
function drawGridXML(myXML) {

// Iterate through the rows
for (var gH:Number = 0; gH < level.gridHeight; ++gH) {

// Iterate through the columns
for (var gW:Number = 0; gW < level.gridWidth; ++gW) {

// Get the name and type for the tile
var myName:String = tileName(gW,gH);
var myType:String = myXML.firstChild.childNodes[gH].childNodes[gW].attributes.type;
// Set the tile
origin[myName].loadMovie(myType);
trace (myType);
}
}
}
Is my syntax wrong in the var myType line or is the variable just not being passed because of something else?

Thanks for you guys help as always! Any info would be helpful of course!

- KarmaKat

Default Flash Class Path, Please
Hehe, I accidentally deleted the default class path from my flash installation; I need somebody to just give me the exact path from theirs (it will be the same as mine).

You can find the path (in windows) by opening flash, going to Edit>Preferences, clicking Actionscript from the bar on the side, clicking the button that says 'ActionScript 3', and cut-and-pasting the second path from the top (the one with app_data, or something).

I messed up, and I'd really like to get back to my project's problem. Thanks!

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