Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Flash clickTAG undefined

Posted on 2007-04-09
4
Medium Priority
?
2,756 Views
Last Modified: 2009-07-29
I am building a flash banner and the site that is going to run it has some instructions that says that I should use getURL(clickTAG1,"_blank") for the links. So I have created a layer at the bottom of my flash file and converted into a movieclip. I have then written:

on (release) {
      getURL(clickTAG1,"_blank");
}
in the action script for the movie clip. I also have a clickTAG2 that gets active after half of the movie. The html looks like this:

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>dibanner_live_sv</title>
</head>
<body bgcolor="#ffffff">
<!--url's used in the movie-->
<!--text used in the movie-->
<!-- saved from url=(0013)about:internet -->
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="140" height="175" id="dibanner_live_sv" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="dibanner_live_sv.swf?clickTAG1=http://www.iflexfx.com&clickTAG2=http://www.interactivesignals.se" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><embed src="dibanner_live_sv.swf?clickTAG1=http://www.iflexfx.com&clickTAG2=http://www.interactivesignals.se" quality="high" bgcolor="#ffffff" width="140" height="175" name="dibanner_live_sv" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
</body>
</html>

When I click on the banner I get the text /undefined at the end which tells me that the clickTAG variables does not get populated. If I write an URL instead of the clickTAG variable in the flash code it works fine but it seems as if I can not pass the variables from the html to the flash. Can anyone see what I am doing wrong?
0
Comment
Question by:Steverino541
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 34

Expert Comment

by:Aneesh Chopra
ID: 18875702
actually you are placing button inside movieClip, but variables clickTAG1 and clickTAG2 are on _root.

to fix this issue..

use following :
---------
on (release) {
      getURL(_root.clickTAG1,"_blank");
}
---------

and

---------
on (release) {
      getURL(_root.clickTAG2,"_blank");
}
---------

- Aneesh Chopra


0
 

Author Comment

by:Steverino541
ID: 18875892
I have written it this way now:
on (release) {
      getURL(_root.clickTAG1,"_blank");
}

Now though a new window does not open. When I click on the banner nothings happens.
0
 
LVL 34

Expert Comment

by:Aneesh Chopra
ID: 18877111
try this:

on (release) {
      getURL(_level0.clickTAG1,"_blank");
}
0
 
LVL 4

Accepted Solution

by:
Blixtsystems earned 2000 total points
ID: 18882234
You should be using FlashVars in the embed code instead of adding it as an URL string:

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>dibanner_live_sv</title>
</head>
<body bgcolor="#ffffff">
<!--url's used in the movie-->
<!--text used in the movie-->
<!-- saved from url=(0013)about:internet -->
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="140" height="175" id="dibanner_live_sv" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="dibanner_live_sv.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<param name="FlashVars" value="clickTAG1%3Dhttp%3A%2F%2Fwww.iflexfx.com%26clickTAG2%3Dhttp%3A%2F%2Fwww.interactivesignals.se" />
<embed src="dibanner_live_sv.swf" quality="high" bgcolor="#ffffff" width="140" height="175"
FlashVars="clickTAG1%3Dhttp%3A%2F%2Fwww.iflexfx.com%26clickTAG2%3Dhttp%3A%2F%2Fwww.interactivesignals.se"
name="dibanner_live_sv" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
</body>
</html>
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently, I was asked to recommend a tracking system to be implemented on a clients website. As the entire site was built on flash, my first thought was to suggest custom built tracking system. However, our company at that point of time didn't h…
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
The goal of the tutorial is to teach the user how to how to record live broadcast.

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question