ActionScript 2.0 :: Loading Variables From The Embed Tag?

Aug 29, 2006

I'm develloping a little image loading application for a client. the same swf has to be reused over and over to load the files. They are passing me the image location in the embed tag but they are not using the usual

flash.swf?path=folderpath&img1=image1.jpg&img2=ima ge2.jpg&img3=image3.jpg

instead they are using this format :

flash.swf?/folderpath/::SPLIT::image1.jpg::SPLIT::image2.jpg::SPLIT::ima ge3.jpg
do you know how I can read those variables into my flash file ?

View 1 Replies


Similar Posts:


Actionscript 3 :: Embed Dynamic Audio File(s) / Use Variables In Embed?

Feb 10, 2012

Making a piano/keyboard application and trying to figure out the best way to set this up .I plan on having a directory of sounds for each 'instrument' in my assets folder (piano1/C4.mp3,piano1/D4.mpg,...)Is there a way to import/embed all of these as an array? Also is there a way I can pass a variable to this class to indicate which folder I want to import these from? Something that would be ideal

var type = "piano2"; //passed from class being called by
foreach(notes as note){
[Embed(source = 'assets/sounds/'+type +'/'+note+'.mp3')] private const C3:Class;
public var c3:Sfx = new Sfx(C3);
}

Or would it be a better idea to have a class for each of these "types" that pulls all notes?

View 2 Replies

ActionScript 3.0 :: Embed Metadata From Variables?

Jan 27, 2011

I have a AS3/CS5 project in which I am dynamically loading in a font whose location is passed in via XML.

I want to then embed the font per below:

Code:
//font location string passed via xml - "/fonts/randomfont.ttf"
var fontLocation = xml.navigation.font.@fontLocation
[Embed(source=fontLocation, fontFamily="font1", embedAsCFF="false",

[Code]....

it works fine. Are you not able to use variables as metadata in the embed tag? Is there a work around for this?

View 7 Replies

ActionScript 2.0 :: Passing Variables In Embed Code

Mar 10, 2011

what I need to do is have a flash movie jump to a set label in timeline according to which named variable I have defined in the embed HTML code.So, let's say I have a movie with two labeled frames ("shape1" and "shape2") and when the variable pagevar equals "one", the movie jumps to "shape1" while when the variable pagevar equals "two", the movie jumps to "shape2". If the variable is undefined or equals anything else, the movie simply stops.[code]

View 1 Replies

ActionScript 1/2 :: Listing All The Populated Variables When A Swf Is Loaded From An Embed Tag?

Mar 9, 2009

I've been wondering how I could possibily do this for some time now. and all I tried or thought of went nowhere. I'd like to list all the variables an html embed tag passes on to the swf file called, whatever they are named and how many there is. <EMBED src="example.swf?var="varcontent",var2="var2content"> it's not life-threatening, but I hate using things that work when I have an idea for things that would work better x)

View 2 Replies

ActionScript 3.0 :: Use Variables Inside [Embed] Font Tags?

Oct 24, 2009

I seem to have the [Embed] tag working OK for embedding fonts But I want to specify font and font location in an xml file, read in the font location, and pass it into the [Embed] statement. Like this

var xFont = xFormat..navcontrols.font;
//then...
[Embed(source = xFont, fontName = 'myFont', mimeType = 'application/x-font-truetype')]
var csgFont:Class;

The error I get is

'unable to resolve 'xFont' for transcoding

I want to keep this all in AS3 if at all possible. I dont want to use the Flash IDE to create embedded fonts. I would ideally like to minimize the impact of changing a font.

View 4 Replies

Php :: Use SWFObject To Embed A Flash Object In Page And Pass Variables

Feb 28, 2011

i am wanting to know how much I can be sure that users of my website will not be able to pass bogus variables to my Flash movie. Basically I will have some features available to certain users and I realise that for the average user they will not know anything about how to send spoof vars but is it possible for someone to change the variables sent using SWFObject when a page loads and thus be able to use the functionality that I am trying to disable for them.I have a PHP (my_flash_movie.php) page that calls a function from an included globals.php file to determine if the user can see the restricted functionality is_ user_a_subscriber($_SESSION['user_id']); which returns 1 or 0. This 1 or 0 is then passed to Flash which enables or disables certain features. I dont want someone to be able to send a 1 instead of a 0 basically. This isnt a site where security is critical and the functionality that is disabled is not really critical either so wouldnt be too bad if this happened but im just curious about this and wondering if I should think of another way to pass these vars that might be more hidden.

View 3 Replies

ActionScript 3.0 :: Get Variables That Are Passed From Html Object And/or Embed Tags

May 9, 2010

I need to get variables that are passed from my html object and/or embed tags, so I can use them in my flash project.

for example: src="/incl/flash/Line_Graph.swf?a=value1&id=1"

how can I get a and id inside my flash file?

View 3 Replies

Flash :: BitmapFileMaterial Not Loading On Embed?

Oct 27, 2010

I've built a carousel in Papervision3D using Flash CS5, everything works fine but when it's embedded in a web-page (local or online) the BitmapFileMaterial assets don't seem to load.

I've tried everything and like I said, it works locally, just not when it's embedded.

It's a carousel made up of a number of planes. Here's the AS3 code that generates the planes (and adds the material):

for (var i:int = 0; i < numItems; i++)
{
var plane:Plane = new Plane(new BitmapFileMaterial("images/file" + i + ".jpg"),150,225,0,0);

[Code]....

View 1 Replies

ActionScript 3.0 :: Loading External Fonts Via Embed?

May 3, 2011

I typically embed the fonts in a library and use it this way but sometimes this gives me issues. I'm using Flash Pro CS5 and I'm trying the Embed method. I've seen many blogs/posts (here, here, here, here, etc in order of which my problems arose) but none of them are working for me. I'm getting the transcode error issue.
 
Can anyone shed more light on what the Error: Unable to transcode 'some/path/to/a.ttf' transcoding error is? Im sure the path is right, I've tried embedding with and without various options like mimeType, I can't get it to embed the font, or any font for that matter. Tips on embedding a font? My code would typically look like this:
 
[Embed(source="dat/SomeFont.ttf",  fontFamily="SomeFont", mimeType="application/x-font")] var SomeFontClass:Class; var SomeFont:Font = SomeFontClass();

View 3 Replies

ActionScript 3.0 :: Loading Swf From Other Site Into Swf With Embed Code

Sep 19, 2009

i have a flash site, and i want to call another flash file from another site. Its a magazine with the flip efect, the site is [URL], they convert your PDFs to flip flash books, i cannot do myself so i use this site, the problem is i want to put the flip book in a section of my site. [URL] gives you a embed code to put on html, but i dont know how to use it in flash, someone knows a way?

View 2 Replies

ActionScript 3.0 :: Loading HTML Text And Embed Font?

Apr 21, 2010

I am calling in HTML text into a dynamic textfield on stage and need to change font styles within the HTML text for my titles (to Arno Pro).I dont know HTML and think I might somehow need to embed the font I want to use?If so, do I do this in AS or the HTML text file.[code]

View 4 Replies

Actionscript 3 :: Embed Versus Dynamically Loading Sounds?

Jun 4, 2011

It's got 5 tabs, and will give the user the options to play about 10 sounds per tab.I have initially been loading the sounds on runtime, so whenever the user clicked a button to play that sound, I would do something like:

var sound:Sound = new Sound(new URLRequest("assets/hello.mp3"));
sound.play();

I'm not sure, but I don't think this is very good, since I would be loading that sound over and over again if the user pressed the button too many times.

I then thought about embedding the sound in each of the views (I have one view per tab), so would embed the sounds whenever the view was loaded. I think this is a better options, but still am a bit unsure about how the embed works exactly.

[Embed('assets/hello.mp3')] private var hello_mp3:Class;

I suppose it simply embeds the mp3 files when the swf is compiled (making it bigger), but they would not be loaded anymore once the app starts, or once that view is initialized again.

View 4 Replies

ActionScript 3.0 :: Loading Remote Fonts Without Having To Embed The Font Into An SWF?

Nov 4, 2009

What I want is to have my application be able to load a .TTF or .OTF file.What I found so far is people embedding their fonts into an .SWF and using the Loader class to load the font that way.That does not work for me because I want people using my system to be able to upload their own fonts, and not forcing them to embed it in an .SWF, because I want to keep my system as simple as possible.

View 2 Replies

ActionScript 2.0 :: [F8] Loading Variables From Php?

Feb 10, 2009

my actionscript:

Code:
label1 = new LoadVars;
url1 = new LoadVars;

[code].....

View 2 Replies

ActionScript 3.0 :: Loading URL With Variables?

Jan 20, 2010

I'm attempting to hit an off-domain url with some variables attached. The domain has a cross domain policy file on it, but flash is looking for the file after the url with the variables attached which then fails.Example:I want to hit: www.sample.com?someArg=1I have even tried loading the cross domain file prior to making the call and it is found ok, but flash then looks again when I attempt to hit the url with variables attached as if it is another domain.

View 5 Replies

ActionScript 2.0 :: Loading Jpg, With Variables?

Nov 1, 2003

trying to make this load certain jpg files based on a variable, but I can't make it loop through?

artistName = "Grace Jones";
for(i=1; i<4; i++){
filename = artistName+"/"+i+".jpg";[code].............

View 4 Replies

ActionScript 2.0 :: Loading Variables From XML?

Jan 8, 2004

i'm trying to load in a variable value from an xml file.

i want to turn the visibility of a button clip on or off from within my loaded XML code. i know that my xml is loading and working correctly. in my XML file, i have visible="true" set up as an attribute to one of my nodes. what do i need to do to get

_root.myButton._visible=[the variable from my XML];

View 1 Replies

ActionScript 2.0 :: Loading Variables From One Swf To Another Swf Via Php?

Aug 4, 2011

This question might be a common one ..I too have googled for it a lot but cudnt find the solution for my problem.I have a swf file that loads variable into a php file by :

Code:
my_lv.send("file.php","_blank","POST");
php then uses these variables.

[code].....

View 6 Replies

ActionScript 2.0 :: Loading Variables Into Flash From Xml?

Feb 18, 2010

I am a little rusty with my action script and i am still using 2.0 in my project. I need to load variables in to flash from an xml file and i just can't seem to get it to work.

here is my flash code:

Quote:

on (release) {
getxmldata = new XML();
getxmldata.load("xmldata.xml","");
if (getxmldata.loaded) {
var p = getxmldata.firstChild;

[Code]......

View 2 Replies

Loading Several MovieClips Into Separate Variables?

Sep 22, 2010

I have several Movie Clips in the Library which I need to be able to load and bring up on the screen randomly.The code below shows how I can load one of these, but to get a proper control ideally I would like to load them all in to an array or numbered variables so that they can be called from a simple piece of code and actioned one at a time.

My movieclips can all be called something simple like mc1, mc2, mc3, mc4 etc to make things easier.These need to be referenced in to an array mcContainer[.....] or as mcContainer1, mcContainer2........ so that they can be called easily.I just need to know the simplest way to do this and how i reference them, I have tried several ways like ["mc"+i] etc and nothing seems to work.

Code:

var mc:mcLogo=new mcLogo();
addChild(mc);

View 4 Replies

Data Integration :: Loading Some Variables From PHP Doc?

Nov 6, 2007

I am using loadvariablesnum to load some variables from my php doc, is there a way i can test to see if its loaded or not to jump to the next frame..? Right now I am having it load into a string.text to test if there is text in it, but I don't want to use a string.text

View 1 Replies

ActionScript 3.0 :: Loading Database Into Variables?

Aug 24, 2009

I'm trying to load the variables from a database into my flash file but I'm unsure what to use. I know for XML it's

var myXML:XML;
myXML= new XML(e.target.data);

but i'm not sure what the type is if it is coming from a  database? I sent it the database via php and need to receive it back into flash. Even a reference so I can go look, I'm just not sure what class to begin with.

View 16 Replies

Actionscript :: Loading Variables From Html Into Swf?

Oct 19, 2010

I have this project where I need to load 3 external variables into my swf-file on a webpage. The wierd thing is that I got this to work before, but now it suddenly wouldn't :

I use swfObject to setup the variables like this:

<script type="text/javascript">
var flashvars = {page:"page1", box:"head2"};
var params = {};

[Code]....

View 2 Replies

ActionScript 2.0 :: Loading Php Variables In Flash

Jan 15, 2009

I have created a php scipt (in line with Tony Marstons tutorial) to creating xml document from mysql database.[code]I am wanting to incorporate the results from this into a dynamic text field in my flash file so the content is read from the file.

View 4 Replies

ActionScript 2.0 :: Loading External SWF And Using Variables

Aug 12, 2009

When loading an external SWF file, can you actually use some of the variables from the loaded SWF file in the parent SWF file?

View 1 Replies

ActionScript 2.0 :: Loading Variables From PHP File?

Nov 13, 2009

I am currently helping make a project which needs to load variables from a PHP file into Flash. What I want is the flash movie to go to a frame if the PHP variable in the PHP file equals some text, say "hello".For my PHP file I have this:

Code:
<?php
$dataForTxtbox_1 = "hello";
print("&name1=$dataForTxtbox_1");
?>

I have tried several bits of actionscript, but with no luck. Basically, I want the movie to go to a frame if the variable in PHP equals "hello". Which it currently does, I have tried using the if statement in several ways but with no luck.

View 0 Replies

ActionScript 2.0 :: AttachMovie Is Not Loading Variables?

Jan 20, 2011

I'm using an xml to feed content to a flash website, to load the content I use an array to create a new movie clip per item. What I need to use is for every item to have an action to attach a movieclip in the fashion of a modal window and load the content of this item into the popup movie clip. So far I've managed to get it to get it to attach the mc but the variables with the content do not load.I tried with this but it still didn't work:

_root.contenedorPop.attachMovie("popup", "popnoticia", this.getNextHighestDepth());
_root.popnoticia.onEnterFrame = function() {
_root.noticiaTitulo.text = "textoooo";

[code].....

View 4 Replies

ActionScript 2.0 :: How To Loading External Variables

Jan 26, 2004

I had a question about loading external variables. Is it possible to load external variables from a different server other than the one that the flash site is hosted on?And if so, what would that command look like?For instance, if you load a variable from the site's own server it might look like this;loadText.load("TEXT1.txt");Would loading it from a different server look something like this;

View 1 Replies

ActionScript 2.0 :: Loading Data Into Variables?

Aug 27, 2004

I am trying to load data into a variable. This part works fine

Code:

loadText = new loadVars();
loadText.load("htmltextFile.txt");
loadText.onLoad = function(success)

[Code]....

View 1 Replies







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