Actionscript :: Php - Flash A Substitute For Css And Javascript?

Nov 29, 2009

I have reasonable experience with PHP, CSS, and javascript/jquery/ajax. I'm taking my first steps learning Flex/Flash/Actionscript and it's already striking me that using flash/SWF could solve many of my problems. For example:

I won't have to worry much about javascript availability e.g. handling the form submit twice like I do now, once for js available and one for js not available. There's also a CSS advantage: looks like things are very easy to style and drop in their correct exact spot in flash than it is with CSS (I hate CSS because I'm not that great at it and it usually gives me a headache).

[Code].....

View 3 Replies


Similar Posts:


ActionScript 2.0 :: Flash XML Gallery Substitute SWF For Text?

Oct 9, 2007

I'm reposting this message as I realized I mis-titled it the first time. And I really do mean it: I will pay for a working solution to this problem. I need to do this for a client and not getting it done is not an option. It's all working like a charm. The only bad thing is: I want to place .swfs files where the dynamic text is right now, and can't figure out how to do it.

What I really want is one large image/JPG on each slide, and below that, instead of the dynamic text shown in the tutorial example, a smaller .swf file should appear. (For this project, the text itself needs to be animated, and I can't do that with the <caption>/dynamic text option; I need to insert an SWF.) I'd really like to do this using XML since that's working so nicely otherwise and will be so easy to update in the future if the client wants to add new slides.

Can anyone provide me with the actionscript code to use in the context of this photo gallery? I'm not advanced enough yet to know where or how to place code that doesn't fall into this gallery/AS format.(I'm not being lazy: I have looked all over these forums for hours, read through about 60 pages of tutorials, went through the whole XML Photo Gallery with Thumbnails hoping I could somehow alter that to meet this project's needs... no dice. I had gotten far enough in that tutorial to be able to insert an empty movie clip where I want it, but could only figure out how to fill it with JPGs from the XML, not SWFs... and in any case the images did not then work correctly while advancing the slides.)

Here is my current Actionscript code:

************************************************** *****
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;

[code]....

(It's not showing the preloader and the counter is missing on purpose; I don't need those items for this project...) In another version I have deleted the desc_txt code and the dynamic text field in Flash, substituting a new movie clip (in its own layer) called "description" and an external link to the SWF file in line 2 of each node of my XML file, closing and opening that line with <description> and </description> rather than <caption>.

View 6 Replies

CS4-AS2 : Annoying Substitute Fonts Window?

Jul 29, 2009

I still use AS2. Since I migrated from Flash 8 Pro to Flash CS4, the .fla I used to work with displays now a Font Mapping window.
 
The window says that the "VerdanaReg*" font is not available on my system.i never had such a font installed Verdana is a font I make an extensive use in my .fla and the installed fonts are (for several years):

[Code]...

View 2 Replies

Java :: Substitute {0}, {1} .. {n} In A Template With Given Varargs

Aug 13, 2010

Consider a string template of the following format: String template = "The credentials you provided were username '{0}' with password '{1}'"; Substitution variable fields are of the form {n}, where n is a zero based index. This is the template format used in Adobe Flex, see StringUtil.substitute(...). And also .NET, IIRC. Since I want to re-use the templates used by the Flex code I'm looking for an Java equivalent. I'm aware of String.format(...) but the template structure is not identical. What is the best way to get the same "Flex compatible" template functionality in Java? Basically this is the desired end-result:

[Code]...

View 2 Replies

ActionScript 3.0 :: Is There Container Substitute For A Stage?

Dec 6, 2010

what I want to know if there's a substitute for a stage (since you only can have one) that accepts objects to be added to it (as childs with addChild(object)) that isn't the size of the stage but its size is definied some other way.I just created another thread about loading swf files, but my question is new but related to that.I'm creating a series of mini-games that shoud be loaded into a project from external SWF files, but right now I'm using "stage" as the place where I put all my objects.For example, I have a GRID that accepts new Grid(4, 4, "Object") as the Construtor parameters, that is to say 4*4 (16 boxes to this grid) and it determines "automatically" how wide the stage is, if it's 200 px every box is 50 pixels wide. And the same for height. It calculates stageWidth / X, stageHeight / Y

so it's always a "full grid" that is 100% on the screen no matter the size.Finally, my question is if there is some other type of container other than stage that can "contain" these objects. Say that I create 4 of these containers, and each should hold 4 mini-games without taking up 100% of the stage container - instead it should take up the Substitute that acts in a similiar way.

View 3 Replies

ActionScript 2.0 :: Substitute For _root In Classes?

Apr 23, 2008

I have just started writing my own classes in .as files. I am now wondering what the structure is for calling movieclips and buttons on the stage. I have been using _root but have read that it is not a clever choise if you want to import other swf files into your project. Is there a smart way here to structure my classes?

View 2 Replies

ActionScript 3.0 :: Substitute A Parent MovieClip With A Loaded One?

Jul 9, 2009

is it possible to load a .swf and play it in such a way, that this loaded clip will become a root effectively substituting a loading clip on top of the hierarchy?
 
Saying this another way round - rather than loading external .swf as a child of a "host" movie I would like it to replace host movie entirely.

View 4 Replies

Actionscript 3 :: Substitute Image In Larger Animation?

Mar 4, 2011

We're making a Flash browser game with a few reasonably complex animations. Our designer is making the animations in Flash Professional while I'm wiring everything up and adding some logic through AS3 (using FlashDevelop).In one of our more complex animations a "bonus item" moves around the screen. It tweens hither and tither, there special effects and as such, it disappears for a few frames and then reappears later.From AS3 we want to be able to dynamically decide which bonus item (say a mushroom or a star) to include in the animation. We don't want to have to ask our designer to replicate the entire animation for each of our bonus items.This is what we've tried: Created a two frame (1 mushroom frame, 1 star frame) "BonusItem" movieclip in FlashPro and Exported for ActionScript.Created the complex animation movieclip in FlashPro and added the BonusItem movieclip to the relevant frames. Gave the BonusItem instance an instance name on all necessary KeyFrames. Exported entire movieclip for ActionScript(exported as "ComplexAnimation").[code]This would play the complex animation with the star and we could easily call gotoAndStop("mushroom") to play the same animation with the mushroom.

The first problem was that complexAnimation.bonusItem was null on line 02 above. I solved this by handling ADDED_TO_STAGE for complexAnimation and putting line 02 above in the handler. The next problem was that each time the bonusItem movieclip started tweening, or if it was not present in some frames and was subsequently re-added the complexAnimation.bonusItem attribute/reference was reassigned to a new bonusItem instance. I then had to find a way to know when this was happening and call gotoAndStop("star") on the new instance. I've found two ways to do this:

1) Listen for ADDED events on complexAnimation with a target.name of "bonusItem". It's a bit crap in a strongly typed language to have to resort to matching strings, but this works. Btw, when the ADDED event is fired new frame object references are still null.

2) Listen for FRAME_CREATED events. This happens later than ADDED at a point where new frame references have been initialized. As such I can check if complexAnimation.bonusItem is non-null at then call gotoAndStop("star") on it. One problem with this is that calling gotoAndStop actually triggers another FRAME_CREATED event to fire, so I need to guard against infinite looping. Again, it works but I don't have a great feeling about it.

