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




Playing Flv Content Trough PHP



Hi All,

A problem. I need to play flv content via php. In action script I've the following.

netStream.play("http://localhost/studypro/" + path_to_flv);

where
path_to_flv is a php file: control.php?page=3654&flv=aaa.flv

php file sets correct headers:
header('Content-type: video/x-flv');
header('Content-Length: '.$fileSize);
header('Content-Disposition: attachment; filename="'.$fileName.'"');

and outputs correct content (manually checked agains the original flv file). But swf still refuses to play it showing NetStream.Play.FileStructureInvalid code

So my question is, is it possible to stream flv this way? Or does the 'play' method need a link to the "real" flv file?

Any ideas?

Thanks, Michal



DevShed > Flash Help
Posted on: January 6th, 2009, 09:49 AM


View Complete Forum Thread with Replies

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

Playing Content In Loader
Hi
I have a loader component and I want to tell the swf file to play how do I accomplish this. I was trying
loader.content.play
Thanx

Load External Content Before Playing The MC
No misunderstanding, I don't want to know how to load external files into my movie, nope.

I need something more complicated. Think of this:

Main movie ---> External SWF ---> External JPG

In your main movie, you need to load an external .SWF and this file includes some external .JPG files.

What we are tring to achive here is to somehow preload those external JPG files before our External SWF plays! The result will be just the same as the pictures are embeded in the external SWF. So the external SWF won't play unless all the external JPG files are loaded completly.





Can any one help me with this?!
I've been spending hours and hours on this but no success!
I've also been searching the whole net but no where I could find something similar to what is needed.



I apriciate your help,
Regards,
Hadi

Playing H.264 Content Using NetStream (got It To Work; Need More Help Though)
Hello everyone.

Just wanted to introduce myself to everyone and this awesome site.
I'm Chris =)

I've been stressing so much over how i'd get this thing done,
and now i feel a little bit of relief.

so...
here's my dilemma.

by going here http://www.adobe.com/devnet/flashpla...player_03.html i've been able to stream an h.264 video.

below is the code i used to make the .mp4 stream (which is in the link above).


Code:
var video:Video;
var connect_nc:NetConnection = new NetConnection();
connect_nc.connect(null);
var stream_ns:NetStream = new NetStream(connect_nc);
stream_ns.client = this;

function netStatusHandler(p_evt:NetStatusEvent):void
{
if(p_evt.info.code == "NetStream.FileStructureInvalid")
{
trace("The MP4's file structure is invalid.");
}
else if(p_evt.info.code == "NetStream.NoSupportedTrackFound")
{
trace("The MP4 doesn't contain any supported tracks");
}
}

stream_ns.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);

video = new Video();
addChild(video);
video.attachNetStream(stream_ns);
stream_ns.play("http://www.sprokkit.com/clients/deltaco/grandma.mp4");
everything works great when i publish the swf.
it plays perfectly and everything, but..it's just a little screen.

what i have to do is create a little video player for it so you can hit PLAY and STOP, but my creative director also wants it to be able to SCRUB so you can scrub through it if you want.

i'm not the best flash person in the world, so every little bit anyone can help me is highly appreciated.

i need to have something to show the creative director by tomorrow...and i'm really stressing it.

i just need to be able to make what i've set up to PLAY, STOP, and SCRUB...
and i'm not really sure how to do this.

when i asked my creative director about the scrubbing, he said u can do that by using netObjects.

whats the most efficient way to make my video play, stop, and be able to scrub?
please help =D

i'd really really appreaciate it.

thank you so very much.


_Tobes

Flash Playing Over HTML Content
I've seen an effect on Yahoo ads and in other places where the ad will play over the HTML content on the page. I was wondering how to accomplish this. Sorry, I don't have an example because I always see it on yahoo and they rotate their ads.

Flash 8 Content Playing Inconsistently.
I’ve developed a site www.newpaul.com with Flash 8. – Some of the content utilizes Flash 8 features – (namely anti-aliased text and blend modes). On most machines the content plays as it should but on some systems it plays the Flash file but leaves out any symbols that use the blend modes and leaves out all the text.

I’m checking for the latest player plugin, but on some machines it still leaves these elements out? Anyone else experience this? How can I even test for systems that have older plugins?

Any suggestions would be helpful

Paul

Flash Content No Longer Playing
Over the course of the past weekend, two things occured; either of which could be the cause of my problem. First, I allowed a relative with very little computer knowledge to use my PC unattended, and second, I installed a new graphics card. I didn't notice my new inability to play Flash content until today, so I'm not sure which action was the culprit. My relative says he doesn't think he changed anything, but he's not 100% sure.

