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




Simple Posting Method



Hey all, Im looking for a way to make a simple Posting system. Where a user can just go to the site and type something in, then click post, and itll display it and save it. Im guessing ill need to set up some php or asp or something, and i honestly dont know a thing about either. Help me please

- Aaren








-----------------
aarenh.tk
-----------------



FlashKit > Flash Help > Flash ActionScript
Posted on: 09-20-2004, 06:58 PM


View Complete Forum Thread with Replies

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

Simple Trajectory Method
Hi guys.

I have a movieclip which i'd like to make travel along based on the coordinates of 2 other movieclips. Let's say the mc I'd like to make travel is called ball_mc.

Now: I 'd like the ball_mc to travel based on the x : y ratio of two other mcs. Pretty standard trig, I'd have thought (and almost likely in the Math class; I just don't know where to look).

The angle between those two mcs becomes the angle I'd like ball_mc to travel along. Also bare in mind that the ball would start at either of those mcs exact location

Basically I need to know the ratio of the 2 mc's x : y so that I can plot my ball's location every few steps - from the 1st mc, up to the 2nd, and beyond (infinity) on the same trajectory. I need to know that angle AND how to calculate the ball_mc's next x and y coordinates based on a step incrementation of my choice.

My maths skills are poor and I don't know how to do it!

I really appreciate any help.

Sean

Mail By PHP Or Other Simple Method
I have tried a lot about the tutorials but I couldn't manage a working feedback form sending text to my e-mail address. I am sorry I have a lack of knowledge and I am new with Flash and scripting.

a) Can I use this PHP feedback form to send a mail my hotmail or yahoo account ? Do they support it?

b) actually I can accept to send the feedback into any file in a server account, it doesn't has to go to my e-mail. So do you know any other simple method for creating feedback form other than PHP.

I know this is a very common problem and asked a lot before but although I spent a lot of effort with different tutorials and examples I couldn't manage it.

Thank you very much.

Please Help. Simple Replace Method Not Working.
var str:String = "The quick brown";
str.replace("quick", "slow");
txt.text = str;

This doesn't work. Any idea what I'm doing wrong?

Thanks!
Ron Cook

[MX] Simple Method/class Problem
This is my first time programming in flash using OOP and i'm trying to do a tetris style game. I'm trying to get my buildmap function to work and it doesn't seem to carry out the method when I call it. Why isn't the function being called? This must be a really simple problem but I'm a noob at this.

Also if my approach seems generally wrong or could be easily improved i'd be greatful for any advice.

Here's the code:


Code:
Game = function(gamewidth, gameheight, gamespeed, gametilesize)
{
Game.prototype.width_across = gamewidth;
Game.prototype.height_up = gameheight;
Game.prototype.speed = gamespeed;
Game.prototype.tilesize = gametilesize;
}
Game.prototype.buildmap = function() {
for(i = 0;i<width_across;i++)
{
for(j = 0;j<height_up;j++)
{
name = "t_"+i+"_"+j;
_root.attachMovie("tile", name,0);
[name]._x = i*tilesize;
[name]._y = j*tilesize;
[name].gotoAndStop(1);
trace("this is working");
}
}
}
_root.realgame = new Game(5,7,2,30);
trace(realgame.height_up);
_root.realgame.buildmap();

Thanks in advance!

Probably Very Simple -undefined Method GotoAndStop
Hi I get this error message in the compiler window

1061: Call to a possibly undefined method gotoAndStop through a reference with static type flash.displayisplayObjectContainer.

menuItem2_mc is on the main timeline.
"home" label is on the main timeline

here is my code

Code:
this.menuItem2_mc.addEventListener(MouseEvent.MOUSE_UP, clickMenu2);

function clickMenu2(event:MouseEvent):void {
parent.gotoAndStop("home");
}
what is wrong?
thanks mark

Simple Audio Streaming - Best Method?
I have a website with guitar lessons. I have a variety of audio clips. Right now I check if a user islogged in and then use php header commands to have the audio play. People could easily download my audio this way.

I want to add better protection. I know if people can hear it they can record it, etc. But I want to make it very difficult and annoying for anyone to steal my audio. So I figure flash is the way to go.

However, I can't get beyond that general thought. I have no flash skills and am not sure how to proceed. I don't want to use playlists since each time somebody wants to play an audio clip, it is just one file. The notion of a playlist just doesn't make sense in my scenario.

Help is appreciated!

thanks,

brian

Simple GotoAndStop Error: Call To Undefined Method
I'm new to AS3 and am trying to simply make a button within a movie clip send me back to the first frame and stop. But i'm getting Error 1180:

"Call to a possibly undefined method ExplanationClip."

Here's my code:

Code:
import flash.events.MouseEvent;
CloseBtn.addEventListener(MouseEvent.CLICK, Explain);
function Explain(event:MouseEvent):void{
ExplanationClip.gotoAndStop(1);
}


I also tired ExplanationClip(root) and ExplanationClip(parent) to fix this, but still no luck. Thanks!

Function In A Method Return True To Method's Caller?
I think I probably don't know the correct terminology to ask this question, but here goes:

In this example, can anyone tell me how to have the setComplete event function within the main method return true to the caller of the method, instead of just to the listener?


PHP Code:



    function loadAsset(target:MovieClip, asset:String, assetLoaderInfo:LoaderInfo): Boolean    {    var assetLoader:Loader = new Loader();    var assetURLRequest:URLRequest = new URLRequest(asset);    assetLoader.contentLoaderInfo.addEventListener(Event.OPEN, setLoaderInfo);    assetLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, setComplete);    function setLoaderInfo(event:Event)        {        assetLoaderInfo = event.currentTarget;        }    function setComplete(event:Event)        {        target.addChild(assetLoader);        return true;        }    assetLoader.load(assetURLRequest);    }

Function In A Method Return True To Method's Caller?
I think I probably don't know the correct terminology to ask this question, but here goes:

In this example, can anyone tell me how to have the setComplete event function within the main method return true to the caller of the method, instead of just to the listener within the method?

Many thanks!


PHP Code:



function loadAsset(target:MovieClip, asset:String, assetLoaderInfo:LoaderInfo): Boolean
    {
    var assetLoader:Loader = new Loader();
    var assetURLRequest:URLRequest = new URLRequest(asset);
    assetLoader.contentLoaderInfo.addEventListener(Event.OPEN, setLoaderInfo);
    assetLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, setComplete);
    function setLoaderInfo(event:Event)
        {
        assetLoaderInfo = event.currentTarget;
        }
    function setComplete(event:Event)
        {
        target.addChild(assetLoader);
        return true;
        }
    assetLoader.load(assetURLRequest);

    }

[AS2 OOP] Calling A Method In A Method
Hi everyone
i'm not quite sure how to phrase my problem, so i'll examplify:

Code:
class A{
function A(){
trace("construct");
}
private function moo(){
trace("moo!");
}
private function cow(){
trace("start mooing");
moo();
}
}
this does what I expect it to: construct, start mooing, moo!

Code:
class A{
function A(){
trace("construct");
}
private function moo(){
trace("moo!");
}
private function cow(){
trace("start mooing");
_root.onEnterFrame = function(){
trace("moo!")
}
}
}
this also does what I expect it to: construct, start mooing, moo!, moo!, moo!, ...

Code:
class A{
function A(){
trace("construct");
}
private function moo(){
trace("moo!");
}
private function cow(){
trace("start mooing");
_root.onEnterFrame = function(){
moo();
}
}
}
yet this doesn't, I'd expect it to: construct, start mooing, moo!, moo!, moo!, ...
yet the moo! moo! moo! doesn't appear, as if moo() never gets called it all.
so what I'm I doing wrong?

Help For Posting
HOW could I make a flash animation and somebody enter informations in it and after i can see them.
Like scores in games

Plz


chocklehot@mac.com

Posting To Web
I am wondering how to publish my Flash to the web i am also asking where can i get a good free site to make my web page
any response would be appresiated.

Help (Im Posting This Here Also.....)
Hi everyone, I posted this in the newbie section, maybe it was the wrong place? I dont know for sure, but I am trying to figure this out, and have been for days! I want to try and solve it as soon as possible so if anyone has any ideas for me that would be great!

here is the message I posted:

Hi everyone,

I have a input text box called "1" as its value, and a dynamic text box which is called "2" as it's value.

The user input's their name in textbox "1" and then when they press the submit button I would like the dynamic text box "2" to say:

Hello, (name user entered in) how are you doing today?

So, I have been playing with codes but they don't seem to be working. Does anyone have any ideas?

Here is what I came up with, but its obviously not working and isnt right!

For the submit button's actions:
on (press) {

set ( 2, Hello, var="1" how are you doing today? );


}


What am I doing wrong! how do you do this?

Any help would be great!

thanks!
- leland

Posting A Swf
how d y'all usually post a swf for someone to download and take a peak at? freespace? any recomendations?

thanks in advence,
josh

Posting .swf's
(Hey guys....haven't posted in a while)

I have a server hosting a short .swf movie clip...

I have a place to post it...

How do I post it on a website? (they're the size of the old flashkit .swf footers)

To put it better...what is the html coding to post it?

Posting
What is the best way to send information/variables out of Flash, to a file such as a text file or a php file?

THanks!

More About Posting
yes I know about FTP and web space
I am asking about :
1)what do i need to export from flash to upload to the server
2)If i export only the swf file ... will it work?
3)I used once the export html command...and i generated something very small...and i had no library ... what ?

New Posting
I accidently creatd a new posting instead of replying to this one. I created a sample so you can see what I am trying to accomplish. Thanks

Posting ?'s
when posting i should include all the swf's and all the html's for the swfs or just the main html?
also is there a good way of shaving off megabites...i have 50 megs of webspace and cant cet my flash stuff below 60 megs..i know it has a lot to do with photo quality and what not but even publishing on the lowest setting only saves me like 2 mega bites any pro secerets?
xxxxjosh

Posting My Swf
Hi all,
Okay I have this swf file that I would like to put online. I don't want to embed it in a website. I would like the file to open up after clicking on a link on the site. It should open as a seperate screen, preferably with a fixed size. Is there anybody that understand what I'm babling about and can help me.

thanks

2nd Posting... Can Anyone Help?
I have a web photo gallery I recently purchased and I'm wanting to make the "Titles" section a hyperlink. Ex: http://www.goat45.com/title.html. The photo gallery right now pulls the information from an xml file. Here is the code in flash.

stop();
pic.info.thenum = side.thumbs.thumbs0.thenum;
pic.info.thecaption = side.thumbs.thumbs0.thecaption;
pic.info.thetitle = side.thumbs.thumbs0.thetitle;
loadMovie(_root.toadd+"images1/1.jpg", pic.pic2.pic3);
onEnterFrame = function () { side.gotoa = 110;if (side._alpha>99) {side._alpha = 100;delete onEnterFrame;}side.lefta = side.gotoa-side._alpha;side._alpha += side.lefta/5;pic._alpha = side._alpha;};

I'm guessing the "pic.info.thetitle" has something to do with this.


The xml being used is:

<pic1 name="EPHESUS STATUE" caption="Ephesus is the best preserved classical city of the Eastern Mediterranean, and among the best places in the world enabling one to genuinely soak in the atmosphere of Roman times. "/>
<pic2 name="EPHESUS STATUE" caption="Ephesus is the best preserved classical city of the Eastern Mediterranean, and among the best places in the world enabling one to genuinely 'soak in' the atmosphere of Roman times. "/>

So how can I make the name "EPHESUS STATUE" be the hyperlink?

Any help is much appreciated.

Posting To ASP
Hi,
I am tryping to post a var to an asp site. the site can see that i am trying to post but it doesn't post the value that i need. any suggestions. Thank you.
I have posted the code.

on (release)
{
loadMovie(contentTimer, countdown);
nextFrame ();
btn_next._alpha = 50;
btn_next.enabled = false;
var counter = 0;
var pagenumber = 1;
onEnterFrame = function(){
counter++;
pagenumber+1;

if(_root.counter==48){
btn_next.enabled = true;
btn_next._alpha = 100;

lv = new LoadVars();
lv.click = pagenumber.text;
lv.sendAndLoad("http://fl000wits081/elearning2008/Default2.aspx?click=0","", vars=POST);

lv.onLoad = function(){
trace(unescape(this));
// if asp returns - &updated=OK&
trace(lv.updated);
};
}
}}

Posting A PDF With A .FLA
Does anyone know how to do this?

Posting A PDF With A .FLA
Does anyone know how to do this?

Posting To PHP
I am need of some help,
I cannot get flash to POST to PHP...


I can get flash to read txt files

my php file is simple


PHP Code:



<?php
$message = $_POST

echo "<p>$message</p>"

?>




Can anyone give me a simple example(I work best with simple most tutorials on this subject are needlessly complex)

POSTING And GETTING
Hi!

I have a question regarding Flash and PHP integration. I'm making a site which uses content management system. I use an external PHP file to load my contents from the database.

I'm able to retrieve the print values from my PHP file to my SWF using loadmovie GET on an MC.

It's a news section. so I have three fields. Date, Headline, Contents

MY problem is:

How do I pass a variable from FLash (POST) to the PHP file before I get (GET) the print values? my php file is reading the variables I made in PHP but I want my variables coming from my SWF..

Thanks in advance for your help!

Posting Variables?
Hi,

I have a MC with two input text fields inside. The user enters name and adress and then submits them to the server with loadvariables using get. the problem is that the output window detects the variables ,but flash does not post them to the server. what am I doing wrong

help!

Posting Variables To A CGI
I have a form set up in Flash5. There are several fields which are "input" text boxes. The variable name of the text fields match the names the CGI is looking for. There is a submit Btn with a loadVariableNum action that sends the variables to the URL where the CGI resides.

This all works just fine as long as my fields and submitBtn are on the main timline. But I want to nest my "form" inside a movie clip so I can scroll it and manipulate it's position in some other ways. As soon as the input fields are nested, I can't seem to get it send the variables. I'm still hitting the CGI successfully. So I know the sumbit/loadVariable action is working. It just can't find the variables to attach.

I've tried a number of things and am stumped. But I'm sure there is an easy answer.

thanks.

kr.

Posting To Website
OK, I am completely green...

I made a swish file that I want to use as the opening page of my site.

Here is what I have done so far...I saved it/exported it as a swf file. I also tried saving it/exporting it as an html file. Then I renamed it "index" and tried to upload it with my ftp. When I open the page in my browser I get the background only but not the movie or the links.

I am so new at all of this I am sure I have read and reread the tutorials on how to do this correctly but I just must not be understanding them. Could someone please talk me through it??

Thanks
Boo

POSTING VARIABLES
i dont get it...this is what i want to do...can this be done? ...i have a text file that i want to change constantly, much like a product database that would change in an ecommerce site (i.e. the inventory would be constantly changing) and i want the number of products or whatever to change dynamically rather than have the client refresh the page...sort of like you see on the home shopping network...as an item is sold the number of products remaining is adjusted dynamically....I DO NOT WANT TO HAVE TO HIT THE REFRESH BUTTON IN OTHER WORDS...i am about to go insane trying to figure this out...any help would be greatly appreciated.

thanks
joe

Posting Variables
Hello,

I just did a tutorial for posting variables to a cgi page but am still unclear about one point so I hope someone out there can help out.

The tutorial said that I use this code:

On (Release)
Load Variables ("http://www.server.com/cgi-bin/myform.cgi", 1, vars=POST)
End On

Does anyone know which variables this sends? Is it just the input fields on the page with variable names... or does it also send all the variables that I set using Set Variable ActionScript?

I need to be able to send variables that I have set through ActionScript. If the code above doesn't do that... does anyone know how to do it?

thank you

Janet


thank you,
Janet

Posting Flash On The Net
This will be my first time putting a flash file on the internet, to test it out, i just created a yahoo account and got a free geocities page. How would i go about loading my flash file onto this site? Any additional info that you need can be given upon request.

Jason

Posting Vars
hi,
if i post data to a processing script can the flash prog read back the responce or will any script output be sent to the browser aka a normal http post?
i know flash can open xml sockets but i want to post to a static script not a running prog..

thx

Help - 2nd /3 Rd Time Posting
Anyone out
there have any idea how to incorporate interactivity into video footage
through flash?????

if anyone has any ideas on how this would be done can they let me know
thanks
as i have no clue what way to go about it, has anyone seen this done before?

J

Problem When Posting On Web
I posted an exe file on the web, which works fine. My problem is the text files that load into different scenes will not work. I loaded the text files into the root directory. What should I do.

Thank you,

Andy

Posting .fla Files To Get Help
What is the best way to post my .fla file so I can get some help with it?

Posting SWF Onto A Forum.
Hello again,

Im looking at posting a swf file onto a forum for use as an avatar / signature. Does anybody know how to this this?

Any help greatly appreciated.

Thanks.

BM

Posting Stuff
I have made a few short animations with flash but dont understand how to make an interactive interface and I don't understand how to post what I make onto my site.

I Don't Think My Posts Are Posting
I wnt a flash site like this site at http://www.bonus4u.da.ru
My site is at httpeople.txucom.net/kicker

And the first site is using frames. I looked at it. This is my third day with Flash MX since I downlaoded it. Can someone help me get this same effect with the window being clicked calling the second button

Text Posting Help...?
Please take a look at this site: http://rk.qgl.org.

You can see where the news are posted by different members, along with their contents. And also each post creates a new page in the news.. How would i go about doing that?

I hope i'm not demanding too much..cos i have no idea how hard/simple it is to make this, hope you guys can help me out. THnx!

CGI Posting With Flash
Hi everyone!
I'm having a major headache with a little piece of code in FlashMX

Basically, I'm trying to use Flash to submit an email form via a pre-written CGI script. I cannot alter or write new CGI scripts as this would require more money to the people who provide the service.

Now.. I have checked the example HTML form code, which is simply:
Quote:




<FORM METHOD="POST" ACTION="http://mailgate.server-mail.com/cgi-bin/mailgate">
<input type=hidden name="recipient" value="sales@acme.com">
<input type=hidden name="subject" value="Enter Subject">
<input type=hidden name="redirect" value="http://www.acme.com/feedback.htm">
Your Email address: <input type=text name="email"><BR>
Your Full Name: <input type=text name="realname"><BR>
Tell me what you think of me?
<TEXTAREA NAME= "comments" ROWS=3 COLS=50>Type Here</TEXTAREA>
<INPUT TYPE="SUBMIT" VALUE="Send Comments">
</FORM>




and this works without any problems. To test things, out in Flash, I made a very simple movie, with one button that contained the following script:

Quote:




on (release) {

recipient="avalidemailwasused@here.com";
subject="hello";
comments="Hi There!";

getURL("http://mailgate.server-mail.com/cgi-bin/mailgate",0,"POST");
}




however, when I run it, the "mailgate" server says "You must supply a recipient in order to use this gateway." - now I did give it a 'recipient' value, so does anyone know why this isn't working? I've used Flash with ASP before and not had any trouble. Could the problem lie with the "mailgate" client?

Any thoughts would be appreciated.

- Frustrated Cerious.

Posting News?
I was wondering if it is possible to update the news of a flash page in that flash page.. like if there is a login and password, the person logs in and then a thing comes up where they put the news in, and it updates right into the main page?

Posting Variables To A Php Db?
hey everyone!
I have a question thats hanging me up...
i have a flash movie that uses a bunch of variables...
I'd like to send specific ones to a php script or database via a submit push button..
i tried using the geturl send using post, but it strings my variables all together url encoded and seems to send component names... and looks for a page by that name...

i.e:

Code:
http://www.visionroot.com/fix.php?FUIComponentClass=%5Btype+Function%5D&FPushButtonClass=%5Btype+Function%5D&FSelectableListClass=%5Btype+Function%5D&FCheckBoxClass=%5Btype+Function%5D&FScrollBarClass=%5Btype+Function%5D&FSelectableItemClass=%5Btype+Function%5D&FScrollSelectListClass=%5Btype+Function%5D&FComboBoxItemClass=%5Btype+Function%5D&FComboBoxClass=%5Btype+Function%5D&onClick=%5Btype+Function%5D&initValues=%5Btype+Function%5D&getResults=%5Btype+Function%5D&name%5Fbox=jasonpratt&email%5Fbox=jason%40pratt%2Ecom&started=true&fade=&name%5Frtn=jasonpratt&email%5Frtn=jason%40pratt%2Ecom&spam%5Frtn=false&food%5Frtn=Pizza&selectedItem=2&spam%5Ftext=You+dont+want+the+spam%2E


(i havent set up the db BTW, my php guy is gonna do that part. just want to get the output to look right first.)

is there a way to specify which form variables get sent to the db, and which ones dont...?

can anyone point me in the right direction?

sorry im pretty new at this!

thanks in advance!

Loadmovie Not POSTing?
I'm using an empty movie clip in my parent movie to load a movie, for example:

_root.empty_mc.loadMovie("http://mydomain/myMovie.swf", "POST");

The loadMovie function does not seem to be POSTing out my variables to the server.

Does anyone know if there is an issue with Flash when using loadMovie and POST?

Flash Posting
Lately, I've been setting up a little site. No, this will not be just a self-promotion. There isn't much there right now, and it's just html. But the beginning of the Flash file is here:

http://www.interfall.com/ryan/flashFile.html

Okay, you may notice on the very last button, something labeled "p:cp".

This stands for Point: Counter-point, as the tooltip describes.

So, for those too lazy to click the link, here is the jist of it.

I post a subject, most likely controversial, and voice my opinion. The user is allowed to resond, voiceing their opinion as well.

I would like to make this "P : CP" XML and Flash.

If XML isn't possible, or is not known by a possible helper, then it's not neccesary.

Any suggestions?

Also, just to through something else in, anyone know of something similar, but just a diary?

Yes, I did search the forums. Yes, I did search the movies section.

Don't chew me out for the wrong forum, but this post crosses so many boundries I wasn't sure where it should be posted.

Im Posting Now Because The Pros Are On =)
http://www32.brinkster.com/frostbang/nionicle_1.html

That is my site. Looks nice how it is but..
i wanted the buttons to alpha in after the sides open. and when you roll out i want the buttons to alpha two zero then the bars close.

Can anyone help me?
Thank you,
Mike A

Posting Text But Its Too Big
im writing a story and i want to have it in flash and im using simple scrolling buttons with a tell target and the text is in a movie clip BUT the text is so long and large that it begins overlapping as it hits the bottom of the page :/ what can I do?

EDIT --

what if instead the text came from an external text file? how would I do something like that??

Posting Variables
Please can someone help with this... I'm sure it must be possible(!)

I have one web page (index.htm) containing a flash movie (index.swf) In this movie there is a button that loads a new web page (travelpage.htm) which contains the movie travelshop.swf
That's working fine.

Now what I want is to be able to click a specific button in this second movie (travelshop.swf) that will load the index.htm and go to a specific scene in the original index.swf movie.
Am I correct in thinking this will work by sending variables?

I'm pretty new to this so try not to laugh at what I've attempted...

in the travelshop movie I've assigned the following actions to the button...

on (release) {
_global.page = "car";
getURL("index.htm", "_self", "GET");
}


to assign the value 'car' to the variable 'page' and send this to the index movie.
Then in the first frame of the index movie I have added the action:

if (_global.page="car") {
gotoAndPlay("pre_car", 1);
}

to jump to the scene 'pre_car'

...but it's not working. Have I totally misunderstood this or have I just used the wrong actions?

Thansk very much!

Posting Variables
Please can someone help with this... I'm sure it must be possible(!)

I have one web page (index.htm) containing a flash movie (index.swf) In this movie there is a button that loads a new web page (travelpage.htm) which contains the movie travelshop.swf
That's working fine.

Now what I want is to be able to click a specific button in this second movie (travelshop.swf) that will load the index.htm and go to a specific scene in the original index.swf movie.
Am I correct in thinking this will work by sending variables?

I'm pretty new to this so try not to laugh at what I've attempted...

in the travelshop movie I've assigned the following actions to the button...

on (release) {
_global.page = "car";
getURL("index.htm", "_self", "GET");
}


to assign the value 'car' to the variable 'page' and send this to the index movie.
Then in the first frame of the index movie I have added the action:

if (_global.page="car") {
gotoAndPlay("pre_car", 1);
}

to jump to the scene 'pre_car'

...but it's not working. Have I totally misunderstood this or have I just used the wrong actions?

Thansk very much!

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