View 2 Replies

ActionScript 2.0 :: Text Is Substitute By Numbers And Characters?

Aug 13, 2009

The fonts are not embedded, right? text is substitute by numbers and characters?

View 7 Replies

Javascript :: Use HTML/JavaScript And Flash To Build An Desktop AIR Application And Publish It From Flash?

Feb 16, 2011

Is it possible to make desktop Air application by using HTML/JavaScript and Flash?Actually I want to make an Air app (which is for desktop) by using flash and want to use HTML , javascript and CSS as well.Is it possible ?

View 1 Replies

Javascript :: Insert Javascript Functions To An HTML Document From The Child Flash Swf File?

Jan 29, 2012

I need to execute some javascript string code from flash swf file using actionscript 3.
I read that it could be done by passing the javascript code to the parent html document , using externalinterface.call function. Then I assume it will be faster if I can declare functions in the javascript code in the HTML document in the first use of externalinterface.call funtion ; if flash code calls the javascript code repeatedly. So let me ask you how to do that. For details , any javascript to be loaded is unknown in design time and I can not prepare a javascript file to be loaded.

View 2 Replies

Javascript :: Passing File Paths From Flash To JavaScript For Upload?

Sep 29, 2010

Is it possible to pass file names from a running Flash application, which only purpose is to enable multiple-file-selection, to a JavaScript application which handles upload of all files to the server?I have examined various Flash upload solutions (like SWFUpload, Uploadify, etc.) and none of them meets my needs. I want an easy to implement solution (like Uploadify) which also lets me specify various parts of the HTTP request.

The reason I need this is because my upload form uses session cookies (for user authentication) and an CSRF token both passed to the server when uploading files.Is it technically possible to pass filenames (+ paths) to a JavaScript application which then handles the upload?

View 1 Replies

Javascript 3 :: Can A JavaScript Function Detect Which Flash DOM Object Called It

May 20, 2011