When I attempt to access any page with Flash content, it gives me the standard error that occurs if you don't have Flash installed. So I go through the process of installing, I get the confirmation of a successful install, it restarts my explorer... and still fails to work. The card I just put in is a Radeon X1550 w/ 512 MB, are there any known quirks related to Flash content and this card, or is it more likely that my relative just hit a setting somewhere?

Prevent Loaded Content From Playing
I realise having a loaded .swf or clip start playing as it downloads, is a good thing...

But this is one of those random times i need it to "NOT" start to play until it's 100% loaded.
reason being, that the start of the loaded animation builds up from the LOADING BAR when it's 100%

heres the preloader code im using:









Attach Code

var theMCL:MovieClipLoader = new MovieClipLoader();
var theListener:Object = new Object();

theMCL.addListener(theListener);
theListener.onLoadProgress = function(target_mc:MovieClip, bytesLoaded:Number, bytesTotal:Number) {
var loaded:Number = Math.round((bytesLoaded/bytesTotal) * 100);
loadingBar.gotoAndStop(loaded);
}
theListener.onLoadInit = function (target_mc:MovieClip) {
loadingBar._visible = false;
}
theListener.onLoadStart = function (target_mc:MovieClip) {
loadingBar._visible = true;
}
theMCL.loadClip("header.swf","mainC");

Playing Content From Remote Machine?
Hi, I have developer edition and downloaed a sample from one of the tutorials available on Adobe.com. Everything works fine with the rtmp link pointing to localhost when the site is launched on the server itself. However, if I go to another machine and access access the html through http nothing happens. The player isn't embedded, no movie... nothing. So I'm thinking the reference to locahost is bad... how can my remote machine talk to 127.0.0.1? So, I changed bind ip in adaptor.xml and public ip in server.xml... still nothing....

What am I missing..... ? Thanks!

Playing H.264 Content Using NetStream (got It To Work; Need More Help Though PLEASE)
hey everyone,
by going on here http://www.adobe.com/devnet/flashplayer/articles/hd_video_flash_player_03.html i've been able to stream a h.264 video.

below is the code i used to make the .mp4 stream (which is in the link above).

everything works great when i publish the swf.
it plays perfectly and everything, but..it's just a little screen.

what i have to do is create a little video player for it so you can hit PLAY and STOP, but my creative director also wants it to be able to SCRUB so you can scrub through it if you want.

i'm not the best flash person in the world, so every little bit anyone can help me is highly appreciated.

i need to have something to show the creative director by tomorrow...and i'm really stressing it.

i just need to be able to make what i've set up to PLAY, STOP, and SCRUB...
and i'm not really sure how to do this.

when i asked my creative director about the scrubbing, he said u can do that by using netObjects.

whats the most efficient way to make my video play, stop, and be able to scrub?
please help =D

i'd really really appreaciate it.

thank you so very much.


_Tobes










Attach Code

var video:Video;
var connect_nc:NetConnection = new NetConnection();
connect_nc.connect(null);
var stream_ns:NetStream = new NetStream(connect_nc);
stream_ns.client = this;

function netStatusHandler(p_evt:NetStatusEvent):void
{
if(p_evt.info.code == "NetStream.FileStructureInvalid")
{
trace("The MP4's file structure is invalid.");
}
else if(p_evt.info.code == "NetStream.NoSupportedTrackFound")
{
trace("The MP4 doesn't contain any supported tracks");
}
}

stream_ns.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);

video = new Video();
addChild(video);
video.attachNetStream(stream_ns);
stream_ns.play("http://www.sprokkit.com/clients/deltaco/grandma.mp4");

Flash 8 Content Playing Inconsistently.
I’ve developed a site www.newpaul.com with Flash 8. – Some of the content utilizes Flash 8 features – (namely anti-aliased text and blend modes). On most machines the content plays as it should but on some systems it plays the Flash file but leaves out any symbols that use the blend modes and leaves out all the text.

I’m checking for the latest player plugin, but on some machines it still leaves these elements out? Anyone else experience this? How can I even test for systems that have older plugins?

Any suggestions would be helpful

Paul

www.newpaul.com

Security Error Appears When Playing Flash Content On A CD
Hi All,

Any one come across this situation where users of a cd-rom gets security problems when for example click on pdf button to view in separate window.

Need a quick resolve for a friend.

Kind Regards,

Boxing Boom

MovieClipLoader - Starts Playing Frame 1 Of Loaded Content Before Load Is Complete?
Can this happen?

I'm using MovieClipLoader to load in a content swf and it begins playing frame one while the loader is still running.

Can this be prevented?

Thanks for any help,
pH

Click-trough TextAreas?
Im doing this chat-game, where youre a little avatar and you click on floor-tiles to move.

Well, due to restriction of space, a part of my chatwindow (which is made of a TextArea-component) covers some of the tiles, making them unclickable. When the cursor comes over the TextArea, it transforms into a vertical line (for handling text).

Since the TextArea is half transparent, I would still like to be able to klick trough the TextArea and onto the tiles in the back. Is that possible somehow? Ive tried :

myTextArea.selectable = false;

...but that doesnt do the trick.

Looping Trough The Library ?
Is it possible to loop trough the whole library and return only those objects that have a linkage name ? And return their names too... I'm like 90% sure it's not possible but I'd like to know for sure...

Thanks.

[CS3] Path Trough A String
var myTextFieldPath:String="movieclip_mc"+"."+"textfie ld_txt"
trace (myTextFieldPath)// movieclip_mc.textfield_txt

but is i try to write in the textfield the result is undefined...

movieclip_mc.textfield_txt.text="OMG"

It doesn't see the string as a path...

I can I solve it?

[i'm working on a component, for this reason the target can be inside multiple mcs...

Thanks in advantage

Click-trough TextAreas?
Im doing this chat-game, where youre a little avatar and you click on floor-tiles to move.

Well, due to restriction of space, a part of my chatwindow (which is made of a TextArea-component) covers some of the tiles, making them unclickable.

Since the TextArea is half transparent, I would still like to be able to klick trough the TextArea and onto the tiles in the back. Is that possible somehow? Ive tried :

myTextArea.selectable = false;

...but that doesnt do the trick.

Downloading A Jpg Trough FileReference
function downloadFile():void {
fileRef.download(new URLRequest("downloads/w1/1600x1200.jpg"), "downloads/w1/1600x1200.jpg");
}

this is my function :S what am i doing wrong? thanks in advance

Click-trough TextAreas?
Im doing this chat-game, where youre a little avatar and you click on floor-tiles to move.

Well, due to restriction of space, a part of my chatwindow (which is made of a TextArea-component) covers some of the tiles, making them unclickable.

Since the TextArea is half transparent, I would still like to be able to klick trough the TextArea and onto the tiles in the back. Is that possible somehow? Ive tried :

myTextArea.selectable = false;

...but that doesnt do the trick.

Parse Html Trough Xml Possible ?
First, I would like to load in Flash the next bit:

Code:

<IFRAME SRC="http://tickertape.beurs.nl/beursnl/ticker.aspx?width=750&speed=15" NORESIZE SCROLLING=NO HSPACE=0 VSPACE=0 FRAMEBORDER=0 MARGINHEIGHT=0 MARGINWIDTH=0 WIDTH=750 HEIGHT=25></IFRAME>

I know this is not possible in Flash, but I thought maybe there is a roundabout to get this to work anyway..

Is it maybe possible to load in the above mentioned bit of code with XML ???
And if yes, what is the way to do so ???

Hope someone knows and can help me...

Greetings Irene

Controling MC Trough Botton On Another MC
HI!
im designing a site in flash....and ive set up in my main scene two other movie clips, one is a menu and the other the "content area," both are placed on the first frame of my scene. Both of my Mcs are panels that scrool up and down.. ok heres my : i have bottons on my menu MC, and i want these bottons to control the content of my second MC....how would i do that???? ...

....ive tried attachMovie...but it only works in the same Mc that my botton is in... i thought maybe actionscripting the botton in Mc 1 to affect Mc2 would that be right??? and how?

well thanx plz help me out here! haha..bi thanx

Loading Mp3's Trough Web Page
hello

i searched for info on this, but couldn't exactly find what i wanted, so here's my question:

let's say i have a series of mp3 files online and i want to have a flash animation on different website pages that will load a given mp3 file and then play it on request of the user. something like:

|> play / |_| stop

on certain cases, i'd have more than one instance of the same play/stop animation (basically i'd have only 1 flash file to load different mp3's).

how do i tell flash to load a certain file? how would i go about writing this both on the page's html and the animation's actionscript part?

i hope i explained the issue properly. thank you for any help, links or hints!

MAIL SEND Trough Formmail.asp
hello

on site BukyStudio I made mail send interface. please look under mail icon up&left.

now how to make it happen? to send mail?

Load HTML Trough Flash, Is This Possible?
I was wondering, is it possible to load a html file trough flash?
Let me clarify, lets say I have a flash movie and I only want to use this as a background for a website. Is there a way in flash to call the html file with text and images? This way all I have to do is to edit the html files.

I hope this makes sense, if something is unclear just ask me.

Thanks in advance.

Progressive Moving Trough X With Buttons.
Hi everybody...

Well... I've a symbol on a scene and I need to move it horizontaly, I use two buttons "left" "right"...
in each button I use the attached script.

The problem is when I press it just move 5 (can change it for 10, 20 or any.. I need infinite) pixel only.. if I change (Press) for (rollOver) it just move 5 pixel each time I put mouse on button.

I need, when I rollover mouse on any button (left or right), symbol moves horizontaly without stop until I quit mouse from the button.

p.d. Can it have a limit to move? I mean, I donno want the symbol disappear totaly from the scene...

Thank you and sorry for my english. Here is the script:







Attach Code

"Left button"

on(Press){
symbolname._x -= 5
}

"Right Button"

on(Press){
symbolname._x += 5
}

























Edited: 07/12/2008 at 08:47:39 AM by KmiDesign

Same Random Color Trough The Website
Hi,


Is there somebody who would like to help me with the following...
I try to explain it step by step...
In a FLASHproject I'm using 2 colors, color 1:basic blue and color 2: red.
When you've visited the site you still have the 2 colors, but the red (color2) has changed to ex.orange. I'm using an Random Color ActionScript for color2.
What I would like to do is that all the other Movieclips (entire or parts of them), graphics, buttons, that I will use will change also with the Random Color 2.
There has to be a link from a new graphic, button, MC to he first MC (who has the basicAS) to get the same randomcolor.

So shortly briefed, MC1 has andomcolor.
New MC2 has to get the same colordefinition as MC1 has.
New button01 has also the same randomcolordefinition as MC1
ex. orange...
After refresh
MC1 is green
New MC2 & New button01 has also to be the same green....


I'm a new flash-user for ±6 months now and I can't manage it !!
Can somebody help me please with an Actionscript or...?

1000 x thanks !!!!!


Flasherik

Including Database.xml Trough Symbol
Hello!

I've been trying to figure out this thing for a while.
I would like to have a search engine on my website and found something nice to use for this.
The problem is when I make a symbol of this search engine and put it in my site it does not include the "database.xml" anymore.

Here is a .rar file with;
a working search engine on root (try searching for: Illustrator to see it working)
a not working search engine in a symbol (try searching for: Illustrator to see it doesnt work)
the database.xml file
http://www.desiredesign.org/search.rar

thank you very much in advance!

-Sumpson

Passing DisplayObject References Trough XML
Any ideas on how to pass a reference to a display object such as a sprite or a movie clip trough an XMLList?

Here's an example

var p:Sprite; //some sprite i already have

var g:XML = new XML(<test><name>hello....</name><object1>p</object1><object2>{p}</object2></test>);

testXML (g);

function testXML (xml:XML)
{

trace ('name', xml.name);
trace ('object 1', xml.object1);
trace ('object 2', xml.object2);

var uu = xml.object1;
var vv = xml.object2;

addChild(uu);
addChild(vv);
// that doesn't work, but is there another way of doing this?

}

Same Random Color Trough The Website
Hi,


Is there somebody who would like to help me with the following...
I try to explain it step by step...
In a FLASHproject I'm using 2 colors, color 1:basic blue and color 2: red.
When you've visited the site you still have the 2 colors, but the red (color2) has changed to ex.orange. I'm using an Random Color ActionScript for color2.
What I would like to do is that all the other Movieclips (entire or parts of them), graphics, buttons, that I will use will change also with the Random Color 2.
There has to be a link from a new graphic, button, MC to he first MC (who has the basicAS) to get the same randomcolor.

So shortly briefed, MC1 has andomcolor.
New MC2 has to get the same colordefinition as MC1 has.
New button01 has also the same randomcolordefinition as MC1
ex. orange...
After refresh
MC1 is green
New MC2 & New button01 has also to be the same green....


I'm a new flash-user for ±6 months now and I can't manage it !!
Can somebody help me please with an Actionscript or...?

1000 x thanks !!!!!


Flasherik

Parsing Trough XML Array A URLRequest
Hi!
I'm sure that's easy to do for you guys but I'm kinda stuck here.

What I'm trying to do is taking a XML file that have data that I put into a MovieClip call "field" that reside in my library and into that MC I have numerous text field to put my data into, in that XML file I have a field call <link> that I want to use as a URLRequest but I can't seem to be able to assign it.

Here is a section of my XML file:
<channel>
<shows>
<dates>01.22.2009</dates>
<city>Montreal</city>
<venue>Café Campus</venue>
<detail>Omnium du Rock ½ finals</detail>
<info> website</info>
<link>"http://www.omniumdurock.com/"</link>
</shows>
</channel>

And here is the AS3 code to populate my MovieClips:

import flash.net.*;
var loader:URLLoader = new URLLoader();
loader.addEventListener(Event.COMPLETE, onLoaded);
var here:Number;
here = 10;
var xml:XML;
function onLoaded(e:Event):void {
xml = new XML(e.target.data);
var il:XMLList = xml.shows;
var myArray:Array = new Array();
for (var i:uint=0; i<il.length(); i++) {
var gig:field = new field();
gig.x = 10;
gig.y = here;
addChild(gig);
gig.buttonMode = true;
gig.mouseChildren = false;
gig.gigdates.text = il.dates.text()[i];
gig.gigvenue.text = il.venue.text()[i];
gig.giglocation.text = il.city.text()[i];
gig.gigdetail.text = il.detail.text()[i];
gig.giginfo.text = il.info.text()[i];

// here is my problem that I<m working on //

var link:URLRequest = new URLRequest(il.link.text()[i]);
gig.addEventListener(MouseEvent.MOUSE_DOWN, goingto);
here = (here + 50);
function goingto(e:MouseEvent):void {
navigateToURL(link, "_blank");
}
myArray.push(gig);
}
}
loader.load(new URLRequest("all_shows.xml"));

Any help with this guys would be more than welcome.

Thanks a lot for your time.

Pascal Sauvageau

How To Create More Objects Trough For Loop?
Hi,
I want to create 10 objects trough for loop.
Something like this:
Code:

for(var i:Number = 0; i<10; i++)
{
   var myObject:Object = new Object();
}

In previous version of AS you could solve this:

Code:

for(var i:Number = 0; i<10; i++)
{
   this["myObject" + i] = new Object();
}

How to do this in AS3.0 where I can't omit var key word ?

Thanks,

Passing Parameters Trough MovieClips
Hello people

I have this animation that loads an external SWF, but I want the base movie to pass a couple of parameters (title and the path to a jpg) to the newly loaded movieClip when I press a button, I tried creating a function that gets triggered by the button itself (the function resides on the main movie but targets the new one), It doesn´t seem to have effect, hte problem is (I think), that I'm triggering from the same button that loads the movie, but honestly I don´t know how I could do it otherwise.

THANKS FOR YOU HELP!

the code that loads the movie:

PHP Code:





 on (press) {
createEmptyMovieClip("contH", 5);
loadMovie("win_h.swf", "contH");
contH._x = -290;      contH._y = -290;
}
on (release) {
tellTarget (contH) {   loadPic ("2.jpg", 50, 50);
}








in the layer that´s just above the button i have the function:

PHP Code:





function loadPic (theName, thePosX, thePosy) {  contH.createEmptyMovieClip("contPic", 7);  contH.contPic._x = -500;  contH.contPic._y = -500;  contH.contPic.loadMovie(theName);  thePosX = contH.contPic._x;  thePosY = contH.contPic._y;  } 







but the loaded movie never gets the result.

THANKS!

How To Send Mail From .swf File Trough Formmail.asp?
How to send mail from .swf file trough formmail.asp?
I created interface, and botuns, but nothing is passing trough.

here's the code:
Frame 1
recipient = "mail@domain.hr";
Name = "";
text = "";
eMail = "@";

Frame 2 - submit bottun

recipient = "mail@domain.hr";
loadVariablesNum("../cgi-bin/formmail.asp", 0, "POST");

Help me

Downloading/open Files Trough Flash On A Cd Rom
hi all

i got a problem with /opening files trough flash on a cd rom.

(I know how to do it on a website...but not on a cd rom)

i'm making a flash file for a cd rom and there are also some files that you can dl/open from that flash presentation. But how do you do it?
I don't think i can create an exact path cause the cd rom file can be located on the D drive,or G, ...ect.
btw...these files are stored on the cd rom.

Can anyone help me?
thnx alot


ps: another question...is it possible to start the flash animation automaticly when you have inserted the cd rom in the cd rom drive?

Noob - Listbox Population Trough Actioscript
ok, this is a stupid question but i need to know it;

i use mx2004pro and i got a mx file with listboxes that need to be populated dynamically.

how can i add a listbox item trough actionscript(mx component, not 2004) and update it.

thx a million

IE - Activate Flash Object Pass Trough
Hi,

I have,everybody does, the problem when opening an HTML file with a lot of swf objects for example 20, and internet explorer blocks them, after you unblock the plugin, you have to klick at each one of the objects to be active. Until you look at the flash settings and make it always activated. But if a noob is looking at the website he-she will be bored after activating 2-3 objects and my question is how can I let all swf objects to work fine without being blocked, acttivation and stuff ..

thanks

help!pleh

Imported Photos Manage Trough Shape
Dear members,
I am a new member, and ofcourse this is my first thread.

I have a Flash 8. I have two photos of my two daughters; I imported the first one to the stage from my documents (pictures) then went to properties, Tween then chose Shape,
then I imported the second picture and did all the necessary steps to create a motion tween between the two photos (frames) but failed, there is no arrow between the two(frames) photos; which means no motion tween.

Is there a way to create a motion tween (shape) between the two photos?

I hope I expresse myself in a clear manner.
Nasser

How To Dynamically Create Object’s Trough For Loop?
Hi,
I want to dynamically create 10 Objects trough for loop. Each Object should have unique name.
In previous version od AS you could sove this with these lines of code:

Code:
for(var i:Number = 0; i<10; i++)
{
this["myObject" + i] = new Object();
}
How to do this in AS3?

Code:
for(var i:Number = 0; i<10; i++)
{
var myObject:Object = new Object(); //How to setup uniqu Object name?
}
Thanks,

Loading A Page In A Layer, Trough A Flash Button
Hello, people, im new in this forum (be patient )
I want to be able to create a button in flash, and when its pressed, it has to performs the action of loading a page in a layer. To be more clear, I make the button, then I insert it on my page, and I want it to load an html in my mainLayer, as if it was a mainFrame but instead its a mainLayer. I think it can be done with some ActionScritp and JavaScript, but i dont know were to start...

thanks, good luck

cya.

Loading A Page In A Layer, Trough A Flash Button
Hello, people, im new in this forum (be patient ). I've posted this message in the section FlashGeneralHelp, but the i realised that i should post it here .Thats the question....
I want to to create a button in flash, that alows me to load a page in the mainLayer of my page. To be more clear, I make the button, then I insert it on my page, and I want that when i press the button it loads an html in my mainLayer, as if it was a mainFrame but instead its a mainLayer. I think it can be done with some ActionScritp and JavaScript, but i dont know were to start...

thanks, good luck

cya

[F8] Modify Size And Position Of A Movieclip Trough Actionscript
This is very simple, but My knowledge about actionscript is still very limited...

I'm trying to create a menu with small circles (shapes), each one connected to thin strings lines. When clicked, this circles must increase size and go to some point at screen.

So, I have a movieclip named "bola", and inside it I have a "bolinha" (the circle) and "fio" (the string connected to it)

I'm using the component MC Tweening (downloaded at http://laco.wz.cz/tween/?page=download)
with this code at first frame:

Code:

#include "lmc_tween.as"
bola.onRelease = function(){
bola.stop();
bola.bolinha.slideTo (300,30);
bola.bolinha.scaleTo (500);
}

With this, I can control size and position of my circles, but how can I control the strings as well? I can't use the same code, otherwise the string will INCREASE the size, increasing the stroke....and I just want that the string to STRETCH OUT, following the movement of the circle.


If it's still not very clear, I've uploaded the .fla I'm testing it:
http://www.sendspace.com/file/2txruu


Please someone help me.

Shoutbox Sends Info To Database Trough Php, ERROR.
Hej all,

Can someone help me out with the (hopefully) the last problem i have with a shoutbox?

if i press the send button my explorer goes to a white-screen with the adress location...../post.php

my shoutbox is getting information in flash. code underneath:

PHP Code:



send_btn.onPress = function(){
    if (name_txt.text eq "" or message_txt.text eq ""){
        status_txt.text = "error";
    }else{
        var container:LoadVars = new LoadVars();
        container.name = name_txt.text;
        container.message = message_txt.text;
        container.submit = true;
        container.send("http://www........net/test/post.php","_self", "POST");
        _root.status_txt.text = "shout sent";
    }
}




My post.php looks like this:

PHP Code:



<?
mysql_connect("localhost","db_hikers","bla");
mysql_select_db("db_hikers");
$submit = $_POST['submit'];
$name = $_POST['name'];
$message = $_POST['message'];
if($submit){
$result=MYSQL_QUERY("INSERT INTO shoutbox (id,name,message,time)"."VALUES ('NULL','$name','$message')");
} else {
}
?>





thanks for the help.

Mike Nieuwstraten

I Need To Show A Database Quary Trough ASP Inside Flash
I need to use 4 combobox components to retrieve other 3 informations and show inside flash!! (combobox are related content)

How i do that, i don´t know how to populate de combobox with the ASP ... neither how to show the result inside flash...

I already have an working html, but i need inside flash now...

Thnkx a lot for the help!!!

Loading Php Pages In A Html Layer Trough A Flash Menu?
I would greatly appreciate some help on this.

I'm a real newbie if it comes to actionscript, and this is probably quite simple. Ok on to the problem:

This is what I have:
A site that is divided with 2 frames (html)
A flash menu with some buttons in frame 1
A Div layer in frame 2

This is what I want:
I want the flash menu to load PHP pages, (for example: members.php) into the DIV layer in frame 2.

Here is a shot of what I mean:
http://www.clawhammer.nl/div.jpg

Thanks alot for your help!

Inserting Data To Mysql Database Trough A Flash Form - Combobox Script Not Working
Hi, im trying to build a flash form that pass som data to a mysql server database i´ve been reading some tutorials and i made the actionscript for the submit(=grabar in spanish) button so that it colects data and send it to the server. (i have a form with textfield that is where people enter data, and 2 combobox, one for selecting a person´s name and the other to select a place).

but im having the same record duplicated on the database, but, the first record is complete and the duplicate it´s the same but for the two selections of the 2 combobox that are missing. As a result of running the form an loading data normally i then get on the database 2 records added the are equal but one of them has no combobox data.

I think the problem is definitly the combo box code that i use cos after using it the script worked perfectly maybe someone can help me with it. And also i ´ve found some tutorials for showing a mysql database content with flash but they are really difficult, some of they se PHPObject and others just tones of actionscript code, isn´t an easyier way for doing it??

Here´s the script:

on (release) {

if (apellido =="") {
status = "Debe llenar el apellido del cliente!";
} else if (nombre =="") {
status = "Debe llenar el nombre del cliente!";
} else if (fecha =="") {
status = "Debe llenar la fecha de la entrevista!";
} else if (hora =="") {
status = "Debe llenar la hora de la entrevista!";
} else if (asunto =="") {
status = "Debe llenar el asunto del cliente!";
}else{
userData = new LoadVars();
userData.apellido = apellido;
userData.nombre = nombre;
userData.telefono = telefono;
userData.dni = dni;
userData.fecha = fecha;
userData.hora = hora;
userData.asunto = asunto;
userData.abogado = "";
userData.donde = "";

userData.abogado = abogado_cb.getValue();
userData.donde = donde_cb.getValue();

userData.send("inserta.php", "this", "POST");
getURL("inserta.php","this","POST");
status = "Datos Guardados!";
apellido = "";
nombre = "";
dni = "";
telefono = "";
fecha = "";
hora = "";
asunto = "";

}
}


Thanks.
Emilio

Clicking Trough Layers On Other Layers, How To Stop It?
I want to stop Flash from letting users to be able to click on buttons on layers below the top layer when the button is hidden, so not the whole layer, but just what is underneath something else. Is this possible?

Disable A Button Trough "IF"
I would need some help with if-actionscripting.

What i want to do is to disable a button if an graphicobject has a certain colour. How do I write this? Is there a command that "disables" a buttons funktion?
If my indicator_mc has the colour 0x00FF00, then the button up_btn and down_btn will be disabled.

Anyone?

External Content Loader With Multiple Content Types (trouble Loading Graphics)
Hey all!

I am yet another new project. Our flash designer here isn't a big AS guy, and asked me to write a reusable class so that he can load a variety of content types using minimal amount of code on his part. It's also going to be the main component piece in a larger external content player once I'm done with the class itself, so I am making the loading functions into public methods of the loader object than can be called from a button, etc.

I have the code for the text and html parts working (although I can't get stage.width and stage.height to work in the class or from the frame).

The problem I have is that I can't get the graphics content to load (the swf/pic content). Could you please check my code and tell me what I'm missing? I'm sure it's something simple, like it always is.

thanks a million!

-Fish


-----------------------------


ActionScript Code:
package
{
   
    /**
    * External Multimedia Loader Class
    * @author $(DefaultUser)
    * Add new MultiLoader object and insert media type (all lowercase) and object path to control initial loaded object
    * To load a new object, call the MultiLoader.load* methods (loadText, loadPic, loadSwf, or loadHtml as appropriate), passing the path to the external file.
    */
   
    import flash.display.*;
    import flash.events.*;
    import fl.transitions.*;
    import fl.transitions.easing.*;
    import flash.net.URLLoader;
    import flash.net.URLRequest;
    import flash.text.TextField;
   
    public class MultiLoader extends MovieClip
    {
        private var media:String;
        private var path:String;
        public var textObj:TextField = new TextField;
        public var picObj:MovieClip = new MovieClip;
        public var swfObj:MovieClip = new MovieClip;
        public var htmlObj:TextField = new TextField;
        private var objLoader:Loader = new Loader();
        private var objType:String;
        private var textLoader:URLLoader = new URLLoader();
       
       
       
        public function MultiLoader(mediaType:String,objPath:String)
        {
            media = mediaType;
            path = objPath;
           
            if (media == "text" || media == "TEXT" || media == "Text")
            {
                loadText(objPath);
            }
            else if (media == "pic" || media == "PIC" || media == "Pic")
            {
                loadPic(objPath);
            }
            else if (media == "swf" || media == "SWF" || media == "Swf")
            {
                loadSwf(objPath);
            }
            else if (media == "html" || media == "HTML" || media == "Html")
            {
                loadHtml(objPath);
            }
            else
            {
                trace("ERROR: Media type not supported. Media type must be 'text', 'pic', 'swf', or 'html'.");
            }
        }
       
        public function loadText(txtPath):void
        {
            objType = "text";
           
            if (this.numChildren > 0)
            {
                this.removeAllChildren();
            }
           
            this.addChild(textObj);
            this.textLoader.load(new URLRequest(txtPath));
            this.textObj.wordWrap = true;
            this.textObj.multiline = true;
            this.textLoader.addEventListener(Event.COMPLETE, addTextContent);
            //this.textObj.width = this.width;
            //this.textObj.height = this.height;
        }
       
        public function loadPic(picPath):void
        {
            trace("loadPic started");
           
            objType = "pic";
           
            if (this.numChildren > 0)
            {
                this.removeAllChildren();
            }
           
            this.addChild(picObj);
            this.objLoader.addEventListener(Event.COMPLETE, addObjLoader);
            this.objLoader.load(new URLRequest(picPath));
           
            trace("loadPic completed");
        }
       
        public function loadSwf(swfPath):void
        {
            trace("loadSwf started");
            objType = "swf";
           
            if (this.numChildren > 0)
            {
                this.removeAllChildren();
            }
           
            this.addChild(swfObj);
            this.objLoader.addEventListener(Event.COMPLETE, addObjLoader);
            this.objLoader.load(new URLRequest(swfPath));
           
            trace("loadSwf completed");
        }
       
        public function loadHtml(htmlPath):void
        {
            objType = "html";
           
            if (this.numChildren > 0)
            {
                this.removeAllChildren();
            }
           
            this.addChild(htmlObj);
            this.textLoader.load(new URLRequest(htmlPath));
            this.htmlObj.wordWrap = true;
            this.htmlObj.multiline = true;
            this.textLoader.addEventListener(Event.COMPLETE, addTextContent);
        }
       
        private function removeAllChildren():void
        {
            if (objType == "pic")
            {
                this.picObj.removeChild(objLoader);
            }
            else if (objType== "swf")
            {
                this.swfObj.removeChild(objLoader);
            }
            else
            {
                trace("objType != 'pic' or 'swf.' objType = '" + objType + "'.");
            }
           
            while ( this.numChildren > 0 )
            {
                this.removeChildAt(0);
            }
        }
       
        private function addObjLoader(event:Event):void
        {
            trace("addObjLoader started");
           
            if (objType == "pic")
            {
                trace("trying to load pic");
                this.picObj.addChild(this.objLoader);
                this.picObj.objLoader.removeEventListener(Event.COMPLETE, addObjLoader);
            }
            else if (objType== "swf")
            {
                trace("trying to load swf");
                this.swfObj.addChild(this.objLoader);
                this.swfObj.objLoader.removeEventListener(Event.COMPLETE, addObjLoader);
            }
            else
            {
                trace("ERROR: Cannot add object loader. The 'objType' variable does not contain correct media type. The function 'addObjLoader' should only be called when objType is 'pic' or 'swf'. In this case, objType is '" + objType + "' .");
            }
           
            trace("addObjLoader completed");
        }
       
        private function addTextContent(event:Event):void
        {
            if (objType == "text")
            {
                this.textObj.text = event.target.data as String;
                this.textLoader.removeEventListener(Event.COMPLETE, addTextContent);
            }
            else if (objType == "html")
            {
                this.htmlObj.htmlText = event.target.data as String;
                this.textLoader.removeEventListener(Event.COMPLETE, addTextContent);
            }
            else
            {
                trace("ERROR: Cannot add text content. The 'objType' variable does not contain correct media type. The function 'addTextContent' should only be called when objType is 'text' or 'html'. In this case, objType is '" + objType + "' .");
            }
        }

    }
   
}

Help Needed In Clearing The Content Of The XML File Content Displayed In The Flash
I have developed a flash file with combo box which displayes all the XML files in the directory and after selecting a particular XML file the flash file reads the XML file and displayes the content of the XML file in flash in a fashion I have done. But, if I chose another XML file which is a blank XML file, still the flash file shows the previous file's content in the flash. How to clear that previous file's content?

If I chose someother XML file which is having some content then it shows correctly. But, if I chose some blank XML file, the flash file shows the previous content instead of showing it blank. pls help me how to clear the previous file contents?

Why Does Flash Re-load Content When Content Within Hidden/shown Area?
Hi all,

A purely academic question for someone about how Flash loads. I've written a simple Flash image scroller script, see: http://www.benjaminkeen.com/software/image_scroller/

On the page above, I separated the various content (installation instructions, demo, download file, etc) into separate pages, which get hidden/shown via JavaScript. Very straightforward.

My question is: why, when you go from the "Overview" to "A few examples" sections (both of which have a demonstration scroller), does the flash get "re-drawn" each time? I don't understand - I thought that it would simply get loaded the first time the browser calls it - not every time the content becomes display:blocked through javascript...?

I guess my follow up question is: can this be prevented?

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