Here's the challenge: I have a Flash movie which will be embedded in a page using an unknown DOM ID that I want to be able to identify/store for callback in a JS function. My ideal user flow would be: User clicks button in Flash. Flash pauses any animations / video / sounds / etc. Flash calls an injected JS function to display a page-covering overlay experience. When user closes overlay experience, a callback method on the Flash object is called. Flash resumes playback.

The problem is, when AS3 uses the ExternalInterface.call("functionName", args...) method, there doesn't seem to be a DOM event triggered, and thus it is impossible to tell which object called a JS function, so having a "registerMe()" function doesn't seem to work. Basically, the injected JS function has no way to determine which DOM object to call, because the ID of the Flash object is unknown.

[Code]...

View 3 Replies

Javascript :: Flash - Call A Javascript Function From An Embedded .swf File

Apr 16, 2009

I'd like to call a javascript function from an embedded .swf file. Specifically, I'd like to call a function in one of my externally linked javascript files from within: function loadTrack(){

[Code]...

which is in an .as file which I assume somehow becomes the swf file. How would I go about this and 're-compile' the .as file?

View 3 Replies

Javascript :: Cross-domain Browsing Javascript, Silverlight Flash?

Oct 2, 2011

I'm trying to write a web application that searches google and then downloads the result sites and parses them.The search has to be done on the client side. Without implementing a server side proxy.Can this be done using javascript/sliverlight/flash?

View 1 Replies

Actionscript 3 :: Javascript: Calling JavaScript Function From Flash (swfObject)?

Feb 29, 2012

let suppose i have a object named "data" which has a callBack function named "closeItem" which does something. So i have flash file which has a close button. on click of that i am calling this function which closes this item. So issue is? If i pass this "closeItemFunction" as global function this works fine. but if a pass this function as a "data.closeItem" this doesn;t work throwing some falsh error. so i just wanna ask that "does flash only call gobal scoped javascript function" ??

View 2 Replies

Javascript :: Flash - Security / Protecting Code In JavaScript?

May 10, 2010

With all the recent hype about JavaScript and HTML5 replacing Flash, I wanted to know - How would it be possible to protect client-side js code? Of course, it is possible to obfuscate it, but that would only make it a little harder. Also, for games which submit high scores to the server, wouldn't it be incredibly easy to modify those scores before they are sent to the server? I know even Flash files can be decompiled, but they can be obfuscated and flash decompilation is not as easy as modifying data in JS - could be done easily using a plugin such as Firebug. I'd like to know everyone's views on this.

View 2 Replies

Javascript :: Flash - Create Rain Effect In Javascript?

Jun 12, 2010

I need to achieve something like this for my website: Flash Rain Effect

Is that possible to do in Javascript? I want it to be just as smooth as it is in Flash.

View 3 Replies

Javascript :: Use Javascript To Call Method Within A Flash (.swf) File?

Dec 19, 2010

I have a flash file that contains a package "game" which has a class "Scores" and a method setValue(). I want to write some lines of Javascript that allow me to call that method. Someone directed me to this tutorial, but I am still a bit confused.

Javascript: alert("start"); var so; so = document.embeds[0];
so.addParam("allowScriptAccess","always"); import flash.external.ExternalInterface;
ExternalInterface.call("setValue[2600]");

displays an alert to tell me that it has indeed began to execute saves the embedded flash file into a variable and sets access imports that class calls the method.I am not sure about how this class thing works? This is just the bits and pieces I was able to come up with from that site, but I don't really understand how it all works (but certainly hope to eventually).This is the site: http:[url]...how-do-i-access-flash-function-using-javascript.When I execute the code with the importation nothing happens, but the alert does come up when I don't have that statement?

View 1 Replies

Javascript :: Flash/JavaScript: Non 360 (partial) Panorama Viewer

Jan 4, 2011

I'm searching for free partial panorama viewer. It should be placed in somewhere in the page and it should be customizable (openSource?). So far i found pan0.net but it only supports 360 and i have priority for non 360...

View 2 Replies

Javascript :: Sending An Email From The Browser With Javascript And Flash?

Aug 5, 2011

I'm wondering if its possible to do what I'm thinking, and if it is possible, does anyone know of a flash object that does what I need? I know a Flash object can provide a javascript API to interact with it, what I dont know is can Flash send an email directly without the need to talk to the webserver to do so? If thats possible would it not be possible to write a flash object that did nothing but provide an API to send emails? Has such a thing been created that is out there for others to use?

I'm looking to create a email form on a web page but the site is static (no server scripting). In my situation server scripting is not possible as there is no server, the site is 100% client side on a CD/DVD/USB Stick.

View 4 Replies

Javascript :: Mouse Move Effects - Css Maybe Javascript Maybe Flash?

Feb 10, 2012

when I moved my mouse there was a red fluid like velvet effect that followed my mouse and slowly faded.It was really cool and would love to add it to my website.

View 1 Replies

ActionScript 3.0 :: Loading Images - Substitute The Content For The New Content?

May 20, 2010

I have a menu whee you can choose a picture to lead, works great with first selection, but when you choose a different picture it loads over the last picture,I want to substitute the content of that movie clip not to load all the pictures in the same space. I treid to use clear() and removeChild(), but this only works when I choose pic1 then remove that to load pic2, is there an easy way to substitute the content for the new content?

View 1 Replies

Javascript :: Looking For Wii Compatible Javascript Flash Mp3 Player?

Oct 24, 2009

I am looking for a flash mp3 player that will work within the Opera-based browser on the Wii. The player needs to be javascript enabled (support methods like play, stop etc.) The mp3 tracklist will be built dynamically using ajax on the same page as the player so it must trigger an event when a track finishes playing (or at least provide functionality of some kind to indicate that it's time to start the next track). Does anyone know of such a player?

[Code]...

View 4 Replies

ActionScript 2.0 :: Substitute A Variable With Another Variable's Name Instead Of Its Actual Value?

May 18, 2010

I was wondering if its possible to substitute a variable with another variable's name instead of its actual value. I have a variable named "pLeg" thats equal to the value of 1.I have blank variable named "itemVar".Now, I want "itemVar" to equal to "pLeg", but not of its value, but of its name string.The reason is because I need "itemVar" to substitute multiple variables in a main timeline code.

For example:

Code:
if(_root.itemVar !== 1) {
//do something
}

"itemVar" can be any variable, like pTorso, or pWeapon or anything. Which is why I can't have it equal to the variables actual value, because then the timeline code would turn out to be:

Code:
if( 1 == 1) {
//1 being itemVar
}

PS: I've tried add quotations like _root.itemVar = "pLeg" but Flash will not read it as a variable.

View 3 Replies

ActionScript 3.0 :: How To Substitute "this" In Here

Jun 22, 2011

i have these lines of code, when i try them alone it works fine but when i try to use it in my project it stop working, the rotation actually and is because of "this" in the tweener.

[Code]...

my question is, is there any way to reference another object in the tweener to make this thing works? project consist in several classes wich are called by a fla to ensamble interface, maybe that's the reason it stop working. now i noticed the code i have just works directly on the fla, if i place it in a clase it stop working because of the same...."this"

View 7 Replies

ActionScript 2.0 :: Substitute "|" For " " - Show The Value In The Dynamic Text?

May 3, 2006

I have a dynamic text and in it I pull a value that I places in the PARAM of my HTML, like this, " ...&p1=de|R$+9,49|por|R$+799,58 ", I am trying to make the following one, show the value in the dynamic text, " R$+799,58 ", without the "de" or "|" or "por", I already tried to make this.

[AS]
var valorDe:String = "!";
var valorPosicao:Number = _root.p1.text.indexOf (valorDe);
if (valorPosicao >=0) {

[code].....

but nothing works.

View 7 Replies

Javascript :: Javascript - Target Multiple Objects With A Single Operation Using ECMAScript's `with` Statement?

May 2, 2011

The following doesn't work (although it gives no explicit error), but why not?nd... Is there really no way around it, strictly using the with statement? Forget using for / foreach.

with (object1, object2) {
attribute = value;
method();
}

Why the code above gives no syntax error, doesn't work but is accepted by with?If it's possible, how could we change multiple objects with same attribute using with?

var object1 = { attribute: 3 };
var object2 = { attribute: 2, method: function() { alert('blah'); } };
var object3 = { method: function() {alert('bleh'); } };

[code]....

View 2 Replies

Javascript :: Unable To Communicate With Javascript From Flex After Dymanically Loading A Swf?

Aug 1, 2009

for some reason, whenever I dynamically load a swf on a $(document).ready() by writing to a div, I am unable to make javascript calls to the browser. Specifically, all calls to the browser return "null". This does not occur when embedding the swf normally on the page load, but I would like to prevent loading of the swf until a specified point in time.

What the heck is going on here? Is there something special about dynamically embedding a swf that prevents the swf from talking to the browser? The methods ARE called (I've proven such by showing alerts), but all return values to any function, regardless of type returned, shows as null when it gets to flash.

View 3 Replies

Javascript :: Call An External Javascript On Frame Action/change?

Aug 26, 2011

i have a flash movie with 2 frames. and i would like to call an external javasscript function on frame action.

[Code]...

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved